/* ============================================
   레이아웃 스타일
   ============================================ */

/* 헤더 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 28px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.logo { display: flex; align-items: center; gap: 14px; }

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--diamond) 0%, var(--gold) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

.logo-icon svg { width: 26px; height: 26px; color: white; }
.logo-text-wrap { display: flex; flex-direction: column; }

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--gold) 0%, var(--diamond-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }
.header-right { display: flex; align-items: center; gap: 12px; }

.update-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.update-badge svg { width: 14px; height: 14px; color: var(--success); }

/* 히어로 섹션 */
.hero-section {
    background: linear-gradient(135deg, rgba(168,85,247,0.08) 0%, rgba(251,191,36,0.04) 100%);
    border: 1px solid rgba(168,85,247,0.2);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(251,191,36,0.1) 0%, transparent 70%);
    pointer-events: none;
}

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

.hero-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--diamond) 0%, var(--diamond-light) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icon svg { color: white; width: 22px; height: 22px; }
.hero-title { font-size: 1.2rem; font-weight: 700; }
.hero-content { font-size: 0.95rem; line-height: 1.9; color: var(--text-secondary); }
.hero-content strong { color: var(--text-primary); }

.keyword-highlight {
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 1.1em;
}

/* 통계 그리드 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }

/* 테이블 카드 */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 28px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.table-title { display: flex; align-items: center; gap: 12px; font-size: 1rem; font-weight: 700; }

.table-title-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-title-icon svg { color: var(--bg-primary); width: 18px; height: 18px; }
.legend { display: flex; gap: 20px; font-size: 0.75rem; color: var(--text-secondary); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.blue { background: var(--blue-ocean); box-shadow: 0 0 8px var(--blue-ocean); }
.legend-dot.red { background: var(--danger); }

/* 데이터 테이블 */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
    background: rgba(255,255,255,0.02);
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td { padding: 16px 20px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }
.num-col { text-align: right; font-variant-numeric: tabular-nums; }
.loading-cell { text-align: center; padding: 60px !important; color: var(--text-muted); }
.keyword-cell { display: flex; align-items: center; gap: 16px; }
.keyword-info { flex: 1; min-width: 0; }
.keyword-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; word-break: keep-all; }
.keyword-grade { font-size: 0.75rem; }
.action-btns { display: flex; gap: 6px; flex-shrink: 0; }

/* 아카이브 */
.archive-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-top: 28px;
}

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

.archive-icon {
    width: 36px;
    height: 36px;
    background: rgba(168,85,247,0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--diamond-light);
}

.archive-icon svg { width: 18px; height: 18px; }
.archive-title { font-size: 1rem; font-weight: 700; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; list-style: none; }

.archive-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.archive-item a svg { color: var(--text-muted); width: 16px; height: 16px; flex-shrink: 0; }
.archive-item a:hover { background: var(--bg-card-hover); border-color: var(--gold); color: var(--gold); }
.archive-item a:hover svg { color: var(--gold); }

/* 푸터 */
.footer {
    text-align: center;
    padding: 40px 0 28px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer-social { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.footer-sub { margin-top: 6px; font-size: 0.7rem; }
