@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap");

:root {
  --bg-gradient-start: var(--bg);
  --bg-gradient-end: var(--bg);
  --card-bg-color: var(--surface);
  --card-border-color: var(--border);
  --text-primary-color: var(--text);
  --text-secondary-color: var(--muted);
  --accent-color: var(--primary);
}

body {
  font-family: "Inter", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text-primary-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  box-sizing: border-box;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 6vw 60px;
}

.hero {
 text-align: left;
 margin-bottom: 50px;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 600px;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    align-items: center;
}

.input-row textarea#ua-input {
    height: 54px;
}

.pill-input {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 0.95rem; /* Slightly smaller for long UA strings */
    color: var(--text);
    font-family: 'Consolas', 'Monaco', monospace; /* Monospace for UA */
    outline: none;
    transition: all 0.2s ease;
    resize: none;
    height: 52px;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.pill-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 106, 167, 255), 0.1);
}

.pill-btn {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pill-btn:hover {
    background: var(--border);
}

.pill-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: #2563eb;
    align-self: center;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.4);
}

.pill-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -1px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Results Area */
.dashboard {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Overview Card */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value-large {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    word-break: break-all;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-title {
    margin: 0 0 20px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-title i {
    color: var(--primary);
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.95rem;
}

.detail-item:not(:last-child) {
    border-bottom: 1px solid var(--surface-2);
    padding-bottom: 12px;
}

.detail-label {
    color: var(--muted);
    flex-shrink: 0;
}

.detail-value {
    font-weight: 500;
    color: var(--text);
    text-align: right;
    word-break: break-all;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px 40px;
    }
    
    .overview-grid, .details-grid {
        grid-template-columns: 1fr;
    }
    
    .input-row {
        flex-direction: column;
    }
    
    .pill-btn {
        width: 100%;
        justify-content: center;
    }
    .input-row textarea#ua-input {
        height: 150px;
    }
}