/* ===== CSS Variables ===== */
:root {
    --primary: #8B5CF6;
    --primary-dark: #7C3AED;
    --primary-light: #A78BFA;
    --secondary: #EC4899;
    --secondary-dark: #DB2777;
    --accent: #F59E0B;
    --background: #0F0F1A;
    --surface: #1A1A2E;
    --surface-light: #252542;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --border: #334155;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s 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;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

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

h1, h2, h3, h4 {
    line-height: 1.3;
    font-weight: 700;
}

.hidden {
    display: none !important;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

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

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

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

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

.btn-amazon {
    background: #FF9900;
    color: #111;
}

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

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

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

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

.logo:hover {
    color: var(--text);
}

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

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

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
}

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

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

.nav-link:hover::after {
    width: 100%;
}

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

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

/* ===== Hero Section ===== */
.hero {
    padding: 140px 0 80px;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.15), transparent 70%);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.trust-badges {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.badge-icon {
    font-size: 1.2rem;
}

/* ===== Filter Section ===== */
.filter-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.filter-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    -webkit-overflow-scrolling: touch;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

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

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

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

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

.view-toggle {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.view-btn {
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

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

/* ===== Products Grid ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    background: var(--gradient);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 10;
}

.product-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
    font-size: 4rem;
}

.product-content {
    padding: 20px;
}

.product-level {
    display: inline-block;
    padding: 4px 10px;
    background: var(--surface-light);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.product-level.beginner { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.product-level.intermediate { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.product-level.advanced { background: rgba(239, 68, 68, 0.2); color: var(--error); }

.product-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.feature-tag {
    padding: 3px 8px;
    background: var(--surface-light);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 0.85rem;
}

.btn-compare {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
}

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

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

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

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.products-table th {
    background: var(--surface-light);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.products-table tr:hover {
    background: var(--surface-light);
}

.table-product-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-product-icon {
    font-size: 1.5rem;
}

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

.compare-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.compare-slot {
    min-height: 200px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

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

.compare-slot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.plus-icon {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.compare-slot:hover .plus-icon {
    border-color: var(--primary);
    color: var(--primary);
}

.compare-slot-filled {
    padding: 20px;
    text-align: center;
    width: 100%;
}

.remove-compare {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--error);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-product-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.compare-product-info .product-icon {
    font-size: 3rem;
}

.compare-product-info .product-name {
    font-weight: 600;
}

/* ===== Compare Table ===== */
.compare-table-container {
    margin-top: 30px;
    overflow-x: auto;
}

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

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

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

.compare-table .feature-label {
    text-align: left;
    font-weight: 500;
    color: var(--text-muted);
}

.compare-table .highlight {
    background: rgba(139, 92, 246, 0.1);
}

/* ===== Quiz Section ===== */
.quiz-section {
    padding: 60px 0;
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border);
}

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

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

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

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

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

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

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

.quiz-option {
    padding: 15px 20px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--primary);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

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

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

.quiz-result h3 {
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.recommendation-card {
    background: var(--surface-light);
    border-radius: var(--radius);
    padding: 30px;
    border: 2px solid var(--primary);
}

.recommendation-card .product-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.recommendation-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.recommendation-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.match-score {
    display: inline-block;
    padding: 8px 16px;
    background: var(--gradient);
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ===== Guide Section ===== */
.guide-section {
    padding: 60px 0;
    background: var(--surface);
}

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

.guide-card {
    background: var(--background);
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.guide-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

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

.guide-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.guide-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== SEO Content Section ===== */
.seo-content {
    padding: 60px 0;
}

.seo-content h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.seo-text {
    max-width: 900px;
    margin: 0 auto;
}

.seo-text p {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
    background: var(--surface);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}

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

.footer-brand p {
    color: var(--text-muted);
    margin-top: 15px;
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: 20px;
    color: var(--text);
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.affiliate-disclosure {
    font-size: 0.8rem !important;
    opacity: 0.7;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--surface-light);
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content h3 {
    margin-bottom: 20px;
}

.modal-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-product-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--surface-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.modal-product-item:hover {
    border-color: var(--primary);
}

.modal-product-item .product-icon {
    font-size: 2rem;
}

.modal-product-item .product-info {
    flex: 1;
}

.modal-product-item .product-name {
    font-weight: 600;
}

.modal-product-item .product-price {
    color: var(--success);
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid var(--border);
    }

    .nav.active {
        display: flex;
    }

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

    .hero {
        padding: 120px 0 60px;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .trust-badges {
        flex-direction: column;
        gap: 15px;
    }

    .filter-bar {
        justify-content: flex-start;
    }

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

    .compare-slot {
        min-height: 150px;
    }

    .quiz-container {
        padding: 25px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        max-width: 100%;
    }

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

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

@media (max-width: 480px) {
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .product-actions {
        flex-direction: column;
    }
}
