:root {
    --brand-green: #00A86B;
    --brand-green-light: #e8f5e9;
    --brand-orange: #ff9800;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --bg-body: #f4f7fa;
    --card-bg: #ffffff;
    --border-soft: #edf2f7;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-body);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.title-section {
    text-align: left;
    padding: 25px 20px;
    background: white;
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 1px solid #edf2f7;
}

.title-section h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-section h1::before {
    content: '';
    width: 4px;
    height: 24px;
    background: #00A86B;
    border-radius: 2px;
}

.title-section .subtitle {
    font-size: 14px;
    color: #7f8c8d;
    max-width: 800px;
    margin: 0;
    padding-left: 14px;
}

.car-info {
    flex: 1;
    min-width: 0;
}

.car-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.car-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
    background: white;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.car-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.car-code {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.car-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .car-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card {
    background: linear-gradient(135deg, var(--brand-green-light) 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 15px 20px;
    border: 1px solid var(--border-soft);
}

.stat-card .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-card .value {
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-green);
}

.stat-card .unit {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: normal;
}

.view-report-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #00A86B 0%, #00E086 100%);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,168,107,0.3);
}

.view-report-link:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,168,107,0.4);
}

.list-section {
    margin-bottom: 30px;
}

.list-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
    justify-content: flex-end;
}

.search-box {
    flex: none;
    min-width: 200px;
    max-width: 300px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 13px;
    transition: var(--transition);
    background: var(--card-bg);
}

.search-box input:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(0,168,107,0.1);
}

.search-box .fa-search {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-right: 5px;
}

.data-table-wrapper {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--border-soft);
}

.table_rank {
    width: 100%;
    margin-bottom: 0 !important;
}

.table_rank thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--brand-green);
    font-weight: 600;
    color: var(--text-dark);
    padding: 12px 10px;
    white-space: nowrap;
    font-size: 13px;
}

.table_rank tbody td {
    padding: 12px 10px;
    vertical-align: middle;
    border-top: 1px solid var(--border-soft);
    font-size: 13px;
}

.table_rank tbody tr:hover {
    background: var(--brand-green-light);
}

.brand-logo {
    max-height: 24px;
    vertical-align: middle;
}

.chexi-link {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.chexi-link:hover {
    color: var(--brand-green);
    text-decoration: none;
}

.view-report-btn {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #00A86B 0%, #00E086 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.view-report-btn:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,168,107,0.3);
}

.model-code {
    color: var(--text-muted);
    font-size: 12px;
    font-family: monospace;
}

.car-type-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--brand-green-light);
    color: var(--brand-green);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.fuel-type-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #fff3e0;
    color: #e65100;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.fuel-type-badge.ev {
    background: #e3f2fd;
    color: #1565c0;
}

.energy-value {
    font-weight: 700;
    color: var(--brand-green);
}

.energy-unit {
    font-size: 12px;
    color: var(--text-muted);
}

.mileage-value {
    font-weight: 600;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .title-section {
        padding: 30px 15px 25px;
    }
    
    .title-section h1 {
        font-size: 24px;
    }
    
    .title-section .subtitle {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .car-name {
        font-size: 20px;
    }
    
    .car-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-card .value {
        font-size: 18px;
    }
    
    .search-box {
        min-width: 100%;
        max-width: 100%;
    }
    
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
        margin-bottom: 10px;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #12141a;
        --card-bg: #1c1f26;
        --text-dark: #e2e8f0;
        --text-muted: #94a3b8;
        --border-soft: #2d333f;
        --brand-green-light: rgba(74, 222, 128, 0.15);
    }
    
    .car-name,
    .chexi-link {
        color: var(--text-dark);
    }
    
    .table_rank tbody tr:hover {
        background: rgba(74, 222, 128, 0.1);
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.hidden {
    display: none;
}

.report-modal {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: var(--brand-green);
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.modal-content .report-header {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.modal-content .breadcrumb-section {
    padding: 20px 30px;
}

.modal-content .page-container {
    padding: 0 30px 30px;
    max-width: 100%;
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .report-modal {
        max-height: 95vh;
    }
    
    .modal-content .breadcrumb-section {
        padding: 15px 20px;
    }
    
    .modal-content .page-container {
        padding: 0 15px 20px;
    }
    
    .modal-close-btn {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}