:root {
    --primary: #c01a20; /* VN Red */
    --gold: #dfb122; /* VN Gold */
    --dark: #0f0202;
    --dark-surface: #1e0608;
    --text-main: #f5f5f5;
    --text-muted: #cdcdcd;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--dark);
    overflow-x: hidden;
}

/* Background */
.fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: url('bg.png') no-repeat center center;
    background-size: cover;
}

.fixed-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(15, 2, 2, 0.65), rgba(0, 0, 0, 0.85));
}

.bg-svg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 20px;
}

.main-star {
    width: 120px;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 20px rgba(223, 177, 34, 0.4));
    animation: rotateSlow 20s linear infinite;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-title {
    font-size: 2.2rem;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title .highlight {
    font-size: 4rem;
    color: var(--gold);
    font-weight: 900;
}

.sapo {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-muted);
    max-width: 800px;
    margin: 25px auto 0;
    text-align: center;
    line-height: 1.6;
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.8;
}

.scroll-down p {
    font-family: var(--font-heading);
    font-size: 14px;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-main);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--gold);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% { top: 8px; opacity: 1; }
    100% { top: 25px; opacity: 0; }
}

/* Main Content Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-heading {
    text-align: center;
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 20px;
    position: relative;
}

.section-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 15px auto;
}

.section-desc {
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-muted);
}

/* Dashboard */
.dashboard {
    margin-bottom: 80px;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.dash-card {
    background: rgba(20, 4, 6, 0.85);
    border: 1px solid rgba(223, 177, 34, 0.3);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--gold);
}

.stats-overview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.big-stat {
    text-align: center;
}

.big-stat .value {
    display: block;
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    text-shadow: 0 0 20px rgba(192, 26, 32, 0.4);
}

.big-stat .label {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-main);
}

/* Donut Chart */
.donut-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
}

#donut-chart {
    width: 200px;
    height: 200px;
}

#donut-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 15px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 12px;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(223, 177, 34, 0.3);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Search Box */
.search-container {
    text-align: center;
    margin-bottom: 40px;
}

#search-input {
    width: 100%;
    max-width: 500px;
    padding: 15px 25px;
    border-radius: 30px;
    border: 1px solid rgba(223, 177, 34, 0.4);
    background: rgba(30, 6, 8, 0.6);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(223, 177, 34, 0.3);
}

#search-input::placeholder {
    color: var(--text-muted);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.tl-even {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50%;
}

.timeline-dot {
    position: absolute;
    top: 20px;
    right: -8px;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold);
    z-index: 1;
}

.timeline-item.tl-even .timeline-dot {
    left: -8px;
    right: auto;
}

.timeline-content {
    background: rgba(20, 4, 6, 0.90);
    border: 1px solid rgba(223, 177, 34, 0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    margin-right: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    backdrop-filter: blur(15px);
}

.timeline-item.tl-even .timeline-content {
    margin-right: 0;
    margin-left: 20px;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(192, 26, 32, 0.3);
}

.tl-year {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 800;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 5px;
}

.tl-stt {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
}

.tl-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 10px;
    line-height: 1.3;
}

.tl-address {
    font-size: 16px;
    color: var(--text-muted);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--dark-surface);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 16px;
    border: 1px solid var(--gold);
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    overflow-y: auto;
    padding: 40px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-header {
    border-bottom: 1px solid rgba(223, 177, 34, 0.3);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.stt-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 15px;
}

.modal-title {
    font-size: 2rem;
    color: var(--gold);
    line-height: 1.3;
    margin-bottom: 10px;
}

.modal-address {
    font-size: 18px;
    color: var(--text-muted);
    font-style: italic;
}

/* Modal Body */
.modal-body ul {
    list-style: none;
}

.modal-body li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
}

.modal-body li::before {
    content: "•";
    color: var(--gold);
    position: absolute;
    left: 0;
    font-size: 24px;
    line-height: 19px;
    top: 2px;
}

/* Big numbers in modal */
.modal-body .big-number-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.stat-box {
    flex: 1 1 200px;
    background: rgba(223, 177, 34, 0.05);
    border: 1px solid rgba(223, 177, 34, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-box .s-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.stat-box .s-val {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
    .hero-title .highlight { font-size: 2.8rem; }
    .hero-title { font-size: 1.6rem; }
    
    .timeline::before {
        left: 20px;
    }
    .timeline-item {
        justify-content: flex-start;
        padding-right: 0;
        padding-left: 50px;
    }
    .timeline-item.tl-even {
        padding-left: 50px;
    }
    .timeline-dot {
        left: 12px !important;
        right: auto !important;
    }
    .timeline-content, .timeline-item.tl-even .timeline-content {
        margin: 0;
        width: 100%;
    }
    .tl-stt {
        left: auto;
        right: 20px;
    }
}
