:root {
    --honda-blue: #0046AD;
    --vinfast-red: #E31837;
    --dark-bg: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Encode Sans', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.interactive-container {
    max-width: 1000px;
    margin: 0 auto;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    padding-bottom: 50px;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: 100px 40px;
    text-align: center;
    background: url('hero_background_motorbike_competition_1770267561517.png') center/cover;
    border-bottom: 2px solid var(--vinfast-red);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), #0f172a);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-block;
    letter-spacing: 3px;
    font-size: 14px;
    font-weight: 700;
    color: var(--vinfast-red);
    margin-bottom: 15px;
}

h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.highlight {
    background: linear-gradient(90deg, var(--honda-blue), var(--vinfast-red));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sapo {
    max-width: 700px;
    margin: 0 auto;
    font-size: 18px;
    color: var(--text-muted);
}

/* --- Section Styling --- */
.section {
    padding: 60px 20px;
    border-bottom: 1px solid var(--glass-border);
}

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--vinfast-red);
    margin: 10px auto;
}

/* --- Chart Section --- */
.chart-container {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-bottom: 30px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.honda {
    background-color: var(--honda-blue);
}

.dot.vinfast {
    background-color: var(--vinfast-red);
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 250px;
    padding-top: 40px;
    border-bottom: 2px solid var(--glass-border);
}

.bar {
    position: relative;
    cursor: pointer;
}

.bar:hover {
    filter: brightness(1.3);
}

.bar::after {
    content: attr(data-value);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.bar:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

/* Bar styles in script.js */

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border-left: 5px solid;
    background: var(--card-bg);
}

.stat-card.honda {
    border-color: var(--honda-blue);
}

.stat-card.vinfast {
    border-color: var(--vinfast-red);
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    margin: 5px 0;
}

/* --- Comparison Section --- */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.comp-box {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.brand-header {
    padding: 15px;
    text-align: center;
    font-weight: 800;
    letter-spacing: 2px;
}

.brand-header.honda {
    background: var(--honda-blue);
}

.brand-header.vinfast {
    background: var(--vinfast-red);
}

.comp-content {
    padding: 25px;
    text-align: center;
}

.donut-chart-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
}

.donut-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.donut-label span {
    font-size: 12px;
    color: var(--text-muted);
}

.product-list {
    list-style: none;
    text-align: left;
    font-size: 14px;
}

.product-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Pricing Table --- */
.pricing-table {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
}

.price-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    align-items: center;
}

.price-row.header {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.price-row.highlight {
    background: rgba(56, 189, 248, 0.05);
}

.price-col {
    text-align: center;
}

.price-col.label {
    font-weight: 600;
    text-align: left;
    color: var(--accent);
}

.price-col small {
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--honda-blue), var(--vinfast-red));
    transform: translateX(-50%);
}

.timeline-item {
    width: 45%;
    margin-bottom: 30px;
    position: relative;
}

.timeline-item.right {
    margin-left: auto;
}

.time-point {
    position: absolute;
    top: 0;
    width: 80px;
    padding: 4px 0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.timeline-item.left .time-point {
    right: -120px;
}

.timeline-item.right .time-point {
    left: -120px;
}

.time-point.honda {
    background: var(--honda-blue);
}

.time-point.vinfast {
    background: var(--vinfast-red);
}

.time-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

/* --- Main Point & Button --- */
.main-point-box {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--glass-border);
    border-radius: 15px;
}

.btn-more {
    display: block;
    margin: 15px auto 0;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--vinfast-red);
    color: var(--vinfast-red);
    font-family: inherit;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-more:hover {
    background: var(--vinfast-red);
    color: white;
    box-shadow: 0 0 15px rgba(227, 24, 55, 0.4);
}

/* --- Comparison Table --- */
.comparison-table-wrapper {
    margin: 20px 0;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--text-main);
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.comparison-table th {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* --- Final Footer --- */
.final-word {
    padding: 60px 20px;
}

.final-box {
    background: linear-gradient(135deg, var(--honda-blue), var(--vinfast-red));
    padding: 40px;
    border-radius: 30px;
    text-align: center;
}

.final-box h3 {
    margin-bottom: 15px;
    font-weight: 800;
}

/* --- Popup Styling --- */
.popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-container {
    background: #1e293b;
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    padding: 40px;
    position: relative;
    border: 1px solid var(--glass-border);
    max-height: 85vh;
    overflow-y: auto;
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
}

.popup-body h3 {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 24px;
}

.popup-body p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

/* --- Mobile Specific (Mobile: chỉ hiện ý chính → bấm “xem thêm” để đọc phân tích sâu) --- */
@media (max-width: 768px) {
    h1 {
        font-size: 32px;
    }

    .stats-grid,
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
    }

    .timeline-item.right {
        margin-left: 0;
    }

    .timeline-item.left .time-point,
    .timeline-item.right .time-point {
        left: -30px;
        right: auto;
        width: 60px;
        transform: rotate(-90deg);
        top: 20px;
    }

    /* Mobile Expandable instead of Popup (requested behavior) */
    .analysis-expanded {
        display: block !important;
        margin-top: 15px;
        padding: 15px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 10px;
        font-size: 14px;
        animation: fadeIn 0.4s ease;
    }

    .analysis-expanded h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}