:root {
    /* Base Colors */
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    /* RightYah Elite Palette */
    --emerald-primary: #004E3B;
    --emerald-light: #059669;
    --gold-accent: #D4A72C;
    --gold-glow: rgba(212, 167, 44, 0.3);
    
    /* Functional Accents */
    --accent-primary: var(--gold-accent);
    --accent-secondary: var(--emerald-light);
    --accent-gradient: linear-gradient(135deg, #004E3B 0%, #059669 100%);
    --gold-gradient: linear-gradient(135deg, #D4A72C 0%, #F59E0B 100%);
    
    /* Glassmorphism */
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
    
    /* Spacing & Sizing */
    --container-width: 1200px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

h1, h2, h3, .logo {
    font-family: 'Outfit', sans-serif;
}

.container {
    padding: 0 16px;
    width: 100%;
}

/* Navbar & Mobile Navigation */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    height: 70px;
    background: #0f172a; /* Solid background since blur is removed */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 2000;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    text-decoration: none;
}

.logo span {
    color: var(--gold-accent);
}

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

.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
}

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

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2100;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: #fff;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 0; /* Collapse width to prevent scroll leak */
        padding: 0; /* Remove padding when collapsed */
        height: 100vh;
        background: rgba(2, 6, 23, 1); /* Solid background since blur is removed */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), width 0s 0.6s, padding 0s 0.6s;
        transform: translateX(100%);
        border-left: 1px solid rgba(212, 167, 44, 0.2);
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8);
        visibility: hidden; 
        overflow: hidden;
    }

    .nav-links.active {
        width: 80%;
        padding: 60px 40px;
        right: 0;
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), width 0s, padding 0s;
    }

    .nav-links a {
        font-size: 1.8rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    /* Staggered delay for nav links */
    .nav-links.active a:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active a:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active a:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active a:nth-child(4) { transition-delay: 0.4s; }

    .nav-links a {
        font-size: 1.8rem;
        font-family: 'Outfit', sans-serif;
        color: #fff;
        font-weight: 700;
        letter-spacing: -0.02em;
    }

    .nav-links a.active {
        color: var(--accent-primary);
        text-shadow: 0 0 20px rgba(5, 150, 105, 0.4);
    }

    .mobile-toggle span {
        width: 28px;
        height: 2.5px;
    }

    .mobile-toggle.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
    .mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-toggle.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
}

/* Nav Backdrop Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7); /* Slightly darker for better focus since blur is gone */
    z-index: 1900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mood Skins */
:root {
    --mood-bg: var(--bg-primary);
    --mood-accent: var(--accent-primary);
    --mood-glow: rgba(56, 189, 248, 0.1);
}

body {
    background-color: var(--mood-bg);
    transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero {
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-liquid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(0, 78, 59, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(212, 167, 44, 0.05) 0%, transparent 50%);
    filter: blur(60px);
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}

.hero-text-centered {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.6;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0 60px;
    }
    
    .hero h1 {
        font-size: 2.4rem;
        letter-spacing: -1px;
        padding: 0 10px;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 32px;
        padding: 0 10px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .calc-inputs {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        gap: 8px;
    }
    
    .calc-field input {
        width: 100%;
    }

    .rewards-calculator {
        top: 60px;
    }
}

/* Floating Calculator Widget */
.floating-calc-widget {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.card-footer {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.button-primary {
    flex: 2;
    background: var(--gold-gradient);
    color: #020617;
    border: none;
    padding: 14px 10px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(212, 167, 44, 0.2);
    font-size: 0.85rem;
    white-space: nowrap;
}

.button-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(212, 167, 44, 0.4);
    filter: brightness(1.1);
}

.button-secondary {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 10px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}



/* Reward Estimator Modal Styles */
.calc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.calc-overlay.active {
    opacity: 1;
    visibility: visible;
}

.calc-drawer {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 450px;
    max-width: 90vw;
    height: auto;
    max-height: 90vh;
    background: #0f172a;
    z-index: 3000;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translate(-50%, -40%) scale(0.95);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    visibility: hidden;
    opacity: 0;
    padding: 0;
    pointer-events: none;
}

.calc-drawer.active {
    width: 450px;
    max-width: 90vw;
    transform: translate(-50%, -50%) scale(1);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.drawer-header {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.drawer-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

.drawer-content {
    padding: 30px;
    overflow-y: auto;
}

.earnings-hero {
    background: linear-gradient(135deg, rgba(212, 167, 44, 0.1), rgba(0, 78, 59, 0.2));
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    margin-bottom: 40px;
    border: 1px solid var(--gold-accent);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.earnings-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.earnings-value {
    font-size: 3rem;
    font-weight: 800;
    color: white;
}

.presets {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

.preset-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preset-btn:hover, .preset-btn.active {
    background: var(--emerald-primary);
    border-color: var(--gold-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 78, 59, 0.3);
}

.slider-group {
    margin-bottom: 30px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: white;
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.drawer-disclaimer {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 40px;
    line-height: 1.5;
}


.comparison-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comp-tray {
    display: flex;
    gap: 12px;
}

.tray-item {
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.comp-actions {
    display: flex;
    gap: 12px;
}

/* Modal Core Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 4000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.modal-content {
    background: rgba(30, 41, 59, 0.9);
    margin: 5% auto;
    padding: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 32px;
    max-width: 1000px;
    color: white;
    position: relative;
}

.comparison-overlay {
    max-width: 1200px !important;
    width: 95% !important;
}

.comp-matrix {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    background: rgba(255,255,255,0.02);
    border-radius: 20px;
    overflow: hidden;
}

.comp-matrix th, .comp-matrix td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.comp-matrix th {
    background: rgba(255,255,255,0.05);
    color: var(--accent-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comp-matrix td {
    color: var(--text-secondary);
}

.winner-cell {
    color: var(--accent-primary) !important;
    font-weight: 800;
}

.comp-card-name {
    color: white;
    font-weight: 700;
}

/* Mobile Drawer Fixes */
@media (max-width: 768px) {
    .calc-drawer {
        width: 95vw;
    }
    .calc-drawer.active {
        width: 95vw;
        max-width: 100%;
    }
    
    .modal-content {
        padding: 24px 16px;
        margin: 0;
        width: 100% !important;
        height: 100%;
        border-radius: 0;
        border: none;
    }

    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
        padding: 0 10px;
    }

    .comp-table-wrapper {
        border-radius: 12px;
        margin-top: 10px;
    }
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
    text-align: center;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 25px rgba(0, 78, 59, 0.3);
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: transparent;
}

/* Featured Deal - Mobile First */
.featured-deal {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 40px;
    position: relative;
}

.featured-badge {
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.65rem;
    display: inline-block;
    margin-bottom: 16px;
}

.featured-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.featured-text h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.bonus-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bonus-tag {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.magic-earnings-badge {
    background: rgba(0, 78, 59, 0.3);
    border: 1px solid var(--emerald-light);
    padding: 10px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.magic-earnings-badge:hover {
    background: rgba(0, 78, 59, 0.5);
    border-color: var(--gold-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.magic-earnings-badge span {
    margin-right: 4px;
}

.value-badge {
    font-size: 0.75rem;
    color: #4ade80; /* Green for value */
    background: rgba(74, 222, 128, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.featured-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.featured-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.featured-stats span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.featured-image {
    display: flex;
    justify-content: center;
}

.featured-image img {
    max-width: 200px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.featured-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.featured-actions .btn {
    flex: 1;
    min-width: 140px;
}

.discovery-hub {
    margin-bottom: 60px;
    position: relative;
}

.hub-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.elite-discovery-bar {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
    position: relative;
    z-index: 10;
}

.elite-discovery-bar:focus-within {
    border-color: rgba(212, 167, 44, 0.3);
    box-shadow: 0 25px 60px rgba(212, 167, 44, 0.1);
}

.search-wrap {
    flex: 2;
    min-width: 280px; /* Reduced to fit small mobiles better */
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 24px;
    width: 20px;
    height: 20px;
    color: var(--gold-accent);
    opacity: 0.8;
}

.search-wrap input {
    width: 100%;
    background: rgba(2, 6, 23, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    padding: 18px 24px 18px 60px;
    border-radius: 22px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
}

.search-wrap input:focus {
    outline: none;
    background: rgba(2, 6, 23, 0.6);
    border-color: var(--gold-accent);
    box-shadow: 0 0 25px var(--gold-glow);
}

.search-wrap input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.filter-wrap {
    flex: 3;
    display: flex;
    gap: 8px;
}

.elite-dropdown {
    flex: 1;
    position: relative;
    background: rgba(2, 6, 23, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 140px; /* Reduced from 160px */
}

.elite-dropdown.active {
    z-index: 2000; /* Very high to beat any card transitions */
}

.elite-dropdown:hover {
    background: rgba(2, 6, 23, 0.6);
    border-color: rgba(212, 167, 44, 0.4);
}

.elite-dropdown label {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold-accent);
    font-weight: 800;
    margin-bottom: 4px;
    pointer-events: none;
    opacity: 0.8;
}

.dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.selected-value {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-trigger i {
    width: 18px;
    height: 18px;
    color: var(--gold-accent);
    opacity: 0.6;
    transition: var(--transition);
}

.elite-dropdown.active .dropdown-trigger i {
    transform: rotate(180deg);
    opacity: 1;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 220px; /* Wider than trigger for readability */
    background: #0f172a; /* More opaque background */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(212, 167, 44, 0.3);
    border-radius: 20px;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: var(--transition);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.elite-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    padding: 14px 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

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

.dropdown-item:hover {
    background: rgba(212, 167, 44, 0.05);
    color: white;
    padding-left: 24px;
}

.dropdown-item.active {
    color: var(--gold-accent);
    background: rgba(212, 167, 44, 0.1);
    font-weight: 700;
}

.dropdown-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gold-accent);
    box-shadow: 0 0 10px var(--gold-glow);
}

@media (max-width: 992px) {
    .filter-wrap {
        flex: 1 1 100%;
    }
}

@media (max-width: 640px) {
    .elite-discovery-bar {
        padding: 12px;
    }
    .search-wrap, .filter-wrap {
        flex: 1 1 100%;
        min-width: 0;
    }
    .filter-wrap {
        flex-direction: column;
    }
}

/* Staggered Dropdown Item Animations */
.dropdown-item {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.elite-dropdown.active .dropdown-item {
    opacity: 1;
    transform: translateX(0);
}

.dropdown-item:nth-child(1) { transition-delay: 0.05s; }
.dropdown-item:nth-child(2) { transition-delay: 0.1s; }
.dropdown-item:nth-child(3) { transition-delay: 0.15s; }
.dropdown-item:nth-child(4) { transition-delay: 0.2s; }
.dropdown-item:nth-child(5) { transition-delay: 0.25s; }
.dropdown-item:nth-child(6) { transition-delay: 0.3s; }
.search-filter-group {
    display: none;
}


.filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.filters::-webkit-scrollbar { display: none; }

.filter-btn {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 30px;
    white-space: nowrap;
}

.filter-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0;
    width: 100%;
}

/* Card - Mobile First */
.card {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    animation: cardEntrance 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 167, 44, 0.3);
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Flip Card Animation */
.card-flip-container {
    perspective: 1000px;
    height: 180px;
    margin-bottom: 16px;
    cursor: pointer;
    outline: none;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-flip-container:hover .card-inner,
.card-flip-container:focus .card-inner,
.card-flip-container.active .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.3);
}

.card-back {
    transform: rotateY(180deg);
}

.card-img-flip {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3));
    transition: var(--transition);
}

.card-flip-container:hover .card-img-flip {
    filter: drop-shadow(0 12px 24px rgba(0,0,0,0.5));
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.best-for-tag {
    background: rgba(5, 150, 105, 0.1);
    color: var(--emerald-light);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-tag {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.bonus-tag {
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 16px;
    background: rgba(251, 191, 36, 0.05);
    padding: 8px;
    border-radius: var(--radius-md);
    text-align: center;
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px; /* Reduced from 16px */
}

.best-for-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--gold-accent);
    color: var(--bg-primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.rewards-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rewards-text strong {
    color: var(--text-primary);
}

.card-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for Credit Score */
    gap: 8px;
    margin-bottom: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.benefits-preview {
    margin-bottom: 20px;
    background: rgba(255,255,255,0.03);
    padding: 10px;
    border-radius: var(--radius-md);
}

.benefits-preview span {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 700;
}

.benefits-preview ul {
    list-style: none;
}

.benefits-preview li {
    font-size: 0.75rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    position: relative;
    padding-left: 12px;
}

.benefits-preview li:before {
    content: "•";
    color: var(--accent-primary);
    position: absolute;
    left: 0;
}

.detail-item span {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: block;
}

.detail-item p {
    font-size: 0.9rem;
    font-weight: 700;
}

.benefits-list {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.benefit-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.benefit-item .check {
    color: #4ade80;
    font-weight: 700;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.card-actions .btn {
    flex: 1;
    min-width: 100px;
    padding: 10px;
    font-size: 0.9rem;
}

/* Comparison Bar */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--accent-primary);
    padding: 16px;
    display: none; /* Shown via JS */
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
}

.compare-info p {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Tablet & Desktop Adjustments */
@media (min-width: 768px) {
    .container {
        max-width: var(--container-width);
        margin: 0 auto;
        padding: 0 24px;
    }

    .navbar { height: 80px; }
    .logo { font-size: 1.5rem; }
    .nav-links { display: flex; list-style: none; gap: 32px; }
    .nav-links a { text-decoration: none; color: var(--text-secondary); font-weight: 500; }

    .hero { padding: 100px 0 80px; }
    .hero h1 { font-size: 4rem; }
    .hero-actions { flex-direction: row; justify-content: center; }

    .featured-deal { padding: 48px; margin-bottom: 80px; }
    .featured-content { flex-direction: row; align-items: center; gap: 60px; }
    .featured-text { flex: 1; }
    .featured-image { flex: 1; }
    .featured-image img { max-width: 400px; }

    .search-filter-group { flex-direction: row; justify-content: space-between; align-items: center; }
    .search-box input { width: 300px; }

    .deals-grid { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 32px; }
}

/* Comparison Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    z-index: 2000;
    display: none;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 1000px;
    margin: 40px auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.close-modal {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
}

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

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

.compare-table th {
    color: var(--text-secondary);
    font-weight: 500;
    width: 120px;
}
/* Alerts Toggle */
.alert-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: 16px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-primary);
}

input:checked + .slider:before {
    transform: translateX(14px);
}

/* Newsletter Section */
.newsletter-section {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 60px;
    border: 1px solid var(--border-color);
}

.newsletter-section h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.newsletter-section p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
    flex-direction: column;
}

.newsletter-form input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    outline: none;
}

.newsletter-form input:focus {
    border-color: var(--accent-primary);
}

@media (min-width: 768px) {
    .newsletter-form { flex-direction: row; }
}

/* Footer Styling */
.footer {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.disclaimer {
    max-width: 800px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-secondary);
}



/* Floating Calculator Toggle */
.calc-toggle {
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 1000;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 100px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.calc-toggle:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 40px rgba(5, 150, 105, 0.4);
}

@media (max-width: 768px) {
    .calc-toggle {
        padding: 12px;
        bottom: 90px !important;
        right: 15px !important;
    }
    .calc-text {
        display: none; /* Icon only on mobile to save space */
    }
    .calc-icon {
        font-size: 1.4rem;
        margin: 0;
    }
}



@media (max-width: 768px) {

}

/* Simple Comparison Bar */
.comparison-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 16px 32px;
    border-radius: 100px;
    z-index: 9999;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    min-width: auto;
}

.comparison-bar.active {
    transform: translateX(-50%) translateY(0);
}

.bar-flex {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
    width: 100%;
}

.comp-count-text {
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
}

#comp-count-number {
    color: var(--gold-accent);
}

.comp-actions {
    display: flex;
    gap: 12px;
}

/* Comparison Table Styling */
.comp-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 5px;
}

/* Custom Scrollbar for Swipe Area */
.comp-table-wrapper::-webkit-scrollbar {
    height: 6px;
}
.comp-table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.comp-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(212, 167, 44, 0.3);
    border-radius: 10px;
}

.comp-matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #fff;
    min-width: 600px; /* Force swipe on mobile */
}

.comp-matrix th, .comp-matrix td {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    background: rgba(15, 23, 42, 0.1);
}

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background: #020617 !important; /* Solid background for sticky */
    font-weight: 800;
    color: var(--gold-accent);
    min-width: 130px;
    border-right: 1px solid rgba(212, 167, 44, 0.2);
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}

.comp-card-name {
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    min-width: 180px;
    font-weight: 800;
}

.winner-cell {
    background: rgba(0, 78, 59, 0.1);
    color: var(--gold-accent);
    font-weight: 800;
}

.verdict-cell {
    font-style: italic;
    color: var(--text-secondary);
    font-family: 'Playfair Display', serif;
}

.comp-matrix .btn {
    padding: 8px 16px;
    font-size: 0.8rem;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .comp-matrix th, .comp-matrix td {
        padding: 12px 10px;
    }
    
    .comp-card-name {
        font-size: 0.9rem;
        min-width: 150px;
    }
}

/* Final safety net for mobile overflow */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        position: relative;
        max-width: 100% !important;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 16px;
        overflow-x: hidden !important;
    }

    .elite-discovery-bar {
        width: 100% !important;
        max-width: 100% !important;
        flex-direction: column !important;
        padding: 12px !important;
    }

    .search-wrap, .filter-wrap {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
    }

    .elite-dropdown {
        width: 100% !important;
        min-width: 0 !important;
    }
    
    .comparison-bar {
        width: 95% !important;
        left: 50% !important;
        transform: translateX(-50%) translateY(200%);
        padding: 12px 16px !important;
        border-radius: 20px !important;
    }
    
    .comparison-bar.active {
        transform: translateX(-50%) translateY(0);
    }
}

/* Interactive Earnings Badge */
.magic-earnings-badge {
    display: inline-block;
    background: var(--accent-gradient);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.magic-earnings-badge::after {
    content: 'Click to calculate';
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: bottom 0.3s ease;
}

.magic-earnings-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.magic-earnings-badge:hover::after {
    bottom: 0;
}

.magic-earnings-badge:active {
    transform: translateY(0) scale(0.98);
}
