/* ===== CSS Variables ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --danger: #ef4444;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-dark: #f3f4f6;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

img {
    max-width: 100%;
    height: auto;
}

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

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

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

.logo-au {
    color: var(--primary);
}

.nav ul {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--text);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    padding: 80px 0;
}

.hero-content {
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-success {
    background: var(--secondary);
    color: white;
}

.btn-success:hover {
    background: var(--secondary-dark);
    color: white;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.trust-icon {
    color: var(--secondary);
    font-weight: bold;
}

/* ===== Stats Section ===== */
.stats {
    background: var(--bg);
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== Filter Section ===== */
.filter-section {
    padding: 60px 0 30px;
}

.filter-section h2 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.filter-group select {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    min-width: 140px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.view-toggle {
    display: flex;
    gap: 4px;
    margin-left: auto;
    background: white;
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.view-btn {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-light);
    transition: var(--transition);
}

.view-btn:hover {
    color: var(--primary);
}

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

/* ===== Products Section ===== */
.products-section {
    padding: 30px 0 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-best {
    background: var(--secondary);
    color: white;
}

.badge-popular {
    background: var(--accent);
    color: white;
}

.badge-value {
    background: var(--primary);
    color: white;
}

.badge-tga {
    background: #166534;
    color: white;
}

.product-image {
    position: relative;
    padding: 24px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.product-image-placeholder {
    font-size: 5rem;
    opacity: 0.9;
}

.product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-type {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

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

.stars {
    color: var(--accent);
    font-size: 0.9rem;
}

.rating-text {
    color: var(--text-light);
    font-size: 0.85rem;
}

.product-features {
    margin-bottom: 16px;
    flex: 1;
}

.product-features li {
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.product-price-note {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 400;
}

.product-cta {
    display: flex;
    gap: 8px;
}

.btn-amazon {
    background: #ff9900;
    color: #111;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius);
}

.btn-amazon:hover {
    background: #e88a00;
    color: #111;
    transform: translateY(-1px);
}

.btn-compare {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-compare:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-compare.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== Table View ===== */
.products-table-wrapper {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.products-table th,
.products-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.products-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.products-table tr:hover {
    background: var(--bg-alt);
}

.products-table .product-title {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.table-features {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== Compare Section ===== */
.compare-section {
    padding: 80px 0;
    background: var(--bg-alt);
}

.compare-section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
}

.compare-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.compare-slot {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
}

.compare-select {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.compare-select:focus {
    outline: none;
    border-color: var(--primary);
}

.compare-table-wrapper {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.compare-table th,
.compare-table td {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.compare-table th {
    background: var(--bg-alt);
    font-weight: 600;
}

.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    font-weight: 500;
    background: var(--bg-alt);
    min-width: 150px;
}

.compare-table td {
    vertical-align: middle;
}

.compare-check {
    color: var(--secondary);
    font-size: 1.25rem;
}

.compare-cross {
    color: var(--text-lighter);
    font-size: 1.25rem;
}

/* ===== Quiz Section ===== */
.quiz-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-xl);
}

.quiz-header {
    text-align: center;
    margin-bottom: 32px;
}

.quiz-header h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.quiz-header p {
    color: var(--text-light);
}

.quiz-progress {
    margin-bottom: 32px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-dark);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 50px;
    transition: width 0.3s ease;
    width: 25%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

.quiz-question {
    margin-bottom: 24px;
}

.quiz-question h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    display: block;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.quiz-option input {
    display: none;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

.quiz-result {
    text-align: center;
}

.quiz-result h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--secondary);
}

.quiz-result-card {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 24px 0;
}

.quiz-result-card h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.quiz-result-card p {
    color: var(--text-light);
    margin-bottom: 16px;
}

/* ===== Guide Section ===== */
.guide-section {
    padding: 80px 0;
}

.guide-section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 8px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.guide-card {
    background: var(--bg-alt);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.guide-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.guide-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.guide-card p {
    color: var(--text-light);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.guide-card ul {
    margin-left: 20px;
}

.guide-card li {
    list-style: disc;
    color: var(--text-light);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* ===== FAQ Section ===== */
.faq-section {
    padding: 80px 0;
    background: var(--bg-alt);
}

.faq-section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 48px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    color: var(--text);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-alt);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== SEO Section ===== */
.seo-section {
    padding: 80px 0;
    background: white;
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 1.75rem;
    margin-bottom: 24px;
    color: var(--text);
}

.seo-content h3 {
    font-size: 1.25rem;
    margin: 32px 0 16px;
    color: var(--text);
}

.seo-content p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.seo-content ul {
    margin: 16px 0 16px 24px;
}

.seo-content li {
    list-style: disc;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.7;
}

.seo-content em {
    color: var(--text-lighter);
    font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
    background: #111827;
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col p {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: white;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #9ca3af;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid #374151;
    text-align: center;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.affiliate-disclosure {
    max-width: 600px;
    margin: 16px auto 0;
    font-size: 0.8rem !important;
    color: #6b7280 !important;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .compare-selector {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header .container {
        height: 60px;
    }

    .nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--border);
        padding: 20px;
        box-shadow: var(--shadow);
    }

    .nav.active {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
    }

    .nav li {
        border-bottom: 1px solid var(--border);
    }

    .nav a {
        display: block;
        padding: 16px 0;
    }

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

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-trust {
        flex-direction: column;
        gap: 12px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group select {
        width: 100%;
    }

    .view-toggle {
        margin-left: 0;
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .quiz-container {
        padding: 32px 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .section-subtitle,
    .filter-section h2,
    .compare-section h2,
    .guide-section h2,
    .faq-section h2 {
        font-size: 1.5rem;
    }

    .product-card {
        margin: 0 -10px;
        border-radius: 0;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease forwards;
}

.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }
.product-card:nth-child(6) { animation-delay: 0.5s; }

/* ===== Print Styles ===== */
@media print {
    .header,
    .hero,
    .filter-section,
    .compare-section,
    .quiz-section,
    .back-to-top,
    .footer {
        display: none;
    }

    .products-grid {
        display: block;
    }

    .product-card {
        page-break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
