/* 메인 스타일시트 - 유튜브 모니터링 대시보드 */
:root {
    /* 차분하고 고급스러운 슬레이트 그레이 & 에메랄드 테마 */
    --primary-color: #475569;        /* 슬레이트 그레이 */
    --secondary-color: #334155;      /* 다크 슬레이트 */
    --accent-color: #059669;         /* 차분한 에메랄드 */
    --success-color: #10b981;        /* 에메랄드 그린 */
    --warning-color: #d97706;        /* 따뜻한 오렌지 */
    --danger-color: #dc2626;         /* 레드 */
    --text-primary: #0f172a;         /* 진한 슬레이트 */
    --text-secondary: #64748b;       /* 미디엄 슬레이트 */
    --text-light: #94a3b8;           /* 라이트 슬레이트 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;         /* 매우 연한 슬레이트 */
    --bg-tertiary: #f1f5f9;          /* 연한 슬레이트 */
    --border-color: #e2e8f0;         /* 보더 슬레이트 */
    --shadow-light: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-medium: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-large: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}


/* 라이트모드 추가 변수 */
:root {
    --primary-color-light: rgba(71, 85, 105, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    transition: var(--transition);
}

/* 컨테이너 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 - 모바일 최적화 */
.header {
    background: #FFD700;
    color: #000000;
    padding: 6px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid #FFA500;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

/* 컴팩트 헤더 */
.header-compact {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px 30px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    text-align: center;
}

.header-compact h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
    font-weight: 600;
}

.header-compact .subtitle {
    font-size: 0.95em;
    opacity: 0.9;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header h1 {
    font-size: 1.1em;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.header .subtitle {
    font-size: 0.9em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* 네비게이션 - 모바일 최적화 */
.nav {
    background: var(--bg-primary);
    padding: 12px 0;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-light);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.nav-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9em;
    white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
    background: var(--primary-color);
    color: white;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
}

/* 통계 카드 */
.stats {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 30px;
    box-shadow: var(--shadow-light);
}

/* 컴팩트 통계 */
.stats-compact {
    background: var(--bg-primary);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-light);
}

.stats-inline {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-compact {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.stat-compact strong {
    color: var(--primary-color);
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.stat-item {
    text-align: center;
    padding: 25px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.1em;
}

/* 섹션 */
.section {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 30px;
    box-shadow: var(--shadow-light);
}

.section-title {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: var(--text-primary);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
}

/* 필터 */
.filters {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.9em;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95em;
}

/* 비디오 카드 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

/* 컴팩트 비디오 그리드 (5개씩) */
.video-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.video-section {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-light);
}

.video-card-compact {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.video-card-compact:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.video-thumbnail-compact {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumbnail-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card-compact:hover .video-thumbnail-compact img {
    transform: scale(1.03);
}

.video-info-compact {
    padding: 12px;
}

.video-title-compact {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-title-compact a {
    color: inherit;
    text-decoration: none;
}

.video-title-compact a:hover {
    color: var(--primary-color);
}

.video-meta-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
}

.video-views-compact {
    color: var(--primary-color);
    font-weight: 600;
}

.video-date-compact {
    color: var(--text-light);
}

.video-channel-compact {
    color: var(--text-secondary);
    font-size: 0.8em;
    font-weight: 500;
}

.channel-subscribers {
    color: var(--accent-color);
    font-size: 0.75em;
    font-weight: 600;
    background: rgba(240, 147, 251, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 4px;
    display: inline-block;
}

/* 비디오 필터 버튼 */
.video-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background: var(--bg-secondary);
    padding: 15px 20px;
    border-radius: var(--border-radius);
}

.filter-group {
    display: flex;
    gap: 10px;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-group::before {
    content: '정렬:';
    font-size: 0.9em;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 검색 기능 스타일 */
.search-input {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    width: 300px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.search-btn {
    background: var(--bg-primary);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    padding: 10px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.clear-search-btn {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    padding: 10px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    background: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
    transform: translateY(-1px);
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9em;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 재생시간 배지 */
.video-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 500;
}

/* 숏폼 특별 표시 */
.video-card-compact[data-url*="/shorts/"] .video-duration-badge {
    background: #ff4444;
}

.video-card-compact[data-url*="/shorts/"]::before {
    content: "SHORTS";
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff4444;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
    z-index: 1;
}

.video-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.video-date {
    color: var(--text-light);
    font-size: 0.85em;
    font-style: italic;
}

.video-channel {
    color: var(--text-secondary);
    font-size: 0.95em;
    font-weight: 500;
}

.video-views {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95em;
}

.video-keyword {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

/* 키워드 분석 */
.keywords-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.keyword-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.keyword-item:hover {
    background: var(--primary-color);
    color: white;
}

.keyword-name {
    font-weight: 500;
}

.keyword-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.keyword-item:hover .keyword-count {
    background: rgba(255, 255, 255, 0.2);
}

/* 차트 컨테이너 */
.chart-container {
    position: relative;
    height: 350px;
    margin: 20px 0;
}

/* 로딩 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 채널 그리드 - 테이블 디자인 */
.channel-grid {
    display: block;
    margin-top: 20px;
    width: 100%;
}

/* 기존 채널 카드 (호환성 유지) */
.channel-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
}

.channel-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

/* 새로운 컴팩트 채널 카드 */
.channel-card-compact {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.channel-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.channel-info-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.channel-name-compact {
    font-size: 1em;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.3;
}

.channel-name-compact a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.channel-name-compact a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.channel-tier {
    font-size: 1.2em;
    flex-shrink: 0;
}

.channel-stats-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8em;
}

.stat-item {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}

/* 기존 채널 카드 스타일 (호환성 유지) */
.channel-info {
    text-align: left;
}

.channel-name {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.channel-name a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.channel-name a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.channel-handle {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-style: italic;
}

.channel-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.channel-video-count, .channel-views, .channel-avg {
    font-size: 0.9em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-video-count::before {
    content: "🎥";
    font-size: 1.1em;
}

.channel-views::before {
    content: "👁️";
    font-size: 1.1em;
}

.channel-avg::before {
    content: "📊";
    font-size: 1.1em;
}

/* 반응형 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .header h1 {
        font-size: 2.2em;
    }
    
    .header-compact {
        padding: 15px 20px;
    }
    
    .header-compact h1 {
        font-size: 1.5em;
    }
    
    .nav-container {
        padding: 0 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .stats-inline {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-grid-5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .channel-grid {
        display: block;
    }
    
    .channel-card-compact {
        padding: 10px;
    }
    
    .channel-stats-compact {
        gap: 6px;
        font-size: 0.75em;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .video-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        justify-content: center;
    }
    
    .sort-group {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .header-compact h1 {
        font-size: 1.3em;
    }
    
    .section {
        padding: 20px;
    }
    
    .video-section {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .video-grid-5 {
        grid-template-columns: 1fr;
    }
    
    .stats-inline {
        gap: 5px;
    }
    
    .stat-compact {
        font-size: 0.85em;
    }
    
    .channel-grid {
        display: block;
    }
    
    .channel-card-compact {
        padding: 8px;
    }
    
    .channel-stats-compact {
        flex-direction: column;
        gap: 4px;
        font-size: 0.7em;
    }
    
    .channel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .channel-tier {
        align-self: flex-end;
    }
}

/* 테이블 스타일 - 2025-06-27 업데이트 */
.table-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin: 20px 0;
    width: 100%;
    overflow-x: auto;
}

.channel-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.85em !important;
    table-layout: fixed !important;
    min-width: 1000px !important;
}

.channel-table th,
.channel-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* 컬럼 너비 */
.channel-table th:nth-child(1),
.channel-table td:nth-child(1) { 
    width: 50px;
    text-align: center;
} /* 순위 */

.channel-table th:nth-child(2),
.channel-table td:nth-child(2) { 
    width: 300px;
} /* 채널명 */

.channel-table th:nth-child(3),
.channel-table td:nth-child(3) { 
    width: 50px;
    text-align: center;
} /* 티어 */

.channel-table th:nth-child(4),
.channel-table td:nth-child(4) { 
    width: 80px;
    text-align: center;
} /* 영상 수 */

.channel-table th:nth-child(5),
.channel-table td:nth-child(5) { 
    width: 120px;
    text-align: right;
} /* 총 조회수 */

.channel-table th:nth-child(6),
.channel-table td:nth-child(6) { 
    width: 120px;
    text-align: right;
} /* 평균 조회수 */

.channel-table th:nth-child(7),
.channel-table td:nth-child(7) { 
    width: 120px;
    text-align: right;
} /* 구독자수 */

.channel-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.channel-table tr:hover {
    background: var(--bg-secondary);
    transition: var(--transition);
}

.channel-name-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-name-cell a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-name-cell a:hover {
    text-decoration: underline;
}

.channel-handle {
    font-size: 0.8em;
    color: var(--text-light);
    font-family: monospace;
    margin-top: 2px;
}

.channel-name-cell,
.channel-handle-cell {
    position: relative;
}

.channel-name-cell:hover,
.channel-handle-cell:hover {
    overflow: visible;
    white-space: normal;
    background: var(--bg-secondary);
    z-index: 100;
}

.channel-tier-cell {
    font-size: 1.2em;
    text-align: center;
}

.channel-count-cell,
.channel-views-cell,
.channel-avg-cell,
.channel-subscribers-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.channel-handle-cell {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.85em;
}

/* 모바일 반응형 테이블 */
@media (max-width: 768px) {
    .table-container {
        font-size: 0.75em;
        overflow-x: hidden;
    }
    
    .channel-table {
        min-width: 0 !important;
    }
    
    .channel-table th,
    .channel-table td {
        padding: 6px 4px;
        font-size: 0.85em;
    }
    
    .channel-handle {
        display: none;
    }
    
    /* 모바일에서 컬럼 너비 조정 */
    .channel-table th:nth-child(1),
    .channel-table td:nth-child(1) { 
        width: 35px !important;
        font-size: 0.8em;
    } /* 순위 */
    
    .channel-table th:nth-child(2),
    .channel-table td:nth-child(2) { 
        width: 40% !important;
        max-width: 150px;
    } /* 채널명 */
    
    .channel-table th:nth-child(3),
    .channel-table td:nth-child(3) { 
        width: 30px !important;
    } /* 티어 */
    
    .channel-table th:nth-child(4),
    .channel-table td:nth-child(4) { 
        width: 50px !important;
        font-size: 0.8em;
    } /* 영상 수 */
    
    .channel-table th:nth-child(5),
    .channel-table td:nth-child(5) { 
        width: 70px !important;
        font-size: 0.8em;
    } /* 총 조회수 */
    
    .channel-table th:nth-child(6),
    .channel-table td:nth-child(6) { 
        display: none !important;
    } /* 평균 조회수 숨김 */
    
    .channel-table th:nth-child(7),
    .channel-table td:nth-child(7) { 
        display: none !important;
    } /* 구독자수 숨김 */
}

@media (max-width: 480px) {
    .table-container {
        font-size: 0.65em;
        overflow-x: hidden;
    }
    
    .channel-table {
        min-width: 0 !important;
    }
    
    .channel-table th,
    .channel-table td {
        padding: 3px 2px;
        font-size: 0.9em;
    }
    
    /* 초소형 화면에서 매우 간결하게 */
    .channel-table th:nth-child(1),
    .channel-table td:nth-child(1) { 
        width: 25px !important;
        font-size: 0.75em;
    } /* 순위 */
    
    .channel-table th:nth-child(2),
    .channel-table td:nth-child(2) { 
        width: 60% !important;
        max-width: 120px;
    } /* 채널명 더 넓게 */
    
    .channel-table th:nth-child(3),
    .channel-table td:nth-child(3) { 
        width: 25px !important;
    } /* 티어 */
    
    .channel-table th:nth-child(4),
    .channel-table td:nth-child(4) { 
        width: 40px !important;
        font-size: 0.75em;
    } /* 영상 수 */
    
    .channel-table th:nth-child(5),
    .channel-table td:nth-child(5) { 
        display: none !important;
    } /* 총 조회수 숨김 */
    
    .channel-table th:nth-child(6),
    .channel-table td:nth-child(6) { 
        display: none !important;
    } /* 평균 조회수 숨김 */
    
    .channel-table th:nth-child(7),
    .channel-table td:nth-child(7) { 
        display: none !important;
    } /* 구독자수 숨김 */
}

/* 페이지네이션 스타일 */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9em;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 채널 페이지 전용 페이지네이션 버튼 */
.pagination-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9em;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    text-decoration: none;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn:disabled:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-color);
    transform: none;
}

/* Keywords Table Styles */
.keywords-table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.keywords-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    font-size: 0.95em;
}

.keywords-table th {
    background: var(--primary-color);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--secondary-color);
}

.keywords-table th:first-child {
    border-top-left-radius: var(--border-radius);
}

.keywords-table th:last-child {
    border-top-right-radius: var(--border-radius);
}

.keyword-row {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.keyword-row:hover {
    background: var(--bg-secondary);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(71, 85, 105, 0.1);
}

.keyword-row:last-child {
    border-bottom: none;
}

.keywords-table td {
    padding: 12px;
    vertical-align: middle;
}

.keyword-name-cell {
    font-weight: 600;
    min-width: 150px;
}

.keyword-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    background: rgba(71, 85, 105, 0.05);
    border: 1px solid rgba(71, 85, 105, 0.1);
    position: relative;
    overflow: hidden;
}

.keyword-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(71, 85, 105, 0.1), transparent);
    transition: left 0.5s ease;
}

.keyword-link:hover::before {
    left: 100%;
}

.keyword-link:hover {
    color: white;
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.2);
}

.keyword-link::after {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition);
    font-weight: bold;
    color: inherit;
}

.keyword-link:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.language-cell {
    text-align: center;
    min-width: 80px;
}

.language-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--bg-secondary);
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.count-cell, .views-cell, .avg-cell, .max-cell {
    text-align: right;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
}

.views-cell {
    font-weight: 600;
    color: var(--primary-color);
}

/* Filter Styles */
.filter-select, .filter-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9em;
    transition: var(--transition);
    min-width: 150px;
}

.filter-select:focus, .filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.1);
}

.filter-input::placeholder {
    color: var(--text-light);
}

/* Archive-specific styles */
.keyword-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.keyword-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.keyword-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.keyword-name {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.keyword-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.keyword-count,
.keyword-views,
.keyword-avg {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.summary-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-light);
}

.summary-item h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.summary-content {
    font-size: 0.95em;
    line-height: 1.5;
}

.summary-content strong {
    color: var(--text-primary);
}

.video-keyword-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 500;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.video-tag {
    background: var(--primary-color);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 500;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 키워드 검색 그리드 */
.keyword-search-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

/* 키워드 데이터 없음 메시지 */
.no-keyword-data {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-top: 15px;
}

.info-message {
    text-align: center;
    color: var(--text-secondary);
}

.info-message p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.info-message p:first-child {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

.keyword-search-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    font-size: 0.9em;
    font-weight: 500;
}

.keyword-search-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.keyword-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.keyword-search-tag:hover .keyword-count {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
}

.channel-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.channel-keyword-tag {
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
}

.nav-btn {
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    font-size: 0.9em;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.filter-select {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    font-size: 0.9em;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Responsive adjustments for archive styles */
/* 채널 카드 반응형 그리드 */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* 채널 카드 호버 효과 개선 */
.channel-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.channel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.channel-card:hover::before {
    opacity: 0.05;
}

/* 썸네일 이미지 스타일 */
.channel-thumbnail {
    transition: transform 0.3s ease;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.channel-thumbnail:hover {
    transform: scale(1.05);
}

/* 언어 플래그 스타일 */
.language-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8em;
}

/* 카테고리 태그 스타일 */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.category-tag {
    background: var(--primary-color-light);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-tag:hover {
    background: var(--primary-color);
    color: white;
}

/* 언어 선택기 스타일 */
.language-selector {
    position: relative;
    z-index: 1000;
}

/* 네비게이션 드롭다운 */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-dropdown-toggle:hover {
    background: var(--primary-color);
    color: white;
}

.nav-dropdown-toggle::after {
    content: "▼";
    font-size: 0.7em;
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.nav-dropdown-menu a:last-child {
    border-bottom: none;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
}

.language-dropdown {
    position: relative;
}

.language-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    font-weight: 500;
    min-width: 120px;
    justify-content: space-between;
}

.language-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.dropdown-arrow {
    font-size: 0.7em;
    transition: transform 0.2s ease;
}

.language-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
    margin-top: 4px;
}

.language-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 10px 15px;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9em;
    border-radius: 0;
}

.language-option:first-child {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.language-option:last-child {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.language-option:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.language-option:active {
    background: var(--primary-color);
    color: white;
}

/* 언어 버튼 스타일 - 2025-08-19 추가 */
.language-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.language-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
}

.language-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.language-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: var(--shadow-light);
}

.language-btn.active:hover {
    background: var(--success-color);
    border-color: var(--success-color);
}

/* 다국어 지원을 위한 폰트 설정 */
body.lang-ja {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', 'MS Gothic', sans-serif;
}

body.lang-en {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

body.lang-ko {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

/* 반응형 언어 선택기 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .language-selector {
        margin-top: 10px;
    }
    
    .language-btn {
        min-width: 100px;
        font-size: 0.8em;
        padding: 6px 10px;
    }
    
    .language-menu {
        min-width: 130px;
    }
}
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .channels-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .channels-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .keyword-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    /* 모바일에서 테이블 반응형 */
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select, .filter-input {
        width: 100%;
        min-width: unset;
    }
    
    .keywords-table {
        font-size: 0.85em;
    }
    
    .keywords-table th, .keywords-table td {
        padding: 8px 6px;
    }
    
    .keyword-name-cell {
        min-width: 120px;
    }
    
    .language-cell {
        min-width: 60px;
    }
    
    .count-cell, .views-cell, .avg-cell, .max-cell {
        min-width: 80px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-links {
        justify-content: center;
    }
}

/* 키워드 태그 스타일 - 2025-08-18 추가 */
.search-keywords {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.search-keyword-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    color: white;
    font-size: 0.75em;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    border: 1px solid transparent;
}

.search-keyword-tag:hover {
    background: linear-gradient(135deg, var(--success-color), var(--accent-color));
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.video-tags {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.video-tag {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.7em;
    font-weight: 400;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    transition: var(--transition);
}

.video-tag:hover {
    background: var(--primary-color-light);
    color: var(--text-primary);
}

/* 언어 필터 버튼 그룹 스타일 - 2025-08-18 추가 */
.language-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.language-filter-buttons .filter-btn {
    font-size: 0.85em;
    padding: 6px 10px;
    min-width: auto;
    white-space: nowrap;
}

/* 모바일 반응형 - 언어 필터 */
@media (max-width: 768px) {
    .language-filter-buttons {
        gap: 3px;
    }
    
    .language-filter-buttons .filter-btn {
        font-size: 0.8em;
        padding: 5px 8px;
    }
}

/* 새로운 필터 컨테이너 및 2줄 레이아웃 - 2025-08-19 추가 */
.filter-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.language-filter-row {
    justify-content: flex-start;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

/* 새로운 언어 필터 버튼 스타일 */
.lang-filter-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--border-radius);
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    color: var(--text-secondary);
    margin-right: 6px;
}

.lang-filter-btn:hover {
    background: var(--primary-color-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.lang-filter-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: var(--shadow-light);
}

.lang-filter-btn.active:hover {
    background: var(--success-color);
    border-color: var(--success-color);
}

/* 필터 반응형 디자인 */
@media (max-width: 768px) {
    .filter-row {
        gap: 10px;
        justify-content: flex-start;
    }
    
    .language-filter-row {
        padding: 10px 15px;
    }
    
    .lang-filter-btn {
        font-size: 0.8em;
        padding: 5px 10px;
        margin-right: 4px;
    }
}

/* 상단 네비게이션 언어 드롭다운 스타일 - 2025-08-19 업데이트 */
.nav-language-dropdown {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.nav-language-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: var(--border-radius);
    font-size: 0.85em;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    min-width: 120px;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
    padding-right: 30px;
}

.nav-language-select:hover {
    background-color: var(--primary-color-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.nav-language-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(71, 85, 105, 0.2);
}

/* 모바일 최적화 - 개행 방지 및 공간 최소화 */
@media (max-width: 768px) {
    .header {
        padding: 4px 10px;
        margin-bottom: 8px;
    }
    
    .header h1 {
        font-size: 1em;
        line-height: 1.1;
    }
    
    .nav {
        padding: 8px 0;
        margin-bottom: 15px;
    }
    
    .nav-container {
        padding: 0 10px;
        gap: 8px;
    }
    
    .nav-links {
        gap: 5px;
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    
    .nav-links a {
        padding: 5px 8px;
        font-size: 0.8em;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .nav-language-buttons {
        margin-left: 8px;
        gap: 2px;
        flex-shrink: 0;
    }
    
    .nav-language-dropdown {
        margin-left: 8px;
    }
    
    .nav-language-select {
        padding: 4px 8px;
        font-size: 0.8em;
        min-width: 100px;
        padding-right: 25px;
    }
    
    .container {
        padding: 15px 10px;
    }
}