/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #0b1120;
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   HEADER & ENHANCED TEXT LOGO
   ============================================ */
.main-header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

/* --- ENHANCED TEXT LOGO --- */
.logo {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 4px;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-text {
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #94a3f8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.15);
}

.logo-tld {
    font-size: 1.15rem;
    font-weight: 700;
    color: #60a5fa;
    letter-spacing: -0.3px;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
    align-self: flex-end;
    padding-bottom: 2px;
}

/* --- NAVIGATION --- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.greeting {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 0.25rem;
}

/* ============================================
   BUTTONS (Enhanced)
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.55rem 1.4rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #334155;
}
.btn-outline:hover {
    border-color: #60a5fa;
    color: #fff;
    background: rgba(59, 130, 246, 0.08);
}
.btn-outline.active {
    border-color: #3b82f6;
    color: #fff;
    background: rgba(59, 130, 246, 0.12);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-large {
    padding: 0.9rem 2.8rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 5rem 0 3.5rem;
    background: radial-gradient(circle at 30% 20%, #1e293b 0%, #0b1120 70%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -1.5px;
}
.hero-content h1 span {
    color: #60a5fa;
    text-shadow: 0 0 40px rgba(96, 165, 250, 0.2);
}

.hero-sub {
    font-size: 1.2rem;
    color: #94a3b8;
    margin: 1.2rem 0 1.8rem;
    max-width: 90%;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}
.hero-badges span {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.15);
    padding: 0.35rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #bfdbfe;
    backdrop-filter: blur(4px);
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.cta-sub {
    font-size: 0.85rem;
    color: #64748b;
}

/* Hero Swap Preview */
.hero-example {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
}
.swap-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.car-card-mini {
    background: #1e293b;
    padding: 0.8rem 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    justify-content: center;
    border-left: 4px solid #3b82f6;
    transition: 0.2s;
}
.car-card-mini:hover {
    background: #263348;
}
.car-card-mini .car-emoji {
    font-size: 2rem;
}
.car-card-mini strong {
    color: #fff;
}
.car-card-mini .value {
    color: #94a3b8;
    font-weight: 600;
}
.swap-arrow {
    font-size: 1.8rem;
    color: #3b82f6;
    transform: rotate(90deg);
}
.match-badge {
    background: #22c55e;
    color: #0b1120;
    font-weight: 800;
    padding: 0.3rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}
.cash-diff {
    background: #facc15;
    color: #0b1120;
    padding: 0.3rem 1.2rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ============================================
   FEATURES
   ============================================ */
.features {
    padding: 5rem 0;
    background: #0f172a;
}
.features h2 {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    letter-spacing: -0.5px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}
.feature-item {
    text-align: center;
    background: #1e293b;
    padding: 2rem 1rem;
    border-radius: 1.5rem;
    border: 1px solid #334155;
    transition: all 0.3s ease;
}
.feature-item:hover {
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.step-num {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-weight: 800;
    width: 2.8rem;
    height: 2.8rem;
    line-height: 2.8rem;
    border-radius: 50%;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.feature-item h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #fff;
}
.feature-item p {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* ============================================
   CAR LISTINGS (BLUR EFFECT)
   ============================================ */
.listings-section {
    padding: 5rem 0;
    background: #0b1120;
}
.listings-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.listings-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
}
.blur-notice {
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(251, 191, 36, 0.15);
    backdrop-filter: blur(4px);
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.car-card {
    background: #1e293b;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid #334155;
    transition: all 0.3s ease;
    position: relative;
}
.car-card:hover {
    border-color: #475569;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* Blur for guests */
.car-card.blurred .car-image,
.car-card.blurred .car-info {
    filter: blur(10px);
    pointer-events: none;
    user-select: none;
}
.car-card.blurred .car-info .btn {
    display: none;
}

.car-card .blur-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(11, 17, 32, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 1.5rem;
    color: #fff;
    font-weight: 700;
    gap: 0.3rem;
}
.car-card .blur-overlay .lock-icon {
    font-size: 2.8rem;
}

.car-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
}
.car-info {
    padding: 1.2rem 1.5rem 1.5rem;
}
.car-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.car-title h3 {
    font-size: 1.1rem;
    color: #fff;
}
.match-pill {
    background: #22c55e;
    color: #0b1120;
    font-weight: 800;
    padding: 0.15rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
}
.car-specs {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0.2rem 0;
}
.car-value {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.8rem;
}

.listings-footer-cta {
    text-align: center;
    margin-top: 2.5rem;
    font-size: 1.1rem;
}
.listings-footer-cta a {
    color: #60a5fa;
    font-weight: 700;
    text-decoration: none;
}
.listings-footer-cta a:hover {
    text-decoration: underline;
}

/* ============================================
   MONEY SECTION
   ============================================ */
.money-section {
    padding: 3.5rem 0;
    background: #0f172a;
    border-top: 1px solid #1e293b;
    border-bottom: 1px solid #1e293b;
}
.money-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}
.money-item h3 {
    font-size: 1.2rem;
    color: #fff;
}
.money-item p {
    color: #94a3b8;
}

/* ============================================
   AUTH PAGES (LOGIN / REGISTER)
   ============================================ */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0b1120 80%);
}
.auth-container {
    width: 100%;
    max-width: 440px;
}
.auth-card {
    background: #1e293b;
    padding: 2.8rem;
    border-radius: 2rem;
    border: 1px solid #334155;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.auth-card h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}
.auth-sub {
    color: #94a3b8;
    margin-bottom: 1.5rem;
}
.auth-form .form-group {
    margin-bottom: 1.2rem;
}
.auth-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 0.3rem;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #334155;
    background: #0f172a;
    color: #f1f5f9;
    font-size: 1rem;
    transition: all 0.2s;
}
.auth-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}
.password-wrapper {
    position: relative;
}
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    line-height: 1;
}
.auth-switch {
    text-align: center;
    margin-top: 1.2rem;
    color: #94a3b8;
}
.auth-switch a {
    color: #60a5fa;
    font-weight: 600;
    text-decoration: none;
}
.auth-legal {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    margin-top: 1rem;
}
.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.2rem;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: #0b1120;
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid #1e293b;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-badges {
        justify-content: center;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-sub {
        max-width: 100%;
    }
    .hero-example {
        padding: 1rem;
    }

    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
    }
    .logo-text {
        font-size: 1.5rem;
    }
    .logo-tld {
        font-size: 0.95rem;
    }
    .nav-links {
        justify-content: center;
        gap: 0.5rem;
    }
    .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }
    .greeting {
        width: 100%;
        text-align: center;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
    .car-grid {
        grid-template-columns: 1fr;
    }
    .auth-card {
        padding: 1.8rem;
    }
    /* Premium Blur Overlay for Non-Premium Users */
.car-image-wrapper {
    position: relative;
    overflow: hidden;
}

.car-image-wrapper .premium-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 17, 32, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.car-image-wrapper .premium-overlay .premium-icon {
    font-size: 2.5rem;
    margin-bottom: 0.3rem;
    color: #facc15;
}

.car-image-wrapper .premium-overlay .premium-text {
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    padding: 0 0.5rem;
}

.car-image-wrapper .premium-overlay .premium-sub {
    color: #94a3b8;
    font-size: 0.7rem;
    text-align: center;
    margin-top: 0.1rem;
}

.car-image-wrapper .premium-overlay .upgrade-btn {
    margin-top: 0.5rem;
    padding: 0.3rem 1.2rem;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #0b1120;
    font-weight: 700;
    font-size: 0.7rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.car-image-wrapper .premium-overlay .upgrade-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.3);
}

.blurred-image {
    filter: blur(16px);
    -webkit-filter: blur(16px);
    transform: scale(1.1);
}
}
