/* CSS Variables */
:root {
    --primary: #0066cc;
    --primary-dark: #0052a3;
    --primary-light: #e6f0fa;
    --secondary: #00a86b;
    --accent: #ff6b35;
    --dark: #1a1a2e;
    --gray-900: #2d2d44;
    --gray-700: #4a4a68;
    --gray-500: #6b6b8a;
    --gray-300: #a0a0b8;
    --gray-100: #f0f0f5;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

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

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

.btn-amazon {
    background: linear-gradient(135deg, #ff9900, #e68a00);
    color: var(--dark);
    font-weight: 700;
}

.btn-amazon:hover {
    background: linear-gradient(135deg, #ffad33, #ff9900);
    transform: translateY(-2px);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

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

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

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

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

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

.nav-links a: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: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f7ff 50%, #fff5f0 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(0, 102, 204, 0.1) 0%, transparent 70%);
}

.hero-content {
    text-align: center;
    padding: 60px 20px;
}

.hero-title {
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto 40px;
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

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

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header p {
    color: var(--gray-500);
    max-width: 600px;
    margin: 16px auto 0;
}

/* Quiz Section */
.quiz-section {
    padding: 100px 0;
    background: var(--gray-100);
}

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

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

.progress-bar {
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 25%;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.quiz-question h3 {
    text-align: center;
    margin-bottom: 30px;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.quiz-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.quiz-option:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.option-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.option-text {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.option-desc {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.quiz-results {
    display: none;
    text-align: center;
}

.quiz-results.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.quiz-results h3 {
    margin-bottom: 16px;
}

.results-intro {
    color: var(--gray-500);
    margin-bottom: 30px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

#restartQuiz {
    margin-top: 20px;
}

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

.filters {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
}

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

.filter-group label {
    font-weight: 500;
    color: var(--gray-700);
    white-space: nowrap;
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.view-toggle {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.view-btn {
    padding: 10px;
    background: var(--white);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gray-500);
    transition: var(--transition);
}

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

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

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

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

.product-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--gray-100), var(--white));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    overflow: hidden;
}

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

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

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

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

.product-content {
    padding: 24px;
}

.product-brand {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.spec-tag {
    padding: 4px 10px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--gray-700);
}

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

.stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.product-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray-500);
}

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

/* Product Table */
.products-table-container {
    overflow-x: auto;
}

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

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

.products-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
}

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

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

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

.table-product-info {
    display: flex;
    flex-direction: column;
}

.table-product-name {
    font-weight: 600;
    color: var(--dark);
}

.table-product-brand {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.hidden {
    display: none !important;
}

/* Compare Section */
.compare-section {
    padding: 100px 0;
    background: var(--gray-100);
}

.compare-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.compare-slot {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.compare-select {
    padding: 14px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

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

.compare-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    min-height: 300px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.compare-placeholder {
    color: var(--gray-500);
    text-align: center;
}

.compare-card-filled {
    justify-content: flex-start;
    align-items: stretch;
}

.compare-card-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 20px;
}

.compare-card-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.compare-card-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.compare-card-brand {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.compare-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 12px;
}

.compare-card-specs {
    flex: 1;
}

.compare-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.compare-spec-label {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.compare-spec-value {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.compare-card-action {
    margin-top: 20px;
}

.compare-card-action .btn {
    width: 100%;
}

.compare-table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
}

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

.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--gray-100);
}

.compare-table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.compare-table th:first-child {
    background: var(--gray-100);
    color: var(--dark);
}

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

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

.guide-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

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

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

.guide-card h3 {
    margin-bottom: 12px;
}

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

/* SEO Section */
.seo-section {
    padding: 80px 0;
    background: var(--gray-100);
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.seo-content h2 {
    margin-bottom: 24px;
    color: var(--dark);
}

.seo-content h3 {
    margin: 32px 0 16px;
    color: var(--dark);
}

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

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

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 80px 0 40px;
}

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

.footer-brand p {
    margin-top: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links a {
    color: var(--gray-300);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--gray-700);
    text-align: center;
    font-size: 0.85rem;
}

.affiliate-disclosure {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Responsive Design */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

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

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

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

    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }

    .hero-stats {
        gap: 30px;
    }

    .quiz-container {
        padding: 24px;
    }

    .quiz-options {
        grid-template-columns: 1fr;
    }

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

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

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

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

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

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

    .seo-content {
        padding: 32px 24px;
    }

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

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

    .btn-buy {
        width: 100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus styles */
a:focus, button:focus, select:focus, input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header, .hero-cta, .quiz-section, .filters, .compare-section, .footer {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}
