/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Color Palette - Automotive/Mechanical Theme */
    --primary: #dc2626; /* Racing Red */
    --primary-dark: #b91c1c;
    --primary-light: #fef2f2;
    --secondary: #f59e0b; /* Amber/Gold */
    --accent: #3b82f6; /* Chrome Blue */
    --success: #10b981; /* Green */
    --warning: #fbbf24;
    --danger: #ef4444;

    /* Neutrals - Light Mode */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Shadows */
    --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);
}

[data-theme="dark"] {
    /* Neutrals - Dark Mode (enhanced contrast) */
    --gray-50: #111827;   /* Very dark - main backgrounds */
    --gray-100: #1f2937;  /* Dark - cards, sections */
    --gray-200: #374151;  /* Dark gray - borders, dividers */
    --gray-300: #4b5563;  /* Medium-dark */
    --gray-400: #6b7280;  /* Medium */
    --gray-500: #9ca3af;  /* Medium-light - secondary text */
    --gray-600: #d1d5db;  /* Light - borders, disabled */
    --gray-700: #e5e7eb;  /* Lighter */
    --gray-800: #f3f4f6;  /* Very light - light text */
    --gray-900: #ffffff;  /* Pure white - primary text */

    /* Shadows for Dark Mode */
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #1e40af 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 0;
    line-height: 1.6;
    color: var(--gray-800);
    position: relative;
    transition: background 0.3s ease;
}

/* Container spacing for header */
.container {
    margin-top: 0;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0a1628 0%, #1a2d45 50%, #0f2340 100%);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   PREMIUM HEADER - EQUIVA-PNEUS
   ============================================ */

.hero-header {
    width: 100%;
    min-height: 380px;
    background: radial-gradient(ellipse at center top, #1a4a6e 0%, #0f2d4a 40%, #0a1a2e 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 1.5rem;
    transition: all 0.3s ease;
}

/* Subtle animated particles background */
.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(74, 158, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(74, 158, 255, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 50% 80%, rgba(74, 158, 255, 0.04) 0%, transparent 30%);
    pointer-events: none;
    animation: floatParticles 20s ease-in-out infinite;
}

@keyframes floatParticles {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.7; transform: translateY(-10px); }
}

.header-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    width: 100%;
}

/* Logo container with glow */
.logo-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoFloat 6s ease-in-out infinite;
}

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

.premium-logo {
    filter: drop-shadow(0 0 20px rgba(74, 158, 255, 0.4));
    transition: filter 0.3s ease;
}

.premium-logo:hover {
    filter: drop-shadow(0 0 30px rgba(74, 158, 255, 0.6));
}

/* Main title */
.main-title {
    font-family: 'Oswald', 'Barlow Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 72px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f3f4f6;
    text-shadow:
        0 0 10px rgba(74, 158, 255, 0.8),
        0 0 20px rgba(74, 158, 255, 0.5),
        0 0 30px rgba(74, 158, 255, 0.3),
        2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    text-align: center;
    line-height: 1.1;
    animation: titleGlow 4s ease-in-out infinite;
    position: relative;
}

/* Subtle word reveal animation */
.main-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
    animation: underlinePulse 3s ease-in-out infinite;
}

@keyframes underlinePulse {
    0%, 100% {
        width: 60%;
        opacity: 0.7;
    }
    50% {
        width: 80%;
        opacity: 1;
    }
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(74, 158, 255, 0.8),
            0 0 20px rgba(74, 158, 255, 0.5),
            0 0 30px rgba(74, 158, 255, 0.3),
            2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow:
            0 0 8px rgba(74, 158, 255, 0.5),
            0 0 16px rgba(74, 158, 255, 0.3),
            0 0 24px rgba(74, 158, 255, 0.15),
            2px 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Taglines */
.tagline-line {
    font-family: 'Oswald', 'Barlow Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 28px;
    font-weight: 500;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
    text-align: center;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Decorative ruler/gauge line */
.decorative-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 600px;
}

.ruler-left,
.ruler-right {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #9ca3af, transparent);
    max-width: 80px;
    position: relative;
}

.ruler-right {
    transform: rotate(180deg);
}

.gauge {
    display: flex;
    gap: 3px;
    padding: 0 0.5rem;
}

.gauge span {
    display: block;
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, #9ca3af 0%, #6b7280 100%);
    border-radius: 1px;
    opacity: 0.7;
}

.gauge span:nth-child(odd) {
    height: 14px;
}

.gauge span:nth-child(3n) {
    background: linear-gradient(180deg, #4a9eff 0%, #3b82f6 100%);
    opacity: 1;
}

.connector {
    width: 40px;
    height: 20px;
    color: #9ca3af;
    margin-left: 0.5rem;
}

/* Sparkle decoration */
.sparkle {
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 24px;
    color: #4a9eff;
    animation: sparkle 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.6);
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.6; transform: scale(0.8) rotate(180deg); }
}

/* Dark mode adjustments */
[data-theme="dark"] .main-title {
    text-shadow:
        0 0 15px rgba(74, 158, 255, 0.9),
        0 0 25px rgba(74, 158, 255, 0.6),
        0 0 35px rgba(74, 158, 255, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: titleGlowDark 4s ease-in-out infinite;
}

@keyframes titleGlowDark {
    0%, 100% {
        text-shadow:
            0 0 15px rgba(74, 158, 255, 0.9),
            0 0 25px rgba(74, 158, 255, 0.6),
            0 0 35px rgba(74, 158, 255, 0.4),
            2px 2px 4px rgba(0, 0, 0, 0.5);
    }
    50% {
        text-shadow:
            0 0 12px rgba(74, 158, 255, 0.7),
            0 0 20px rgba(74, 158, 255, 0.45),
            0 0 28px rgba(74, 158, 255, 0.25),
            2px 2px 4px rgba(0, 0, 0, 0.5);
    }
}

[data-theme="dark"] .premium-logo {
    filter: drop-shadow(0 0 25px rgba(74, 158, 255, 0.5));
}

[data-theme="dark"] .premium-logo:hover {
    filter: drop-shadow(0 0 35px rgba(74, 158, 255, 0.7));
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-header {
        min-height: 320px;
        padding: 1.5rem 1rem 1rem;
    }

    .logo-container {
        width: 150px;
        height: 150px;
    }

    .premium-logo {
        width: 150px;
        height: 150px;
    }

    .main-title {
        font-size: 48px;
        letter-spacing: 0.06em;
    }

    .tagline-line {
        font-size: 18px;
        letter-spacing: 0.08em;
    }

    .decorative-line {
        max-width: 90%;
    }

    .ruler-left,
    .ruler-right {
        max-width: 50px;
    }

    .gauge span {
        width: 2px;
        height: 16px;
    }

    .gauge span:nth-child(odd) {
        height: 12px;
    }

    .connector {
        width: 30px;
        height: 15px;
    }

    .sparkle {
        font-size: 18px;
        bottom: 15px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .hero-header {
        min-height: 280px;
        padding: 1rem;
    }

    .logo-container {
        width: 120px;
        height: 120px;
    }

    .premium-logo {
        width: 120px;
        height: 120px;
    }

    .main-title {
        font-size: 32px;
    }

    .tagline-line {
        font-size: 13px;
        letter-spacing: 0.08em;
    }

    .decorative-line {
        display: none;
    }

    .equivalence-card {
        padding: 1rem 1.25rem;
    }

    .equivalence-card .size {
        font-size: 1rem;
    }

    .equivalence-card .specs {
        gap: 0.5rem;
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .equivalence-card .spec {
        font-size: 0.75rem;
    }

    .equivalence-card .differences {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        gap: 0.4rem;
    }

    .equivalence-card .difference {
        font-size: 0.675rem;
        padding: 0.1rem 0.3rem;
    }
}

    .decorative-line {
        display: none;
    }

    .sparkle {
        font-size: 14px;
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   WHEEL SPINNING ANIMATION (Acceleration & Braking)
   ============================================ */

.wheel-logo {
    width: 200px;
    height: 200px;
    animation: wheelSpin 12s ease-in-out infinite;
    transform-origin: center center;
    filter: drop-shadow(0 0 20px rgba(74, 158, 255, 0.4));
}

@keyframes wheelSpin {
    /* Realistic driving cycle over 12 seconds */
    0% {
        transform: rotate(0deg);
        animation-timing-function: ease-out;  /* Complete stop */
    }
    20% {
        transform: rotate(360deg);  /* 1 rotation, gentle acceleration */
        animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1);
    }
    40% {
        transform: rotate(720deg);  /* 2 rotations */
        animation-timing-function: linear;  /* Steady cruising */
    }
    60% {
        transform: rotate(1260deg);  /* 3.5 rotations */
        animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1);  /* Slight accel */
    }
    75% {
        transform: rotate(1620deg);  /* 4.5 rotations */
        animation-timing-function: ease-in-out;  /* Beginning to slow */
    }
    85% {
        transform: rotate(1800deg);  /* 5 rotations */
        animation-timing-function: ease-in;  /* Braking */
    }
    100% {
        transform: rotate(1860deg);  /* 5.17 rotations, then reset */
    }
}

/* Glow pulse effect synchronized with rotation */
.wheel-logo .wheel-glow {
    animation: wheelGlowPulse 12s ease-in-out infinite;
}

@keyframes wheelGlowPulse {
    0%, 100% {
        opacity: 0.2;
        stroke-width: 2;
    }
    40% {
        opacity: 0.4;  /* Stronger glow at high speed */
        stroke-width: 3;
    }
}

/* Spoke cutouts motion effect */
.wheel-logo .spoke-cutouts path {
    animation: spokeCutoutGlow 12s ease-in-out infinite;
}

@keyframes spokeCutoutGlow {
    0%, 100% {
        opacity: 0.8;
        stroke-width: 12;
    }
    40%, 60% {
        opacity: 1;
        stroke-width: 14;  /* Slight expansion at speed */
    }
}

/* Lug nuts subtle sheen */
.wheel-logo .lug-nuts ellipse {
    animation: lugNutSheen 12s ease-in-out infinite;
}

@keyframes lugNutSheen {
    0%, 100% {
        fill: #4b5563;
    }
    45%, 55% {
        fill: #6b7280;  /* Subtle highlight at cruising speed */
    }
}

/* Hover effect - speed up rotation */
.logo-container:hover .wheel-logo {
    animation-duration: 6s;  /* 2x faster on hover (from 12s to 6s) */
}

.logo-container:hover .wheel-logo .wheel-glow {
    opacity: 0.5;
    stroke-width: 4;
}

/* Dark mode wheel enhancements */
[data-theme="dark"] .wheel-logo {
    filter: drop-shadow(0 0 25px rgba(74, 158, 255, 0.5));
}

[data-theme="dark"] .wheel-logo .wheel-glow {
    opacity: 0.3;
}

[data-theme="dark"] .logo-container:hover .wheel-logo {
    filter: drop-shadow(0 0 35px rgba(74, 158, 255, 0.7));
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .container {
    background: var(--gray-100);
    box-shadow: var(--shadow-xl);
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

header::before {
    content: '🛞';
    position: absolute;
    font-size: 12rem;
    opacity: 0.1;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    animation: spin 60s linear infinite;
}

header::after {
    content: '🔧';
    position: absolute;
    font-size: 6rem;
    opacity: 0.1;
    right: -1rem;
    top: 30%;
    animation: pulse 4s ease-in-out infinite;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(74, 158, 255, 0.4);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 3.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dark-mode-toggle:hover {
    background: rgba(74, 158, 255, 0.2);
    border-color: rgba(74, 158, 255, 0.7);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.dark-mode-toggle .icon-sun {
    display: none;
}

.dark-mode-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .dark-mode-toggle {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(74, 158, 255, 0.3);
}

[data-theme="dark"] .dark-mode-toggle:hover {
    background: rgba(74, 158, 255, 0.15);
    border-color: rgba(74, 158, 255, 0.6);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}

[data-theme="dark"] .dark-mode-toggle .icon-sun {
    display: block;
}

[data-theme="dark"] .dark-mode-toggle .icon-moon {
    display: none;
}

/* Responsive dark mode toggle */
@media (max-width: 768px) {
    .dark-mode-toggle {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 1rem;
    }

    .dark-mode-toggle:hover {
        transform: scale(1.05);
    }
}

/* Header layout */
.header-top {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .dark-mode-toggle {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 1rem;
    }

    .dark-mode-toggle:hover {
        transform: scale(1.05);
    }

    .header-top {
        flex-direction: column;
    }
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

header .subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Main Content */
main {
    padding: 2rem;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
    position: relative;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    position: relative;
}

.input-group::before {
    content: '🔍';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    z-index: 2;
    opacity: 0.6;
}

.input-group input {
    flex: 1;
    padding: 1rem 1rem 1rem 3.5rem;
    border: 3px solid var(--gray-300);
    border-radius: 12px;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .input-group input {
    background: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--gray-100);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), var(--shadow-lg);
    transform: translateY(-2px);
}

[data-theme="dark"] .input-group input::placeholder {
    color: var(--gray-500);
}

.input-group button {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--secondary) 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.input-group button:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.input-group button:active {
    transform: translateY(0);
}

.input-group button::after {
    content: '⚡';
    margin-left: 0.5rem;
}

.examples {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: var(--gray-500);
    font-size: 0.875rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px dashed var(--gray-300);
    transition: background 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .examples {
    background: rgba(0, 0, 0, 0.4);
    color: var(--gray-500);
    border-color: var(--gray-600);
}

.examples::before {
    content: '💡';
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.example-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Monaco', 'Menlo', monospace;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.example-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

/* Results Section */
.results-section {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: background 0.3s ease;
}

[data-theme="dark"] .results-section {
    background: var(--gray-200);
}

.original-tire {
    background: white;
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.original-tire .label {
    font-weight: 600;
    color: var(--primary);
}

.original-tire .size {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.original-tire .details {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.equivalences-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.equivalences-header h2 {
    font-size: 1.25rem;
    color: var(--gray-800);
}

.equivalences-header h2 span {
    color: var(--primary);
}

.filter-group {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    color: var(--gray-700);
}

.filter-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* Size filter group */
.size-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-300);
}

[data-theme="dark"] .size-filters {
    border-top-color: var(--gray-600);
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-right: 0.5rem;
}

[data-theme="dark"] .filter-label {
    color: var(--gray-300);
}

.size-filters label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    color: var(--gray-600);
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

[data-theme="dark"] .size-filters label {
    color: var(--gray-400);
}

.size-filters label:hover {
    background: var(--gray-100);
}

[data-theme="dark"] .size-filters label:hover {
    background: var(--gray-700);
}

.size-filters input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.equivalences-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    animation: fadeIn 0.5s ease-out;
    max-width: 800px;
    margin: 0 auto;
}

.equivalence-card {
    animation: slideIn 0.4s ease-out;
    animation-fill-mode: both;
}

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

.equivalence-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 0; /* Prevent grid blowouts */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

[data-theme="dark"] .equivalence-card {
    background: var(--gray-100);
    border-color: var(--gray-200);
}

[data-theme="dark"] .equivalence-card .size {
    color: var(--gray-800);
}

.equivalence-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.equivalence-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.equivalence-card:hover::before {
    opacity: 1;
}

.equivalence-card.winter {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: var(--accent);
    border-left-width: 5px;
}

[data-theme="dark"] .equivalence-card.winter {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(56, 189, 248, 0.2) 100%);
}

.equivalence-card.winter::before {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.equivalence-card.ete {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: var(--success);
    border-left-width: 5px;
}

[data-theme="dark"] .equivalence-card.ete {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
}

.equivalence-card.ete::before {
    background: linear-gradient(90deg, var(--success) 0%, #059669 100%);
}

.equivalence-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.equivalence-card .size {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    display: inline;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.equivalence-card .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.equivalence-card .badge.ete::before {
    content: '☀️ ';
}

.equivalence-card .badge.hiver::before {
    content: '❄️ ';
}

.equivalence-card .badge.xl::before {
    content: '⭐ ';
}

.equivalence-card .badge.ete {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.equivalence-card .badge.hiver {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.equivalence-card .badge.xl,
.original-tire .badge.xl {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
}

/* .specs and .spec removed - not used anymore */

.equivalence-card .differences {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 0.813rem;
    color: var(--gray-700);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border: 1px solid var(--gray-200);
    transition: background 0.3s ease, border 0.3s ease;
    min-width: 0;
}

[data-theme="dark"] .equivalence-card .differences {
    background: var(--gray-600);
    border-color: var(--gray-500);
    color: var(--gray-300);
}

.equivalence-card .difference {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    transition: background 0.3s ease, border 0.3s ease;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.equivalence-card .difference.positive {
    color: var(--success);
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.equivalence-card .difference.negative {
    color: var(--danger);
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.equivalence-card .difference.neutral {
    color: var(--gray-600);
    border-color: var(--gray-300);
}

[data-theme="dark"] .equivalence-card .difference {
    background: var(--gray-500);
    border-color: var(--gray-400);
}

[data-theme="dark"] .equivalence-card .difference.positive {
    background: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .equivalence-card .difference.negative {
    background: rgba(239, 68, 68, 0.2);
}

/* Original Tire Card */
.original-tire {
    background: linear-gradient(135deg, var(--primary-light) 0%, #fee2e2 100%);
    border: 3px solid var(--primary);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-lg);
    transition: background 0.3s ease;
}

[data-theme="dark"] .original-tire {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(248, 113, 113, 0.15) 100%);
}

.original-tire::before {
    content: '🎯';
    font-size: 2.5rem;
}

.original-tire .label {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.original-tire .size {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.original-tire .details {
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
}

[data-theme="dark"] .original-tire .details {
    color: var(--gray-500);
}

.no-results {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-radius: 16px;
    color: var(--gray-700);
    border: 2px dashed var(--gray-300);
    box-shadow: var(--shadow-md);
    transition: background 0.3s ease, border 0.3s ease;
}

[data-theme="dark"] .no-results {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.no-results::before {
    content: '🔍';
    display: block;
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results p {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.no-results .hint {
    margin-top: 0.5rem;
    color: var(--gray-500);
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    display: inline-block;
}

[data-theme="dark"] .no-results .hint {
    background: rgba(59, 130, 246, 0.3);
    color: var(--gray-600);
}

/* Info Section */
.info-section {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    transition: background 0.3s ease, border 0.3s ease;
}

[data-theme="dark"] .info-section {
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    border-color: var(--gray-600);
}

.info-section h3 {
    margin-bottom: 1.5rem;
    color: var(--gray-900);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

[data-theme="dark"] .info-section h3 {
    color: var(--gray-800);
}

.info-section h3::before {
    content: '📋';
    font-size: 1.5rem;
}

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

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--gray-200);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .info-card {
    background: var(--gray-100);
    border-color: var(--gray-200);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--secondary) 100%);
}

.info-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.info-card h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card p,
.info-card li {
    font-size: 0.938rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

[data-theme="dark"] .info-card p,
[data-theme="dark"] .info-card li {
    color: var(--gray-600);
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li::before {
    content: "✓ ";
    color: var(--success);
    font-weight: 700;
}

.info-card code {
    background: linear-gradient(135deg, var(--primary-light) 0%, #fee2e2 100%);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--primary-dark);
    border: 1px solid rgba(220, 38, 38, 0.2);
    white-space: nowrap;
}

/* PDF link in info cards */
.tnpf-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: var(--primary-light);
    border: 1px solid rgba(220, 38, 38, 0.2);
    transition: all 0.2s;
    font-size: 0.938rem;
}

.tnpf-pdf-link:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, #fee2e2 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--primary-dark);
}

.tnpf-pdf-link::after {
    content: '📄';
    font-size: 1rem;
}

/* External link button for info cards */
.tnpf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.tnpf-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    text-decoration: none;
    color: white !important;
}

[data-theme="dark"] .tnpf-link {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tnpf-link:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a4a6e 0%, #0f2d4a 100%);
    padding: 2rem;
    text-align: center;
    color: white;
    font-size: 0.938rem;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] footer {
    background: linear-gradient(135deg, #0a1628 0%, #1a2d45 100%);
}

footer::before {
    content: '🔧';
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.2;
}

footer::after {
    content: '🛞';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 3rem;
    opacity: 0.2;
}

footer p {
    position: relative;
    z-index: 1;
    margin-bottom: 0.75rem;
}

.footer-links {
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.footer-links a {
    color: var(--warning);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: inline-block;
}

.footer-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Feedback Section */
.feedback-section {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    transition: background 0.3s ease, border 0.3s ease;
}

[data-theme="dark"] .feedback-section {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border-color: var(--gray-300);
}

.feedback-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--gray-900);
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feedback-section h3::before {
    content: '📝';
    font-size: 1.75rem;
}

.feedback-section > p {
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

[data-theme="dark"] .feedback-section > p {
    color: var(--gray-800);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.938rem;
}

[data-theme="dark"] .form-group label {
    color: var(--gray-200);
}

.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: white;
}

[data-theme="dark"] .form-group input[type="email"],
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    background: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--gray-100);
}

.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.feedback-section button[type="submit"] {
    padding: 0.875rem 2.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.feedback-section button[type="submit"]::after {
    content: '📧';
    margin-left: 0.75rem;
}

.feedback-section button[type="submit"]:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.feedback-section button[type="submit"]:active {
    transform: translateY(0);
}

.feedback-note {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    background: linear-gradient(135deg, #fef3cd 0%, #fde68a 100%);
    padding: 1rem;
    border-radius: 10px;
    border-left: 5px solid var(--warning);
    box-shadow: var(--shadow);
}

.feedback-note strong {
    color: #92400e;
}

[data-theme="dark"] .feedback-note {
    background: linear-gradient(135deg, rgba(246, 204, 56, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
    border-left-color: var(--warning);
    color: var(--gray-800);
}

[data-theme="dark"] .feedback-note strong {
    color: var(--warning);
}

/* Responsive adjustments for feedback */
@media (max-width: 768px) {
    .feedback-section {
        padding: 1rem;
    }

    .feedback-section h3 {
        font-size: 1.1rem;
    }
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.98) 0%, rgba(45, 90, 135, 0.98) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.loading.hidden {
    display: none;
    opacity: 0;
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

.spinner {
    width: 100px;
    height: 100px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

.loading p {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-hint {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Utilities */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 1.5rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    main {
        padding: 1.5rem;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group button {
        width: 100%;
    }

    .equivalences-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .equivalence-card .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .badge {
        align-self: flex-start;
    }

    .equivalence-card .size {
        font-size: 1.1rem;
    }

    .equivalence-card .specs {
        gap: 0.75rem;
        font-size: 0.813rem;
    }

    .equivalence-card .spec {
        font-size: 0.813rem;
    }

    .equivalence-card .differences {
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    .equivalence-card .difference {
        font-size: 0.725rem;
        padding: 0.15rem 0.4rem;
    }

    .equivalences-list {
        grid-template-columns: 1fr;
    }
}

/* Staggered animations for equivalence cards */
.equivalence-card:nth-child(1) { animation-delay: 0.05s; }
.equivalence-card:nth-child(2) { animation-delay: 0.1s; }
.equivalence-card:nth-child(3) { animation-delay: 0.15s; }
.equivalence-card:nth-child(4) { animation-delay: 0.2s; }
.equivalence-card:nth-child(5) { animation-delay: 0.25s; }
.equivalence-card:nth-child(6) { animation-delay: 0.3s; }
.equivalence-card:nth-child(7) { animation-delay: 0.35s; }
.equivalence-card:nth-child(8) { animation-delay: 0.4s; }
.equivalence-card:nth-child(9) { animation-delay: 0.45s; }
.equivalence-card:nth-child(10) { animation-delay: 0.5s; }

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 6px;
    border: 3px solid var(--gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}
