/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    margin: 0;
    background-color: #f6f8fa; /* GitHub-like light background */
    color: var(--text-color-dark);
}

:root {
    /* topbar nav font size used by right nav labels and dropdowns */
    --topbar-nav-font-size: calc(1em - 2px);
    --vyc-chrome: #2b2f33;
    --vyc-green: #38966a;
    --bg: #ffffff;
    --muted: #6b6b6b;
    --card: #f8f9fa;
    --border: rgba(43,47,51,0.08);
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.content {
    padding-top: 72px; /* Adjust for top bar height + small space */
    padding-left: 20px;
    padding-right: 20px;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #67b656;
    color: var(--text-color-light);
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 56px; /* single row height */
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-bar-inner {
    width: 92%;
    max-width: 1180px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.top-bar-left, .top-bar-center, .top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar-left {
    flex: 0 0 auto;
}

.top-bar-center {
    /* Keep the center visually centered without affecting left/right layout.
       Use absolute centering so the right-side nav is never pushed off-screen. */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    height: 56px; /* match top-bar height */
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    z-index: 1001;
        pointer-events: none; /* Prevent blocking clicks on right nav */
        /* Reduce center width to free space for right-side controls */
        max-width: 30%; /* Prevent logo from taking up too much horizontal space */
}

.top-bar-center > * {
    pointer-events: auto; /* Re-enable clicks on logo itself */
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px; /* align vertically with the top bar */
    z-index: 1002; /* Ensure right nav is above the centered logo */
    min-width: 0; /* Allow children to shrink/ellipsis if needed */
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.0em;
    font-weight: 600;
}

.logo-icon {
    width: 28px;
    height: 28px;
    display: block;
}

.logo-text {
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-icon .nav-icon {
    font-size: 22px;
    display: inline-block;
}

/* Home label next to the left icon */
.home-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color-light);
    text-decoration: none;
    padding: 6px 8px;
}

.home-text {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color-light);
    white-space: nowrap;
}

@media (max-width: 720px) {
    .home-text { display: none; }
}

.user-section {
    display: flex;
    align-items: center;
    /* fixed width so profile column doesn't shift other items */
    width: 105px;
    flex: 0 0 105px;
    justify-content: center;
}
/* allow badges to be positioned relative to the user section */
.user-section { position: relative; }

.user-pill .credits-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: var(--text-color-light);
    border-radius: 12px;
    padding: 2px 8px;
    margin-left: 8px;
    font-weight: 700;
    font-size: 0.95em;
}

/* General credits badge used inside profile link */
.credits-badge {
    display: inline-block;
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffffff;
    color: var(--primary-color, #38966a);
    border-radius: 999px;
    padding: 4px 8px;
    margin: 0;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px; /* symmetric padding so right edge math is predictable */
    color: var(--text-color-light);
    text-decoration: none;
    font-size: 1em;
    transition: background-color 0.2s;
    /* fixed width for consistent alignment of right-cluster buttons */
    flex: 0 0 105px; /* fixed 105px per button */
    justify-content: center;
    box-sizing: border-box;
}

/* Ensure the profile link reserves space so the badge doesn't overlap the label */
.user-link { position: relative; padding-right: 18px; }

/* Nav items are fixed width for consistent layout */
.nav-link {
    flex: 0 0 105px;
    min-width: 0;
}

.nav-link:hover {
    opacity: 0.95;
}

.nav-icon {
    font-size: 1.2em;
    width: 24px;
    text-align: center;
}

/* Ensure inline SVG icons use the monochrome color from currentColor */
.nav-link .nav-icon,
.home-icon .nav-icon,
.user-link .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-color-light);
}

/* Limit logo width so center doesn't push right items off-screen */
.logo-section {
    max-width: 180px;
    overflow: hidden;
}

/* Ensure nav text does not wrap and ellipsize when space is constrained */
.nav-text {
    white-space: nowrap;
    display: inline-block;
    max-width: 7.5rem; /* reasonable cap to keep labels readable */
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Reduce font-size for right-side nav labels (Profile, Prices, About) by ~2px */
.top-bar-right .nav-text {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Make dropdown font-size match top bar nav labels */
.profile-dropdown {
    font-size: var(--topbar-nav-font-size, calc(1em - 2px));
}

/* Hide text on small screens to avoid overflow and provide earlier fallback */
@media (max-width: 720px) {
    .logo-text { display: none; }
    .top-bar-center { max-width: 30%; } /* Give more space to right nav on smaller screens */
}

/* On very small screens reduce nav padding and hide logo text earlier */
@media (max-width: 480px) {
    .logo-text { display: none; }
    .nav-link { padding: 6px 8px; font-size: 0.95em; }
    .nav-icon { width: 18px; height: 18px; }
    .top-bar-center { max-width: 20%; } /* Even more space for right nav on very small screens */
    .top-bar-inner { width: 100%; padding: 0 12px; box-sizing: border-box; } /* Reduce horizontal padding to give more room */
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

/* Card styles */
.card {
    background-color: var(--secondary-color);
    border: 1px solid #d1d5da;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.1em;
    font-weight: 400;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s, border-color 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
}

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

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

.btn-danger {
    background-color: #ffffff;
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #f9f9f9;
}

/* Landing Page Styles */
.landing-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 80px); /* Adjust for top bar height */
    text-align: center;
}

.landing-content h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: 600;
}

.landing-content p {
    font-size: 1.3em;
    margin-bottom: 35px;
    color: #586069; /* Softer text color */
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 70px; /* Below the top bar */
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    border-left: 4px solid;
}

/* Profile dropdown shown for unauthenticated users */
.profile-dropdown {
    position: absolute;
    min-width: 220px;
    max-width: 320px;
    /* Force the dropdown background to pure white to match app background */
    background: #ffffff;
    color: var(--text-color-dark, #000);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 18px 40px rgba(2,6,23,0.18);
    border-radius: 14px;
    padding: 16px 16px 14px 16px;
    transform: translateY(8px);
    opacity: 0;
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease;
    z-index: 2000;
}

.profile-dropdown.open {
    transform: translateY(0);
    opacity: 1;
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.profile-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #38966a), #2f8e57);
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12) inset;
}

.profile-heading-text {
    font-weight: 700;
    font-size: 1rem;
    color: rgba(0,0,0,0.9);
}

/* Close icon in dropdown */
.profile-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: rgba(0,0,0,0.45);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}
.profile-close:hover { background: rgba(0,0,0,0.03); color: rgba(0,0,0,0.65); }

.profile-dropdown-body {
    font-size: 0.95rem;
    color: rgba(0,0,0,0.65);
    margin-bottom: 12px;
}

.profile-dropdown-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    flex-direction: row; /* actions aligned in a single row */
    align-items: center;
}

.profile-dropdown .btn {
    padding: 10px 14px;
    border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.08s ease, box-shadow 0.12s ease, opacity 0.12s ease;
    width: auto;
    text-align: center;
    box-sizing: border-box;
    flex: 1 1 auto; /* allow buttons to share row space */
}

.profile-dropdown .btn:active { transform: translateY(1px); }

.profile-dropdown .btn-primary {
    background: var(--vyc-chrome, #2b2f33);
    color: var(--text-color-light, #fff);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.profile-dropdown .btn-primary:hover { opacity: 0.96; background: #000; }

.profile-dropdown .btn-secondary {
    background: transparent;
    color: rgba(0,0,0,0.8);
    border: 1px solid rgba(0,0,0,0.08);
}

/* Cancel button style for dropdown: white background with chrome text and chrome outline */
.profile-dropdown .btn-cancel {
    background: #ffffff;
    color: var(--vyc-chrome, #2b2f33);
    border: 1px solid rgba(43,47,51,0.2);
}

.profile-dropdown .btn-cancel:hover {
    border-color: var(--vyc-chrome, #2b2f33);
}

.profile-dropdown .credits-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color, #38966a), #2f8e57);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 8px;
}

/* Inline credits used in dropdown header (small, non-pill) */
.credits-inline {
    display: inline-block;
    font-weight: 700;
    color: var(--primary-color, #38966a);
    margin-right: 8px;
}

/* Hide the topbar badge entirely (credits should not show in topbar) */
.credits-badge { display: none !important; }

/* Slight divider just above actions for a polished look */
.profile-dropdown .actions-divider {
    height: 1px;
    background: rgba(0,0,0,0.04);
    margin: 8px 0 12px 0;
}

.toast.toast-success {
    border-left-color: #28a745;
}

.toast.toast-error {
    border-left-color: #dc3545;
}

.toast.toast-warning {
    border-left-color: #ffc107;
}

.toast.toast-info {
    border-left-color: #17a2b8;
}

.toast.toast-message {
    border-left-color: #6c757d;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.toast.toast-success .toast-icon {
    color: #28a745;
}

.toast.toast-error .toast-icon {
    color: #dc3545;
}

.toast.toast-warning .toast-icon {
    color: #ffc107;
}

.toast.toast-info .toast-icon {
    color: #17a2b8;
}

.toast.toast-message .toast-icon {
    color: #6c757d;
}

.toast-content {
    flex: 1;
    font-size: 14px;
    color: #24292e;
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6a737d;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #24292e;
}

.toast.toast-hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Mobile responsiveness for toasts */
@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* About page specific styles */
.about-container {
    width: 50vw;
    max-width: 980px;
    min-width: 420px;
    margin: 48px auto; /* create open space left/right */
    background: #ffffff; /* white content area */
    padding: 48px 40px;
    box-shadow: none;
}

.about-hero {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.about-hero .hero-text h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    color: var(--primary-color);
}

.about-hero .hero-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.about-section { margin-bottom: 18px; }

.how-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.how-step { background: transparent; border: none; border-bottom: 1px solid #efefef; padding: 12px 0; }
.how-step h3 { margin: 0 0 6px 0; color: var(--text-primary); font-weight:600; }
.how-step p { margin: 0; color: var(--text-secondary); line-height: 1.5; }

.stat-tiles { display: flex; gap: 12px; flex-direction: column; }
.stat-tile { background: transparent; border: none; padding: 8px 0; min-width:160px; }
.stat-tile strong { display:block; color:#666; font-size:13px; font-weight:600; }
.stat-tile .value { font-size:20px; color:#222; margin-top:6px; font-weight:700; }

.image-grid { display:grid; grid-template-columns: 1fr; gap:12px; margin-top:12px; }
.image-card { background: transparent; border: none; padding: 0; text-align:center; }
.image-card img { max-width:100%; height:auto; display:block; margin:0 auto; }
.image-caption { font-size:13px; color:#6c757d; margin-top:8px; }

@media (max-width: 1000px) {
    .about-container { width: 90vw; min-width: auto; }
}

@media (max-width: 600px) {
    .about-hero { flex-direction: column; align-items: flex-start; }
    .about-hero .hero-text h1 { font-size: 22px; }
}

/* Remove rounded corners globally in content area for minimalist look */
.card, .how-step, .stat-tile, .image-card { border-radius: 0 !important; }

/* Market Clarity Theme (VYC) */
.vyc-container{width:92%;max-width:1180px;margin:0 auto}

/* Hero Section */
.vyc-hero{padding:100px 0 80px;background:radial-gradient(circle at top right, rgba(56,150,106,0.05), transparent 40%);}
.vyc-hero-grid{display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center}
.vyc-hero-content h1{font-size:3.5rem;line-height:1.1;color:var(--vyc-chrome);margin:0 0 24px;letter-spacing:-0.02em}
.vyc-hero-content p{font-size:1.15rem;color:var(--muted);line-height:1.6;margin-bottom:32px;max-width:540px}

.vyc-pill-group{display:flex;gap:12px;margin-bottom:24px;flex-wrap:wrap}
.vyc-pill{padding:6px 16px;background:rgba(56,150,106,0.1);color:var(--vyc-green);border-radius:100px;font-size:0.9rem;font-weight:600}

.vyc-cta-group{display:flex;gap:16px}
.vyc-btn{padding:14px 28px;border-radius:100px;font-weight:600;text-decoration:none;transition:all 0.2s ease; display: inline-block; border: none; cursor: pointer;}
.vyc-btn-primary{background:var(--vyc-chrome);color:#fff}
.vyc-btn-primary:hover{background:#000;transform:translateY(-2px)}
.vyc-btn-outline{border:1px solid var(--border);color:var(--vyc-chrome);background:#fff}
.vyc-btn-outline:hover{border-color:var(--vyc-chrome)}

/* Visual Abstract */
.vyc-visual-abstract{position:relative;height:400px;background:var(--card);border-radius:24px;overflow:hidden;border:1px solid var(--border)}
.vyc-visual-abstract svg{width:100%;height:100%;opacity:0.8}
.vyc-float-card{position:absolute;background:#fff;padding:16px 20px;border-radius:16px;box-shadow:0 20px 40px rgba(0,0,0,0.08);border:1px solid var(--border);display:flex;align-items:center;gap:12px;animation:float 6s ease-in-out infinite}
.vyc-float-card.top-right{top:40px;right:40px}
.vyc-float-card.bottom-left{bottom:40px;left:40px;animation-delay:2s}
.vyc-icon-box{width:40px;height:40px;background:rgba(56,150,106,0.1);border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--vyc-green)}

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

/* Stats Strip */
.vyc-stats{padding:60px 0;border-bottom:1px solid var(--border)}
.vyc-stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px}
.vyc-stat-item h3{font-size:2rem;margin:0 0 8px;color:var(--vyc-chrome)}
.vyc-stat-item p{margin:0;color:var(--muted);font-size:0.95rem}

/* Dual Value Prop */
.vyc-split{padding:100px 0}
.vyc-split-header{text-align:center;max-width:700px;margin:0 auto 60px}
.vyc-split-header h2{font-size:2.5rem;margin:0 0 16px;color:var(--vyc-chrome)}
.vyc-split-header p{font-size:1.1rem;color:var(--muted)}

.vyc-cards-row{display:grid;grid-template-columns:1fr 1fr;gap:32px}
.vyc-feature-card{padding:40px;border-radius:24px;background:#fff;border:1px solid var(--border);transition:transform 0.3s ease}
.vyc-feature-card:hover{transform:translateY(-5px);border-color:var(--vyc-green)}
.vyc-feature-card h3{font-size:1.5rem;margin:0 0 16px;color:var(--vyc-chrome)}
.vyc-feature-card ul{padding:0;list-style:none;margin:0}
.vyc-feature-card li{margin-bottom:12px;padding-left:24px;position:relative;color:var(--muted)}
.vyc-feature-card li::before{content:"→";position:absolute;left:0;color:var(--vyc-green)}

/* Comparison Redesign */
.vyc-compare-section{padding:80px 0;background:var(--card)}
.vyc-compare-container{background:#fff;border-radius:32px;padding:60px;box-shadow:0 4px 20px rgba(0,0,0,0.02);border:1px solid var(--border)}
.vyc-compare-title{text-align:center;margin-bottom:48px}
.vyc-compare-title h2{font-size:2rem;margin-bottom:12px;color:var(--vyc-chrome)}

.vyc-vs-grid{display:grid;grid-template-columns:1fr auto 1fr;gap:40px;align-items:center}
.vyc-car-card{padding:32px;border-radius:20px;background:var(--card);border:1px solid transparent;transition:all 0.3s}
.vyc-car-card.winner{background:#fff;border-color:var(--vyc-green);box-shadow:0 12px 32px rgba(56,150,106,0.1)}
.vyc-car-card h4{margin:0 0 8px;font-size:1.25rem;color:var(--vyc-chrome)}
.vyc-car-meta{font-size:0.9rem;color:var(--muted);margin-bottom:16px;display:block}
.vyc-car-price{font-size:1.5rem;font-weight:700;color:var(--vyc-chrome);margin-bottom:20px}

.vyc-vs-badge{width:48px;height:48px;background:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:bold;color:var(--muted);border:1px solid var(--border)}

.vyc-tags{display:flex;flex-wrap:wrap;gap:8px}
.vyc-tag{font-size:0.8rem;padding:4px 12px;background:rgba(0,0,0,0.05);border-radius:100px;color:var(--muted)}
.vyc-tag.highlight{background:rgba(56,150,106,0.1);color:var(--vyc-green)}

@media (max-width: 900px) {
    .vyc-hero-grid, .vyc-stats-grid, .vyc-cards-row, .vyc-vs-grid{grid-template-columns:1fr}
    .vyc-vs-badge{margin:20px auto;transform:rotate(90deg)}
    .vyc-hero-content h1{font-size:2.5rem}
}

/* Footer Styles */
.site-footer {
    background-color: #2b2f33;
    color: #ffffff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-col h5 {
    color: #67b656; /* Match top bar color or theme accent */
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-col p {
    color: #d4d2c5;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #d4d2c5;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

