:root {
    --bg-dark: #0f111a;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6;
    /* Blue */
    --accent-secondary: #8b5cf6;
    /* Purple */
    --accent-success: #10b981;
    /* Green */
    --accent-danger: #ef4444;
    /* Red */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Globs */
.background-glob {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -200px;
    left: -200px;
    z-index: -1;
    filter: blur(80px);
}

.glob-2 {
    top: auto;
    bottom: -200px;
    left: auto;
    right: -200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.app-header {
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.app-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin: 0;
    font-weight: 700;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Section Common */
.dashboard-section {
    margin-bottom: 4rem;
}

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

h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin: 0;
}

/* Filters */
.filter-group {
    display: flex;
    gap: 0.5rem;
    background: var(--glass-bg);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

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

/* Comparisons Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.source-column {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s;
}

.source-column:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.source-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.rank-number {
    font-weight: 700;
    color: var(--accent-secondary);
    font-size: 1.2rem;
    width: 24px;
}

/* Car List */
.car-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.car-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.car-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-primary);
}

.car-card-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.car-card-header h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

.car-card-header .trim {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-top: 0.25rem;
}

.car-card-body {
    padding: 1.5rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spec-value {
    font-weight: 500;
    font-size: 0.95rem;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.tag.source-tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #1a1d2d;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    position: relative;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

.close-btn:hover {
    color: var(--text-main);
}

.verdict-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    color: #34d399;
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.list-group h4 {
    margin-top: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pros-list li {
    color: var(--accent-success);
    margin-bottom: 0.5rem;
}

.cons-list li {
    color: var(--accent-danger);
    margin-bottom: 0.5rem;
}

.hidden {
    display: none;
}
/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.insight-card {
    transition: transform 0.2s;
}

.insight-card:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.06) !important;
}

/* ========== Navigation ========== */
.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-primary);
}

/* ========== Notes Page ========== */
.notes-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--glass-bg);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.notes-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.notes-tab.active {
    background: var(--accent-primary);
    color: white;
}

.tab-icon {
    font-size: 1.1rem;
}

/* Notes Sections */
.notes-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.notes-section h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
}

.section-desc {
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
}

/* Notes Tables */
.table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.notes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.notes-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.notes-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
    line-height: 1.4;
}

.notes-table tr:last-child td {
    border-bottom: none;
}

.notes-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.abbr-cell {
    font-weight: 700;
    color: var(--accent-primary);
    font-family: monospace;
    font-size: 0.95rem;
}

.verdict-pass {
    color: var(--accent-success);
    font-weight: 500;
}

.verdict-fail {
    color: var(--accent-danger);
    font-weight: 500;
}

/* Search Tips */
.search-tip {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid var(--accent-primary);
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
}

/* Search Reference Grid */
.search-ref-section {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
}

.search-ref-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.search-ref-row {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    align-items: center;
}

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

.search-ref-brand {
    font-weight: 500;
    font-size: 0.9rem;
}

.search-ref-terms code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--accent-primary);
}

/* Prose Sections */
.prose-section {
    border-radius: 0 16px 16px 0;
}

.prose-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.prose-content {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 0.95rem;
}

.prose-content ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.prose-content li {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

.prose-content strong {
    color: var(--text-main);
}

/* Quotes */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.review-quote {
    margin: 0;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent-secondary);
    padding: 1rem 1.25rem;
    border-radius: 0 12px 12px 0;
}

.review-quote p {
    margin: 0 0 0.75rem 0;
    color: #cbd5e1;
    font-style: italic;
    line-height: 1.5;
    font-size: 0.9rem;
}

.review-quote cite {
    font-style: normal;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Verdict / Ratings */
.ratings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rating-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
}

.rating-grade {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    border-radius: 12px;
    flex-shrink: 0;
}

.rating-info {
    flex: 1;
}

.rating-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.rating-detail {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.verdict-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.9rem;
}
