/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #FF9900;
    --color-primary-dark: #E88A00;
    --color-secondary: #146EB4;
    --color-text: #0F1111;
    --color-text-light: #565959;
    --color-border: #D5D9D9;
    --color-bg: #FFFFFF;
    --color-bg-light: #F7F8F8;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --max-width: 1200px;
    --border-radius: 8px;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Header */
.site-header {
    background-color: var(--color-text);
    color: white;
    padding: var(--spacing-sm) 0;
    border-bottom: 3px solid var(--color-primary);
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Main content */
.site-main {
    min-height: 60vh;
    padding: var(--spacing-lg) 0;
}

/* Hero section */
.hero {
    padding: var(--spacing-lg) var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-lg);
}

.hero-top {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.hero h1 {
    font-size: 1.75rem;
    margin-bottom: 0.3rem;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 0.4rem;
}

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

.hero-disclosure a {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
}

.hero-disclosure a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-secondary:hover {
    background-color: #0F5A94;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Selector grid (inside hero) */
.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.6rem;
}

.selector-card {
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.15s;
}

.selector-card:hover {
    border-color: var(--color-primary);
    background-color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.selector-card-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
    color: var(--color-secondary);
    line-height: 1.2;
}

.selector-heading {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: var(--spacing-sm);
    font-weight: 400;
}

.selector-card p {
    color: var(--color-text-light);
    font-size: 0.75rem;
    margin: 0;
}

/* Category sections */
.category-section {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--color-border);
}

.category-header {
    margin-bottom: var(--spacing-lg);
}

.category-header h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.category-description {
    color: var(--color-text-light);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

.category-cta {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: var(--spacing-sm);
}

.category-cta:hover {
    text-decoration: underline;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.product-title a {
    color: var(--color-secondary);
    text-decoration: none;
}

.product-title a:hover {
    text-decoration: underline;
}

.product-bullets {
    list-style-position: inside;
    margin-bottom: var(--spacing-sm);
    flex-grow: 1;
}

.product-bullets li {
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-light);
}

.product-good-for {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-xs);
    background-color: var(--color-bg-light);
    border-radius: 4px;
}

/* Buyer's guide */
.buyers-guide {
    margin-bottom: var(--spacing-xl);
}

.buyers-guide h2 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.guide-item {
    background-color: var(--color-bg-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--color-primary);
}

.guide-item h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-secondary);
}

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

/* FAQ */
.faq {
    margin-bottom: var(--spacing-xl);
}

.faq h2 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

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

.faq-item {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
}

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

.faq-item h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
}

.faq-item p {
    color: var(--color-text-light);
}

/* Content pages (disclosure, privacy, about) */
.content-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.content-page h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.content-page h2 {
    font-size: 1.5rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.content-page p, .content-page ul {
    margin-bottom: var(--spacing-md);
}

.content-page ul {
    padding-left: var(--spacing-lg);
}

.content-page li {
    margin-bottom: var(--spacing-xs);
}

.content-page a {
    color: var(--color-secondary);
}

.content-page a:hover {
    text-decoration: underline;
}

.last-updated {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

/* Footer */
.site-footer {
    background-color: var(--color-text);
    color: white;
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    text-align: center;
}

.footer-disclosure {
    background-color: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.footer-nav a {
    color: white;
    text-decoration: none;
}

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

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Comparison tables */
.comparison-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

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

.comparison-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.comparison-table th {
    background-color: var(--color-text);
    color: white;
    padding: 0.75rem 0.6rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.comparison-table th:first-child {
    border-radius: var(--border-radius) 0 0 0;
}

.comparison-table th:last-child {
    border-radius: 0 var(--border-radius) 0 0;
}

.comparison-table td {
    padding: 0.6rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    max-width: 160px;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: var(--color-bg-light);
}

.comparison-table tbody tr:hover {
    background-color: #EBF5FF;
}

.comparison-table .col-product {
    min-width: 180px;
    max-width: 240px;
}

.comparison-table .col-action {
    white-space: nowrap;
    text-align: center;
}

.comparison-table .product-link {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: block;
    line-height: 1.3;
}

.comparison-table .product-link:hover {
    text-decoration: underline;
}

.comparison-table .good-for {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
    font-style: italic;
}

.comparison-table .check {
    color: #067D62;
    font-weight: 700;
    font-size: 1.1rem;
}

.comparison-table .dash {
    color: var(--color-text-light);
}

.comparison-toggle {
    display: block;
    margin: var(--spacing-sm) auto 0;
    padding: 0.5rem 1.5rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-secondary);
    font-weight: 600;
    transition: all 0.2s;
}

.comparison-toggle:hover {
    background-color: var(--color-border);
}

/* Responsive design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.4rem;
    }

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

    .selector-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.5rem;
    }

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

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

    .nav-links {
        gap: var(--spacing-sm);
    }

    .site-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Comparison table: sticky first column on mobile */
    .comparison-table .col-product {
        position: sticky;
        left: 0;
        z-index: 1;
        background-color: white;
        border-right: 2px solid var(--color-border);
        min-width: 150px;
    }

    .comparison-table tbody tr:nth-child(even) .col-product {
        background-color: var(--color-bg-light);
    }

    .comparison-table tbody tr:hover .col-product {
        background-color: #EBF5FF;
    }

    .comparison-table th:first-child {
        position: sticky;
        left: 0;
        z-index: 3;
        border-right: 2px solid rgba(255, 255, 255, 0.2);
    }

    .comparison-table td {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    .comparison-table th {
        font-size: 0.7rem;
        padding: 0.6rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: var(--spacing-sm);
    }

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

    .btn-large {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

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

/* ===== Phase 2: Expandable Full Specs Panel ===== */
.product-name-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
}

.specs-toggle-btn {
    flex-shrink: 0;
    width: 1.4rem;
    height: 1.4rem;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    background: var(--color-bg-light);
    color: var(--color-secondary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    font-weight: 700;
    transition: background 0.15s;
}

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

.specs-detail-row td {
    padding: 0.75rem 1rem !important;
    background: #f0f4f8;
}

.extra-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.25rem 1.5rem;
    font-size: 0.82rem;
    margin: 0;
}

.extra-specs-grid dt {
    font-weight: 600;
    color: var(--color-text);
    grid-column: 1;
}

.extra-specs-grid dd {
    color: var(--color-text-light);
    margin: 0;
}

/* Pair dt/dd side by side */
.extra-specs-grid dt,
.extra-specs-grid dd {
    display: inline;
}

.extra-specs-grid dt::after {
    content: ': ';
}

/* Use a flex-wrap approach for dt+dd pairs */
.extra-specs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1.5rem;
}

.extra-specs-grid dt {
    margin: 0;
}

.extra-specs-grid dd {
    margin: 0 0.75rem 0 0;
}

/* ===== Phase 3: Best-in-Class Badges ===== */
.badge-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.2rem;
}

.badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.12rem 0.4rem;
    border-radius: 3px;
    line-height: 1.3;
}

.badge-best-price {
    background: #d4edda;
    color: #155724;
}

.badge-top-rated {
    background: #fff3cd;
    color: #856404;
}

.badge-most-reviewed {
    background: #d1ecf1;
    color: #0c5460;
}

/* ===== Phase 4: Dark Hero + Neon LED Text ===== */
:root {
    --neon-cyan: #00f0ff;
    --neon-pink: #ff2d95;
    --neon-yellow: #ffe44d;
    --neon-orange: #ff9900;
}

.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563a0 50%, #1e3a5f 100%);
    padding: var(--spacing-lg) var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-lg);
}

.hero-top {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.neon-title {
    color: #fff;
    font-size: 1.75rem;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
    text-shadow:
        0 0 7px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 42px rgba(0, 240, 255, 0.4),
        0 0 80px rgba(0, 240, 255, 0.15);
    animation: neon-flicker 4s ease-in-out infinite;
}

@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.85; }
    94% { opacity: 1; }
    96% { opacity: 0.9; }
    97% { opacity: 1; }
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.75);
}

.hero-disclosure {
    color: rgba(255, 255, 255, 0.55);
}

.hero-disclosure a {
    color: var(--neon-cyan);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

/* Selector cards: glassmorphism on dark hero */
.selector-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
}

.selector-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
}

.selector-card-title {
    color: var(--neon-cyan);
}

.selector-card p {
    color: rgba(255, 255, 255, 0.6);
}

/* Neon logo glow */
.neon-logo {
    text-shadow:
        0 0 5px var(--neon-orange),
        0 0 15px rgba(255, 153, 0, 0.3);
    transition: text-shadow 0.3s;
}

.neon-logo:hover {
    text-shadow:
        0 0 7px var(--neon-orange),
        0 0 25px rgba(255, 153, 0, 0.5);
}

/* ===== Phase 5: SVG Mascot "Lumi" ===== */
.mascot-container {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.mascot-container svg {
    filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.4));
}

@keyframes mascot-glow {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

@keyframes arm-wave-left {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(10deg); }
}

@keyframes arm-wave-right {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-10deg); }
}

.mascot-glow {
    animation: mascot-glow 2.5s ease-in-out infinite;
    transform-origin: center;
}

.mascot-arm-left {
    animation: arm-wave-left 2s ease-in-out infinite;
    transform-origin: 58px 80px;
}

.mascot-arm-right {
    animation: arm-wave-right 2s ease-in-out infinite 0.3s;
    transform-origin: 82px 80px;
}

/* ===== Phase 6: LED Chaser Light Borders ===== */
.category-header.led-border {
    position: relative;
    padding-top: 0.5rem;
}

.category-header.led-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--neon-pink) 0px,
        var(--neon-pink) 4px,
        transparent 4px,
        transparent 8px,
        var(--neon-cyan) 8px,
        var(--neon-cyan) 12px,
        transparent 12px,
        transparent 16px,
        var(--neon-yellow) 16px,
        var(--neon-yellow) 20px,
        transparent 20px,
        transparent 24px
    );
    background-size: 200% 100%;
    animation: led-chase 1.5s linear infinite;
}

@keyframes led-chase {
    0% { background-position: 0% 0; }
    100% { background-position: -24px 0; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    .neon-title { animation: none; }
    .mascot-glow { animation: none; opacity: 0.5; }
    .mascot-arm-left, .mascot-arm-right { animation: none; }
    .category-header.led-border::before { animation: none; }
}

/* ===== Dark hero responsive overrides ===== */
@media (max-width: 768px) {
    .neon-title {
        font-size: 1.4rem;
    }

    .comparison-table .col-product {
        background-color: white;
    }

    .comparison-table tbody tr:nth-child(even) .col-product {
        background-color: var(--color-bg-light);
    }

    .comparison-table tbody tr:hover .col-product {
        background-color: #EBF5FF;
    }

    .mascot-container svg {
        width: 80px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .neon-title {
        font-size: 1.25rem;
    }
}
