:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #ec4899;
    --accent-color: #8b5cf6;
    --background-dark: #0f172a;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --font-heading: 'Rubik', sans-serif;
    --font-body: 'Heebo', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-dark);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Dynamic Background */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: drift 20s infinite alternate ease-in-out;
}

.globe-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary-color), transparent);
    top: -100px;
    left: -100px;
}

.globe-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-color), transparent);
    bottom: -150px;
    right: -150px;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

/* Layout */
.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Tabs logic */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(15, 23, 42, 0.4);
    padding: 0.5rem;
    border-radius: 99px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* Inline Action Button (Search) */
.inline-action-btn {
    position: absolute;
    left: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}

.inline-action-btn:hover {
    background: var(--primary-hover);
}

/* Judge Grid - Mobile First */
.judge-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .judge-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Landing Page & New Inputs */
/* Landing Page & Search */
.search-input-wrapper {
    position: relative;
    width: 100%;
    overflow: visible;
}

 .suggestions-dropdown {
     position: absolute;
     top: calc(100% + 8px);
     left: 0;
     right: 0;
     z-index: 3000;
     background: rgba(15, 23, 42, 0.98);
     border: 1px solid rgba(255, 255, 255, 0.12);
     border-radius: 14px;
     box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
     max-height: 260px;
     overflow-y: auto;
     padding: 0.25rem;
 }

 .suggestions-dropdown.hidden {
     display: none;
 }

 .suggestion-item {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 0.75rem;
     padding: 0.75rem 0.9rem;
     border-radius: 12px;
     cursor: pointer;
     user-select: none;
 }

 .suggestion-item:hover {
     background: rgba(255, 255, 255, 0.08);
 }

 .suggestion-model {
     font-weight: 500;
     color: var(--text-light);
     text-align: right;
 }

 .suggestion-price {
     color: #67e8f9;
     font-weight: 700;
     direction: ltr;
     white-space: nowrap;
 }

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 1rem;
    font-size: 1.2rem;
    outline: none;
    width: 100%;
    text-align: center; /* Centered Search Text */
    font-weight: 500;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: absolute;
    left: 5px;
    top: 5px;
    bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Beautiful Search Results */
.search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    margin-top: 1.5rem;
    perspective: 1000px;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    padding-right: 0.5rem;
    border-right: 3px solid var(--primary-color);
}

.group-header.electric { border-color: #34d399; color: #34d399; }
.group-header.plugin { border-color: #38bdf8; color: #38bdf8; }
.group-header.hybrid { border-color: #fbbf24; color: #fbbf24; }

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.car-row {
    background: rgba(30, 41, 59, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.car-row td {
    padding: 1rem;
    border: none;
}

.car-row td:first-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.car-row td:last-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.car-row:hover {
    transform: translateY(-2px) scale(1.01);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
    border-color: rgba(79, 70, 229, 0.3);
}

.car-row.selected {
    background: rgba(79, 70, 229, 0.15);
    border-color: var(--primary-color);
}

.add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.add-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.add-btn.added {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Page Transitions */
.page-enter {
    animation: slideInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-exit {
    animation: slideOutUp 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes slideInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideOutUp {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}


/* Header */
.app-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.logo-area {
    flex: 1;
}

.actions-area {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(5px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.install-btn {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}


.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.logo-container h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-container .icon {
    font-size: 2.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

/* Form Styles */
.form-section h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem; /* Space for icon left (rtl layout) means icon is right actually visually */
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.4);
    color: white;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    background: rgba(15, 23, 42, 0.6);
}

.currency-symbol, .input-icon {
    position: absolute;
    left: 0.75rem; 
    color: var(--text-muted);
    pointer-events: none;
}

/* Radio Cards for Car Type */
.radio-cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 600px) {
    .radio-cards-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

.radio-card {
    cursor: pointer;
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
    height: 100%;
}

.card-content .emoji {
    font-size: 1.5rem;
}

.card-content .text {
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-muted);
}

.radio-card input:checked + .card-content {
    background: rgba(79, 70, 229, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.1);
}

.radio-card input:checked + .card-content .text {
    color: #fff;
    font-weight: 500;
}

.radio-card:hover .card-content {
    background: rgba(15, 23, 42, 0.6);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--glass-border);
    margin: 2rem 0;
}

/* Helper Text */
.helper-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.2rem;
    /* Mirror the arrow for RTL */
    transform: scaleX(-1);
}

/* Insight Panel */
.insight-toggle {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    margin-top: 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.insight-toggle:hover {
    background: rgba(79, 70, 229, 0.1);
}

.insight-panel {
    background: rgba(16, 185, 129, 0.1); /* Emerald-500 tint */
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1rem;
    color: var(--text-light);
    animation: fadeIn 0.3s ease-out;
}

.insight-panel.hidden {
    display: none;
}

.insight-panel h4 {
    color: #34d399; /* Emerald-400 */
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.insight-panel ul {
    list-style-type: disc;
    padding-right: 1.5rem;
    margin: 1rem 0;
    color: var(--text-muted);
}

.insight-panel li {
    margin-bottom: 0.5rem;
}

.insight-panel .highlight {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    margin-top: 1rem;
    border-right: 3px solid #34d399;
}



/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-height: 90vh;
    overflow-y: auto;
    position: relative; /* Ensure z-index works internally if needed */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.setting-group {
    margin-bottom: 1.25rem;
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-with-symbol {
    position: relative;
}

.input-with-symbol input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-size: 1rem;
    padding-left: 2rem; /* space for symbol */
}

.input-with-symbol .symbol {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.checkbox-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-input);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.checkbox-group label {
    margin: 0;
    flex: 1;
}

.checkbox-group input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--primary-color);
}

.info-tooltip {
    cursor: help;
    font-size: 0.8rem;
    margin-right: 0.25rem;
}

.full-width {
    width: 100%;
}

@media (min-width: 600px) {
    .comparison-container {
        flex-direction: row;
    }
}

.comparison-card {
    flex: 1;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.comparison-card.current {
    border-top: 4px solid var(--text-muted);
}

.comparison-card.new {
    border-top: 4px solid var(--primary-color);
    background: linear-gradient(to bottom, rgba(79, 70, 229, 0.1), rgba(15, 23, 42, 0.4));
}

/* Comparison Section Styling */
.comparison-section {
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.comparison-scroller {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.1);
}

.comparison-table-grid {
    display: flex;
    gap: 1.5rem;
    min-width: min-content; /* Ensure items don't shrink */
    padding: 0 1rem;
}

.compare-col {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 0; 
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.compare-col:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.3);
}

.compare-header {
    background: rgba(15, 23, 42, 0.6);
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.compare-model {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    min-height: 3rem; /* Align */
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-price {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 800;
}

.compare-row {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compare-row:last-child {
    border-bottom: none;
}

.compare-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.compare-val {
    color: white;
    font-weight: 500;
}

/* Winner Highlight */
.compare-col.winner {
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.3);
    transform: scale(1.05);
    z-index: 2;
}

.winner-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 99px;
    font-weight: bold;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

.card-title {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

.card-value-group {
    text-align: center;
    margin-bottom: 1.5rem;
}

.card-value-group .label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.card-value-group .value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-light);
}

.comparison-card.new .value {
    color: #a5b4fc;
}

.details-mini {
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
}

.detail-row.highlight-row {
    border-top: 1px dashed var(--glass-border);
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    font-weight: 500;
}

.detail-row.green-discount {
    color: #34d399; /* Emerald-400 */
    font-size: 0.8rem;
}

.detail-row span:last-child {
    font-weight: 600;
    color: var(--text-light);
}

/* Difference Banner */
.difference-banner {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.diff-label {
    color: #fda4af;
    font-weight: 500;
}

.diff-value {
    color: #f43f5e; /* Red-500 from Tailwind */
    font-weight: 700;
    font-size: 1.25rem;
    font-family: var(--font-heading);
    direction: ltr; /* Ensure minus sign aligns correctly */
}


/* Footer */
.app-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.6;
}

.input-group.checkbox-group-inline {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-top: 1.5rem; /* Align vaguely with other inputs */
}

.checkbox-group-inline label {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.checkbox-group-inline input {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- LANDING PAGE --- */
.landing-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 0.5rem;
    box-shadow: 0 0 40px rgba(79, 70, 229, 0.2);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 60px rgba(79, 70, 229, 0.4);
    transform: scale(1.02);
}

.search-icon {
    font-size: 1.5rem;
    padding: 0.75rem;
    color: var(--text-muted);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    outline: none;
    font-family: var(--font-body);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-hover);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Search Results Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 800px;
}

.car-result-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: right;
}

.car-result-card:hover {
    background: rgba(79, 70, 229, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.car-model-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.car-model-price {
    color: #a5b4fc;
    font-size: 0.95rem;
}

.loading-search {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.spinner-sm {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

/* --- JUDGE DASHBOARD --- */
.judge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 700;
}

.price-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: 600;
}

.judge-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .judge-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.judge-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: all 0.3s;
}

.judge-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header-badge {
    padding: 1rem;
    font-weight: 700;
    text-align: center;
    font-size: 1.2rem;
}

.card-header-badge.pink { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.card-header-badge.indigo { background: rgba(99, 102, 241, 0.2); color: #818cf8; }

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.judge-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.judge-result-box {
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.judge-result-box .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.big-result {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.big-result .label { font-size: 0.9rem; margin-bottom: 0.2rem; }
.big-result .value { font-size: 2rem; font-weight: 800; }

.big-result.pink .value { color: #f472b6; }
.big-result.indigo .value { color: #818cf8; }

.explanation {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
}

/* Range Slider */
.range-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.range-wrapper input[type=range] { flex: 1; }

.ai-judge-btn {
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.ai-judge-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
}

.ai-verdict-box {
    margin-top: 2rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    animation: fadeIn 0.5s;
}

.verdict-header {
    color: #34d399;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.verdict-content {
    line-height: 1.6;
}

.hidden { display: none !important; }
/* --- Comparison UI (v2.18) --- */
.add-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
}

.add-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.add-btn.added {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.compare-action-btn.primary {
    background: white;
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.compare-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.compare-action-btn.primary:disabled {
    opacity: 0.6;
}

/* Floating Comparison Bar */
.comparison-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px); /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--primary-color);
    border-radius: 99px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    width: 90%;
    max-width: 400px;
}

 .comparison-bar.visible {
     transform: translateX(-50%) translateY(0);
     opacity: 1;
     pointer-events: auto;
 }
/* --- Search Results Table (v2.17) --- */
.results-table-container {
    width: 100%;
    max-width: 650px; /* Center and constrain */
    overflow-x: auto;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    margin: 1rem auto; /* Center horizontally */
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 300px; /* Ensure scroll on tiny screens */
}

.results-table th, .results-table td {
    padding: 0.75rem 1rem;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.results-table th {
    background: rgba(30, 41, 59, 0.8);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.group-header {
    background: rgba(15, 23, 42, 0.95);
    color: var(--primary-color);
    font-weight: 700;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 4px solid var(--primary-color);
    position: sticky;
    top: 0; /* Sticky headers within container if height constrained */
}

.group-header.electric { border-color: #34d399; color: #34d399; } /* Green/Traffic */
.group-header.plugin { border-color: #38bdf8; color: #38bdf8; }   /* Blue */
.group-header.hybrid { border-color: #fbbf24; color: #fbbf24; }   /* Yellow */
.group-header.petrol { border-color: #94a3b8; color: #cbd5e1; }   /* Grey */

.fuel-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    background: rgba(255,255,255,0.1);
    white-space: nowrap;
}

.car-row {
    cursor: pointer;
    transition: background 0.2s;
}

.car-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.car-row.selected {
    background: rgba(79, 70, 229, 0.15);
    border-right: 3px solid var(--primary-color);
}

.compare-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* App Navigation */
.app-nav {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.nav-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Content Sections */
.content-section {
    margin-top: 2rem;
    padding-bottom: 4rem;
}

.section-header {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* FAQ Styles */
.faq-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.faq-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
}

.faq-item h3 {
    margin-bottom: 1rem;
    color: var(--primary-light);
    font-size: 1.1rem;
}

.faq-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
}

/* Catalog Table Styles */
.catalog-table-wrapper {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: auto;
}

.catalog-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.catalog-table th, .catalog-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.catalog-table th {
    background: rgba(15, 23, 42, 0.6);
    color: var(--primary-light);
    font-weight: 700;
    position: sticky;
    top: 0;
}

.catalog-search-input {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 99px;
    width: 100%;
    max-width: 400px;
    font-size: 1rem;
}

/* SEO Info Section (Retried) */
.seo-info-section {
    margin: 4rem 0;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.seo-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
}

.seo-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-light);
    font-size: 1.2rem;
}

.seo-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.seo-text-block {
    text-align: right;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.seo-text-block h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.seo-text-block p {
    font-size: 1rem;
    line-height: 1.8;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.seo-text-block ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.seo-text-block li {
    background: rgba(79, 70, 229, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    border-right: 3px solid var(--primary-color);
}
