/* CSS Custom Properties for Responsive Charts */
:root {
    /* Chart responsive variables */
    --chart-aspect-ratio: 2.5;
    --chart-maintain-aspect: 1; /* 1 = true, 0 = false */
    --chart-title-size: 16px;
    --chart-axis-title-size: 14px;
    --chart-tick-size: 12px;
    --chart-y-tick-size: 13px;
    --chart-padding: 20px;
    --chart-y-padding: 15px;
    --chart-truncate-brands: 0; /* 0 = no, 1 = yes */
    --chart-truncate-length: 999; /* Long length = no truncation */
}

/* Tablet and smaller */
@media (max-width: 1024px) {
    :root {
        --chart-aspect-ratio: 2.2;
        --chart-title-size: 15px;
        --chart-axis-title-size: 13px;
        --chart-tick-size: 11px;
        --chart-y-tick-size: 12px;
        --chart-padding: 18px;
        --chart-y-padding: 12px;
    }
}

/* Mobile landscape */
@media (max-width: 768px) {
    :root {
        --chart-aspect-ratio: 1.8;
        --chart-maintain-aspect: 0; /* false */
        --chart-title-size: 14px;
        --chart-axis-title-size: 12px;
        --chart-tick-size: 10px;
        --chart-y-tick-size: 11px;
        --chart-padding: 15px;
        --chart-y-padding: 10px;
        --chart-truncate-brands: 1; /* yes */
        --chart-truncate-length: 12;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    :root {
        --chart-aspect-ratio: 1.2;
        --chart-title-size: 12px;
        --chart-axis-title-size: 10px;
        --chart-tick-size: 9px;
        --chart-y-tick-size: 9px;
        --chart-padding: 10px;
        --chart-y-padding: 5px;
        --chart-truncate-length: 10;
    }
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    font-size: 0.95rem;
}

.cookie-text i {
    font-size: 1.2rem;
    color: #f39c12;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.btn-accept {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-accept:hover {
    background-color: #229954;
}

.btn-decline {
    background-color: transparent;
    color: #bdc3c7;
    border: 1px solid #bdc3c7;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-decline:hover {
    background-color: #bdc3c7;
    color: #2c3e50;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
}

/* Heatmap Styles */
.heatmap-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0 auto;
    max-width: 100%;
    overflow-x: auto;
}

.heatmap-header {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.heatmap-corner {
    width: 120px;
    min-width: 120px;
    padding: 12px;
    font-weight: bold;
    text-align: center;
    background-color: #e9ecef;
    border-right: 1px solid #dee2e6;
}

.heatmap-header-cell {
    flex: 1;
    min-width: 80px;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.85rem;
    background-color: #e9ecef;
    border-right: 1px solid #dee2e6;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.heatmap-body {
    display: flex;
    flex-direction: column;
}

.heatmap-row {
    display: flex;
    border-bottom: 1px solid #dee2e6;
}

.heatmap-brand-cell {
    width: 120px;
    min-width: 120px;
    padding: 12px;
    font-weight: bold;
    background-color: #f8f9fa;
    border-right: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.heatmap-cell {
    flex: 1;
    min-width: 80px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    border-right: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.heatmap-cell.zero {
    background-color: #f8f9fa;
    color: #6c757d;
}

.heatmap-cell.low {
    background-color: #d4edda;
    color: #155724;
}

.heatmap-cell.medium {
    background-color: #fff3cd;
    color: #856404;
}

.heatmap-cell.high {
    background-color: #f8d7da;
    color: #721c24;
}

.heatmap-cell.very-high {
    background-color: #f5c6cb;
    color: #721c24;
}

.heatmap-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.low {
    background-color: #d4edda;
}

.legend-color.medium {
    background-color: #fff3cd;
}

.legend-color.high {
    background-color: #f8d7da;
}

.legend-color.very-high {
    background-color: #f5c6cb;
}

@media (max-width: 768px) {
    .heatmap-header-cell {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 0.75rem;
        padding: 8px 4px;
    }
    
    .heatmap-brand-cell {
        width: 100px;
        min-width: 100px;
        font-size: 0.85rem;
        padding: 8px;
    }
    
    .heatmap-cell {
        min-width: 60px;
        height: 50px;
        font-size: 0.8rem;
    }
    
    .heatmap-legend {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}

/* Mobile Heatmap Layout */
.heatmap-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.brand-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.brand-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 1rem 1.5rem;
}

.brand-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-issues {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.issue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
    font-weight: 500;
}

.issue-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.issue-category {
    font-size: 0.95rem;
    color: #2c3e50;
    flex: 1;
}

.issue-count {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 30px;
    text-align: center;
}

/* Color classes for mobile issues */
.issue-item.low {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.issue-item.low .issue-category {
    color: #155724;
}

.issue-item.low .issue-count {
    background-color: #155724;
    color: white;
}

.issue-item.medium {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.issue-item.medium .issue-category {
    color: #856404;
}

.issue-item.medium .issue-count {
    background-color: #856404;
    color: white;
}

.issue-item.high {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.issue-item.high .issue-category {
    color: #721c24;
}

.issue-item.high .issue-count {
    background-color: #721c24;
    color: white;
}

.issue-item.very-high {
    background-color: #f5c6cb;
    border-color: #f1aeb5;
}

.issue-item.very-high .issue-category {
    color: #721c24;
}

.issue-item.very-high .issue-count {
    background-color: #721c24;
    color: white;
}

header {
    background-color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e0e0e0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-section {
    flex: 1;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    margin-bottom: 0.25rem;
    display: block;
}

.logo:hover {
    color: #3498db;
    transition: color 0.3s ease;
}

.slogan {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 0.25rem;
}

.header-actions {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-section {
    flex-shrink: 0;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.hidden {
    display: none !important;
}

.user-menu {
    display: flex;
    align-items: center;
}

.user-dropdown {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 50px;
    border: 2px solid transparent;
    cursor: pointer;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.user-profile-btn:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3498db;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    overflow: hidden;
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #2c3e50;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: #7f8c8d;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 4px 0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-signin {
    background-color: transparent;
    color: #2c3e50;
    border: 2px solid #2c3e50;
}

.btn-signin:hover {
    background-color: #2c3e50;
    color: white;
}

.btn-signup {
    background-color: #3498db;
    color: white;
    border: 2px solid #3498db;
}

.btn-signup:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-share {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-share::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-share:hover::before {
    left: 0;
}

.btn-share:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-share:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

/* Main content area (placeholder) */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.hero-section {
    text-align: center;
    padding: 3rem 0;
}

.hero-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

/* Top Reviewed Section */
.top-reviewed {
    background-color: #f8f9fa;
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-weight: 600;
}

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

.carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
}

.carousel::-webkit-scrollbar {
    height: 8px;
}

.carousel::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.carousel::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.car-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    min-width: 320px;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.car-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.car-brand {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.car-model {
    font-size: 1.1rem;
    color: #34495e;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.car-fuel {
    font-size: 0.9rem;
    color: #7f8c8d;
    background-color: #ecf0f1;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    display: inline-block;
    margin-top: 0.5rem;
}

.rating-section {
    text-align: center;
    margin: 1rem 0;
}

.rating-score {
    font-size: 2rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 0.25rem;
}

.rating-text {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.stars {
    color: #f39c12;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.critical-aspects {
    margin: 1rem 0;
}

.aspects-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    text-align: center;
}

.aspect-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f2f6;
}

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

.aspect-name {
    font-size: 0.9rem;
    color: #34495e;
    font-weight: 500;
}

.aspect-count {
    background-color: #e74c3c;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.view-btn {
    width: 100%;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.view-btn:hover {
    background-color: #2980b9;
}

/* Search Section */
.search-section {
    background-color: #ffffff;
    padding: 3rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.search-title {
    text-align: center;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.search-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.search-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.form-input, .form-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: white;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #3498db;
}

.search-btn {
    width: 100%;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #2980b9;
}

/* Car Detail View */
.car-detail {
    display: none;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.car-detail.active {
    display: block;
}

.detail-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.detail-car-brand {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-car-model {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.detail-car-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Statistics Section */
.statistics-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.statistics-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

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

.stat-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.stat-component {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-count {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
}

.stat-label {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Rating Section */
.rating-detail-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.rating-detail-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.rating-display {
    margin-bottom: 1rem;
}

.rating-number {
    font-size: 4rem;
    font-weight: bold;
    color: #e74c3c;
    line-height: 1;
}

.rating-stars-large {
    font-size: 2rem;
    color: #f39c12;
    margin: 1rem 0;
}

.review-count {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.back-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 2rem;
    transition: background-color 0.3s ease;
}

.back-btn:hover {
    background-color: #7f8c8d;
}

/* Responsive design */
@media (max-width: 992px) {
    .btn-share {
        padding: 0.8rem 1.8rem;
        font-size: 0.98rem;
    }
    
    .header-actions {
        margin-right: 1rem;
    }
    
    .lang-selector {
        margin-right: 15px;
    }
}

@media (max-width: 768px) {
    .search-form {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .detail-header {
        padding: 1.5rem;
    }

    .detail-car-brand {
        font-size: 2rem;
    }

    .detail-car-model {
        font-size: 1.25rem;
    }

    .detail-car-info {
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .rating-number {
        font-size: 3rem;
    }

    .rating-stars-large {
        font-size: 1.5rem;
    }

    .carousel {
        gap: 1rem;
    }

    .car-card {
        min-width: 280px;
        padding: 1.25rem;
    }

    .car-brand {
        font-size: 1.2rem;
    }

    .car-model {
        font-size: 1rem;
    }

    .rating-score {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .header-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .logo-section {
        order: 1;
    }

    .header-actions {
        order: 2;
    }

    .auth-section {
        order: 3;
    }

    .btn-share {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .logo {
        font-size: 1.75rem;
    }

    .slogan {
        font-size: 0.85rem;
    }

    .auth-buttons {
        justify-content: center;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ============================
   NEW HOME PAGE DASHBOARD STYLES
   ============================ */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

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

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: white;
    opacity: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Search Container */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.search-icon {
    color: #7f8c8d;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #2c3e50;
    padding: 0.75rem;
}

.search-input::placeholder {
    color: #95a5a6;
}

.search-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #2980b9;
}

.search-btn i {
    margin-right: 0.5rem;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

.search-loading,
.search-error,
.search-empty {
    padding: 2rem;
    text-align: center;
    color: #7f8c8d;
}

.search-result-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #ecf0f1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
}

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

.result-car-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.result-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.result-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.result-rating i {
    font-size: 0.85rem;
}

.result-reviews {
    color: #7f8c8d;
}

/* Dashboard Section */
.dashboard-section {
    background: #f8f9fa;
    padding: 3rem 2rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #ecf0f1;
}

.card-header h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header i {
    color: #3498db;
}

.card-subtitle {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.card-body {
    padding: 2rem;
}

/* Special case for card-body containing reviews-feed */
.reviews-container {
    padding: 0;
}

/* Top Cars Grid */
.top-cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Cars List */
.cars-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.car-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.car-item:hover {
    transform: translateX(5px);
    background: #ecf0f1;
}

.car-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3498db;
    min-width: 40px;
    text-align: center;
}

.car-details {
    flex: 1;
}

.car-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.car-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    align-items: center;
}

.car-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}

.car-rating i {
    font-size: 0.85rem;
}

.rating-good {
    color: #27ae60;
}

.rating-medium {
    color: #f39c12;
}

.rating-low {
    color: #e67e22;
}

.rating-bad {
    color: #e74c3c;
}

.car-reviews,
.car-issues {
    color: #7f8c8d;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: #95a5a6;
}

.loading-spinner i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Reviews Feed */
.reviews-feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #ffffff;
}

/* Custom scrollbar for reviews feed */
.reviews-feed::-webkit-scrollbar {
    width: 6px;
}

.reviews-feed::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.reviews-feed::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.reviews-feed::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.review-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.review-user {
    font-weight: 600;
    color: #2c3e50;
}

.review-time {
    font-size: 0.85rem;
    color: #95a5a6;
}

.review-car {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.review-rating i {
    font-size: 0.9rem;
}

.review-comment {
    font-size: 0.95rem;
    color: #7f8c8d;
    font-style: italic;
    line-height: 1.6;
}

.review-status-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-status-badge.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.review-status-badge.approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #95a5a6;
    font-size: 1.1rem;
}

/* Chart Container Improvements */
.card-body canvas {
    padding: 1rem 0;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#carIssuesChart {
    min-height: 500px !important;
}

#issuesChart,
#mileageChart {
    padding: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .search-box {
        flex-direction: column;
        padding: 1rem;
        border-radius: 12px;
    }

    .search-input {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .search-btn {
        width: 100%;
    }

    .top-cars-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-header h2 {
        font-size: 1.2rem;
    }

    .card-body {
        padding: 1rem;
    }

    .car-item {
        flex-direction: column;
        text-align: center;
    }

    .car-meta {
        justify-content: center;
    }
}