:root {
    --primary-blue: #3B82F6;
    --text-main: #111827;
    --text-gray: #6B7280;
    --bg-main: #FFFFFF;
    --bg-alt: #F9FAFB;
    --border-color: #E5E7EB;
    --badge-bg: #F3F4F6;
    --badge-text: #4B5563;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-main);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.25rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-arrow {
    font-size: 0.7rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.action-btn {
    color: var(--text-gray);
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.action-btn:hover {
    color: var(--text-main);
}

.lang-btn {
    color: #9CA3AF;
    font-size: 0.9rem;
    font-weight: 500;
    display: none; /* 暫時隱藏 */
}

.search-btn-box {
    background: #F3F4F6;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: background 0.2s;
}

.search-btn-box:hover {
    background: #E5E7EB;
}

.menu-btn {
    font-size: 1.25rem;
    color: #9CA3AF;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 992px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: flex !important;
    }
}

.compare-btn {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.compare-btn:hover {
    background-color: #2563EB;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem 2rem;
    background: var(--bg-main);
    border-top: 1px solid var(--border-color);
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 99;
}

.mobile-menu.active {
    display: flex;
}

.mobile-nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 500;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-link:last-of-type {
    border-bottom: none;
}

.mobile-compare-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 0.75rem;
    text-align: center;
}

.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero-section {
    display: flex;
    gap: 4rem;
    padding: 2rem 0 1rem;
    align-items: center;
    justify-content: space-between;
}

.hero-mascot {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mascot-wrapper {
    width: 350px;
    height: 350px;
}

.hero-trending {
    width: 450px;
}

.trending-header {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trending-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-main);
    gap: 1.25rem;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}

.trending-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.trending-icon {
    width: 32px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border-radius: 6px;
    color: var(--text-gray);
    font-size: 1.2rem;
}

.trending-info {
    flex: 1;
}

.trending-brand {
    font-size: 0.7rem;
    color: var(--text-gray);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.trending-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.trending-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: 500;
}

.trending-arrow {
    color: #D1D5DB;
}

/* Database Section */
.database-section {
    padding-top: 1rem;
}

.section-title {
    margin-bottom: 1.5rem;
}

.section-title h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-gray);
    font-size: 1rem;
}

.controls-bar {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    background: var(--bg-alt);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    align-items: center;
}

.search-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    flex: 1;
    max-width: 300px;
    margin-right: auto;
}

.custom-search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text-main);
    width: calc(100% - 24px); /* accounting for icon */
}

.custom-search-input::placeholder {
    color: var(--text-gray);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.custom-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.custom-select-wrapper select {
    appearance: none;
    background: transparent;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    padding-right: 1.5rem;
    cursor: pointer;
    outline: none;
}

.custom-select-wrapper i {
    position: absolute;
    right: 0;
    font-size: 0.7rem;
    pointer-events: none;
}


/* DataTable Customization */
.table-container {
    width: 100%;
}

.dataTables_wrapper .dataTables_filter {
    display: none; /* Hide default search since we have custom controls */
}

table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
    margin-top: 0 !important;
    table-layout: fixed !important;
}

table.dataTable tbody tr {
    height: 76px;
    transition: background-color 0.2s ease;
}

table.dataTable tbody tr:hover {
    background-color: var(--bg-alt);
}

table.dataTable thead th {
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 1rem 0.75rem !important;
    text-align: left;
    white-space: nowrap;
}

table.dataTable tbody td {
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0 0.75rem !important;
    font-size: 0.95rem;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 欄位寬度設定 (使用百分比與固定寬度混合，確保響應與專業排版) */
table.dataTable th:nth-child(1), table.dataTable td:nth-child(1) { width: 10%; min-width: 60px; } /* 品牌 */
table.dataTable th:nth-child(2), table.dataTable td:nth-child(2) { width: 20%; min-width: 120px; white-space: normal; } /* 型號 */
table.dataTable th:nth-child(3), table.dataTable td:nth-child(3) { width: 8%; min-width: 60px; } /* 年份 */
table.dataTable th:nth-child(4), table.dataTable td:nth-child(4) { width: 8%; min-width: 60px; } /* 評分 */
table.dataTable th:nth-child(5), table.dataTable td:nth-child(5) { width: 20%; min-width: 140px; } /* 處理器 */
table.dataTable th:nth-child(6), table.dataTable td:nth-child(6) { width: 12%; min-width: 80px; } /* 螢幕大小 */
table.dataTable th:nth-child(7), table.dataTable td:nth-child(7) { width: 8%; min-width: 60px; } /* 重量 */
table.dataTable th:nth-child(8), table.dataTable td:nth-child(8) { width: 14%; min-width: 80px; } /* 價格 */

/* 型號名稱支援換行並限制最多顯示兩行 */
table.dataTable td:nth-child(2) a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

table.dataTable.no-footer {
    border-bottom: none !important;
}

table.dataTable thead .sorting, 
table.dataTable thead .sorting_asc, 
table.dataTable thead .sorting_desc {
    background-image: none !important;
}

.fw-600 {
    font-weight: 600;
}

.text-gray {
    color: var(--text-gray);
}

.text-blue {
    color: var(--primary-blue);
}

/* Pagination Customization */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 1.5rem !important;
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-main) !important;
    font-weight: 500;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bg-alt) !important;
    color: var(--text-main) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary-blue) !important;
    color: white !important;
}

#device-detail-content {
    max-width: 960px;
    margin: 0 auto;
}
/* Footer styles */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
    background: var(--bg-main);
}
.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 4rem;
}
.footer-brand {
    max-width: 300px;
}
.footer-desc {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.footer-socials {
    display: flex;
    gap: 1rem;
}
.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s;
}
.social-icon:hover {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}
.footer-links {
    display: flex;
    gap: 4rem;
    flex: 1;
    justify-content: flex-end;
}
.link-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.link-column h4 {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.link-column a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
}
.link-column a:hover {
    color: var(--primary-blue);
}
.footer-bottom {
    max-width: 1280px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-gray);
    font-size: 0.85rem;
}
.footer-bottom-links {
    display: flex;
    gap: 2rem;
}
.footer-bottom-links a {
    color: var(--text-gray);
    text-decoration: none;
}

/* Device Detail specific styles */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}
.back-link:hover {
    color: var(--primary-blue);
}
.device-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}
.device-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.brand-pill {
    background: #EBF5FF;
    color: var(--primary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    width: max-content;
    text-transform: uppercase;
}
.device-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.device-name {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
}
.device-year {
    color: var(--text-gray);
    font-size: 1.25rem;
    font-weight: 600;
}

.device-quick-specs {
    display: flex;
    gap: 1rem;
}
.quick-spec-card {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 200px;
}
.quick-spec-icon {
    color: var(--primary-blue);
    background: #EBF5FF;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.quick-spec-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.quick-spec-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 600;
}
.quick-spec-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.specs-section {
    margin-bottom: 4rem;
}
.specs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.specs-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}
.spec-category {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.spec-category-title {
    background: #F8FAFC;
    color: var(--primary-blue);
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}
.spec-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}
.spec-row:last-child {
    border-bottom: none;
}
.spec-key {
    width: 200px;
    padding: 1.25rem 1.5rem;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.9rem;
    background: var(--bg-main);
}
.spec-value {
    flex: 1;
    padding: 1.25rem 1.5rem;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
    background: var(--bg-main);
}

.price-chart-section {
    margin-bottom: 4rem;
}
.price-chart-container {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
}

/* =========================================
   Responsive Web Design (Mobile First/Adjustments)
   ========================================= */

@media (max-width: 992px) {
    .hero-section {
        position: relative;
        flex-direction: column;
        gap: 2rem;
        padding-top: 0.5rem;
    }
    
    .hero-mascot {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        z-index: 0;
        opacity: 0.8;
        pointer-events: none;
    }
    
    .hero-trending {
        position: relative;
        z-index: 1;
        width: 100%;
        max-width: 100%;
    }
    
    /* 添加一點毛玻璃效果讓浮水印可以透過去又不會影響閱讀 */
    .trending-item {
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        padding: 0.65rem 1rem; /* 縮小上下 padding */
    }
    
    .trending-list {
        gap: 0.75rem; /* 縮小項目之間的距離 */
    }
    
    .trending-icon {
        height: 40px; /* 稍微縮小圖示高度 */
    }
    
    .trending-name {
        margin-bottom: 0.25rem; /* 縮小名稱下方的間距 */
    }
    
    .device-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* 在手機版縮小字體與內距，爭取更多顯示空間 */
    table.dataTable thead th {
        padding: 0.75rem 0.25rem !important;
        font-size: 0.75rem !important;
    }
    table.dataTable tbody td {
        padding: 0 0.25rem !important;
        font-size: 0.85rem !important;
    }

    /* 在手機版隱藏第 4 欄 (處理器) 和第 6 欄 (重量) */
    #devices-table th:nth-child(5),
    #devices-table td:nth-child(5),
    #devices-table th:nth-child(7),
    #devices-table td:nth-child(7) {
        display: none !important;
    }

    /* 重新分配手機版欄位寬度，確保重點資訊絕對不會被裁切 (總 min-width 控制在 360px 內，剛好塞進最小手機) */
    table.dataTable th:nth-child(1), table.dataTable td:nth-child(1) { width: 18% !important; min-width: 80px !important; text-overflow: clip !important; overflow: visible !important; } /* 品牌 */
    table.dataTable tbody td:nth-child(1) { font-size: 0.75rem !important; } /* 稍微縮小品牌字體以適應 SAMSUNG 等長單字 */
    table.dataTable th:nth-child(2), table.dataTable td:nth-child(2) { width: auto !important; min-width: 80px !important; } /* 型號 (自動換行) */
    table.dataTable th:nth-child(3), table.dataTable td:nth-child(3) { width: 10% !important; min-width: 50px !important; text-overflow: clip !important; overflow: visible !important; } /* 年份 */
    table.dataTable th:nth-child(4), table.dataTable td:nth-child(4) { width: 10% !important; min-width: 50px !important; text-overflow: clip !important; overflow: visible !important; } /* 評分 */
    table.dataTable th:nth-child(6), table.dataTable td:nth-child(6) { width: 18% !important; min-width: 70px !important; text-overflow: clip !important; overflow: visible !important; } /* 螢幕大小 */
    table.dataTable th:nth-child(8), table.dataTable td:nth-child(8) { width: 18% !important; min-width: 70px !important; text-overflow: clip !important; overflow: visible !important; } /* 價格 */

    /* Prevent table from causing page-wide horizontal scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    /* Controls Bar */
    .controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-group {
        max-width: none;
    }
    
    .control-group {
        justify-content: space-between;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 2rem;
        justify-content: flex-start;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    /* Device Detail */
    .device-name {
        font-size: 2.5rem;
    }
    
    .device-quick-specs {
        flex-wrap: wrap;
    }
    
    .quick-spec-card {
        width: calc(50% - 0.5rem);
    }
    
    .spec-row {
        flex-direction: column;
    }
    
    .spec-key {
        width: 100%;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-alt);
    }
    
    .spec-value {
        padding-top: 1rem;
    }
    
    /* Nav Adjustments (Keep minimal as requested) */
    .header-container {
        padding: 0 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .quick-spec-card {
        width: 100%;
    }
}

/* Global Search Components */
.global-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-box {
    background: #F3F4F6;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: var(--text-gray);
    transition: background 0.2s, width 0.3s, box-shadow 0.3s;
    width: 200px;
}

.search-input-box:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px var(--primary-blue);
    width: 280px;
}

.search-icon {
    font-size: 14px;
    margin-right: 8px;
    color: #9CA3AF;
}

#global-search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

#global-search-input::placeholder {
    color: #9CA3AF;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid #E5E7EB;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #F3F4F6;
    text-decoration: none;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #F9FAFB;
}

.suggestion-icon {
    color: #9CA3AF;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.suggestion-info {
    display: flex;
    flex-direction: column;
}

.suggestion-brand {
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 600;
    text-transform: uppercase;
}

.suggestion-name {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

@media (max-width: 992px) {
    .search-input-box {
        width: 160px;
    }
    .search-input-box:focus-within {
        width: 220px;
    }
}

@media (max-width: 576px) {
    .search-input-box {
        width: 140px;
    }
    .search-input-box:focus-within {
        width: 180px;
    }
    .search-suggestions {
        width: 280px;
        right: -40px;
    }
}

/* Advanced Filters */
.advanced-filters {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}
.filter-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
}
.filter-row:last-of-type {
    margin-bottom: 0;
}
.filter-label {
    min-width: 60px;
    font-weight: 600;
    color: var(--text-gray);
    padding-top: 0.5rem;
}
.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}
.filter-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}
.filter-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.filter-btn.active {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}
.custom-year-select {
    appearance: none;
    padding-right: 2rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
}
.custom-year-select.active {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}
.custom-year-select option {
    background-color: var(--bg-main);
    color: var(--text-main);
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    .filter-label {
        padding-top: 0;
    }
}

/* Filter Modal */
.main-filter-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.main-filter-btn:hover {
    background: var(--bg-alt);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.filter-count {
    background: var(--primary-blue);
    color: white;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
    font-weight: bold;
}
.filter-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}
.filter-modal-overlay.show {
    display: flex;
    animation: fadeIn 0.2s;
}
.filter-modal-content {
    background: var(--bg-main);
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: slideUp 0.3s;
}
.filter-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.filter-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}
.close-filter-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-gray);
    cursor: pointer;
}
.close-filter-btn:hover {
    color: var(--text-main);
}
.filter-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}
.filter-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}
.reset-filter-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
}
.reset-filter-btn:hover {
    background: #E5E7EB;
}
.apply-filter-btn {
    background: var(--primary-blue);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: white;
    cursor: pointer;
}
.apply-filter-btn:hover {
    background: #2563EB;
}

@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Brand Colors */
.brand-apple { color: #555555; }
.brand-samsung { color: #034EA2; }
.brand-google { color: #4285F4; }
.brand-oppo { color: #006633; }
.brand-vivo { color: #415FFF; }
.brand-xiaomi { color: #FF6900; }
.brand-asus { color: #00539B; }
.brand-sony { color: #333333; }
.brand-huawei { color: #CF0A2C; }
.brand-realme { color: #E6B100; }
.brand-motorola { color: #5C92FA; }
.brand-oneplus { color: #F5010C; }
.brand-poco { color: #D4B000; }
.brand-honor { color: #333333; }
.brand-nokia { color: #124191; }
.brand-htc { color: #00A34F; }
.brand-lg { color: #A50034; }
.brand-lenovo { color: #E2231A; }
.brand-rog { color: #FF0000; }
.brand-zte { color: #006098; }
.brand-meizu { color: #00B4FF; }
