/* ===== CSS Variables ===== */
:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary: #0F172A;
    --accent: #F59E0B;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

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

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

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-amazon {
    background: #FF9900;
    color: var(--gray-900);
}

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--gray-200);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

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

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition);
}

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

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

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

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    padding: 8rem 1.5rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 640px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 520px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
}

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

.hero-visual {
    flex: 1;
    position: relative;
    min-height: 400px;
    display: none;
}

.floating-card {
    position: absolute;
    padding: 1.5rem 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    font-weight: 600;
    color: var(--gray-800);
    animation: float 3s ease-in-out infinite;
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 45%;
    right: 10%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 20%;
    left: 25%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== View Toggle Section ===== */
.view-toggle-section {
    padding: 4rem 0 2rem;
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--gray-600);
}

.view-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

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

.view-buttons {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-500);
}

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

/* ===== Products Section ===== */
.products-section {
    padding: 2rem 0 4rem;
    background: var(--gray-50);
}

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

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.product-image {
    position: relative;
    height: 240px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-emoji {
    font-size: 6rem;
    filter: grayscale(20%);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.product-badge.sale {
    background: var(--error);
}

.product-badge.new {
    background: var(--success);
}

.product-info {
    padding: 1.25rem;
}

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

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

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

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

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

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

.price-original {
    font-size: 0.875rem;
    color: var(--gray-400);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    padding: 0.625rem;
    font-size: 0.8125rem;
}

.compare-btn {
    flex: 0 0 auto !important;
    padding: 0.625rem !important;
}

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

/* ===== Products Table ===== */
.products-table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

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

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

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

.products-table tr:hover {
    background: var(--gray-50);
}

.table-product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.table-product-name {
    font-weight: 500;
    color: var(--gray-800);
}

.table-stars {
    color: var(--accent);
}

/* ===== Quiz Section ===== */
.quiz-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: 3rem;
}

.quiz-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.quiz-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.quiz-header p {
    color: var(--gray-400);
}

.quiz-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
}

.quiz-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

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

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

.quiz-question h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

.quiz-options {
    display: grid;
    gap: 0.75rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

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

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.quiz-option-icon {
    font-size: 1.5rem;
}

.quiz-option-text {
    font-weight: 500;
    color: var(--gray-700);
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.quiz-result {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.quiz-result h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.quiz-result p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.result-products {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    gap: 1rem;
}

.result-product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.result-product-emoji {
    font-size: 2rem;
}

.result-product-name {
    font-weight: 500;
    color: var(--gray-800);
}

.result-product-price {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ===== Compare Section ===== */
.compare-section {
    padding: 6rem 0;
    background: var(--white);
}

.compare-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.compare-slot {
    min-height: 300px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.compare-slot.filled {
    border-style: solid;
    border-color: var(--primary);
    background: var(--white);
}

.compare-slot-empty {
    text-align: center;
    color: var(--gray-400);
}

.plus-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.compare-slot-empty p {
    margin-bottom: 1rem;
}

.compare-slot-content {
    padding: 1.5rem;
    text-align: center;
    width: 100%;
}

.compare-slot-content .product-image-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.compare-slot-content .product-name {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.compare-slot-content .product-price {
    justify-content: center;
    margin-bottom: 1rem;
}

.compare-remove-btn {
    background: var(--gray-100);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.compare-remove-btn:hover {
    background: var(--error);
    color: var(--white);
}

.compare-table-container {
    overflow-x: auto;
    margin-top: 2rem;
}

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

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

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

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

.compare-actions {
    text-align: center;
    margin-top: 1.5rem;
}

/* ===== SEO Section ===== */
.seo-section {
    padding: 6rem 0;
    background: var(--gray-50);
}

.seo-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    text-align: center;
    margin-bottom: 3rem;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.seo-block {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.seo-block h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.seo-block p {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.seo-block p:last-child {
    margin-bottom: 0;
}

.seo-cta {
    text-align: center;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.seo-cta h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.seo-cta p {
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.seo-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Footer ===== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 4rem 0 2rem;
}

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

.footer-brand p {
    margin-top: 1rem;
    line-height: 1.7;
}

.footer-brand .logo {
    color: var(--white);
}

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

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: var(--transition);
}

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

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

.affiliate-disclosure {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-800);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== Responsive ===== */
@media (min-width: 1024px) {
    .hero-visual {
        display: block;
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--gray-200);
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

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

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

    .hero {
        padding-top: 6rem;
        min-height: auto;
    }

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

    .hero-stats {
        gap: 2rem;
    }

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

    .filter-group {
        justify-content: space-between;
    }

    .view-buttons {
        justify-content: center;
    }

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

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

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

    .quiz-content {
        padding: 1.5rem;
    }

    .quiz-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }

    .quiz-navigation .btn {
        width: 100%;
    }
}

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

    .hero-cta .btn {
        width: 100%;
    }

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

    .section-header h2 {
        font-size: 1.5rem;
    }
}
