:root {
    --gold-primary: #ffd700;
    --gold-dark: #e6c619;
    --gray-neutral: #a0a0a0;
    --brown-sepia: #4a2c0f;
    --buff-cream: #f0dc82;
    --text-body: #f5e6ab;
}

body {
    background-image: url('https://vnsharing.edu.vn/wp-content/uploads/2024/12/toan-canh-nui-Ba-Den.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    color: var(--text-body);
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    margin: 0;
}

.main-bg-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(30, 20, 10, 0.8), rgba(15, 8, 5, 0.92));
    z-index: -1;
}

.site-wrapper {
    max-width: 1920px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.text-container {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

h1, h2, h3, h4, h5, .title-font { 
    font-family: 'Philosopher', sans-serif; 
    color: var(--gold-primary);
}

.drop-cap { 
    float: left; 
    font-size: 4.5rem; 
    color: var(--gold-primary); 
    font-family: 'Philosopher', sans-serif; 
    line-height: 0.8; 
    padding-right: 15px; 
    text-shadow: 3px 3px 0px #000;
}

.handwriting { font-family: 'Dancing Script', cursive; }

.nostalgic-img {
    filter: sepia(0.2) contrast(1.1);
    border: 2px solid var(--gold-dark);
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transition: transform 0.5s ease;
}
.nostalgic-img:hover { transform: scale(1.02); }

.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.compare-container {
    perspective: 1500px;
    width: 100%;
    max-width: 850px;
    height: 550px;
    margin: 0 auto;
}
.compare-inner {
    position: relative; width: 100%; height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d; cursor: pointer;
}
.flipped .compare-inner { transform: rotateY(180deg); }
.compare-front, .compare-back {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden;
    border: 10px solid #fff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}
.compare-back { transform: rotateY(180deg); }

.book-container {
    width: 100%; max-width: 480px; height: 600px;
    margin: 0 auto; perspective: 2000px; position: relative;
}
.book-page {
    position: absolute; width: 100%; height: 100%;
    transform-origin: left; transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    cursor: pointer; top: 0; left: 0;
}
.page-face {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden;
    background: #fdf5e6;
    color: #2b1e16;
    padding: 25px;
    box-shadow: inset 3px 0 10px rgba(0,0,0,0.15), 5px 5px 20px rgba(0,0,0,0.4);
    border: 1px solid #dcdcdc;
    display: flex; flex-direction: column; justify-content: space-between;
}
.page-face.back { transform: rotateY(180deg); background: #f5f0e1; }
.book-page.is-flipped { transform: rotateY(-170deg); z-index: 50 !important; }
.book-page img { width: 100%; height: 82%; object-fit: cover; border: 6px solid white; box-shadow: 2px 2px 8px rgba(0,0,0,0.3); }

.timeline-wrapper {
    position: relative;
    padding: 60px 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.timeline-wrapper::-webkit-scrollbar { display: none; }
.timeline-line {
    position: absolute;
    top: 50%; left: 0; width: 100%; height: 2px;
    background: rgba(255, 215, 0, 0.3);
    z-index: 0; transform: translateY(-50%);
}
.timeline-items {
    display: flex; justify-content: space-between; position: relative; z-index: 1; min-width: 1000px;
}
.timeline-item {
    flex: 1; text-align: center; position: relative; padding: 0 20px;
}
.timeline-icon {
    width: 60px; height: 60px; background: #2a1d15; border: 2px solid var(--gold-primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; color: var(--gold-primary); font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); transition: 0.3s;
}
.timeline-item:hover .timeline-icon { transform: scale(1.2); background: var(--gold-primary); color: #000; }
.timeline-date { font-family: 'Philosopher', sans-serif; font-weight: bold; color: var(--gold-primary); margin-bottom: 5px; font-size: 1.2rem; }
.timeline-desc { font-size: 0.85rem; color: var(--buff-cream); line-height: 1.4; }

.bar-wrapper { display: flex; align-items: flex-end; justify-content: space-around; height: 300px; border-bottom: 2px solid var(--gold-dark); padding-bottom: 5px; }
.bar { 
    width: 18%; 
    background: linear-gradient(to top, var(--gold-dark), var(--gold-primary)); 
    transform: scaleY(0); transform-origin: bottom; transition: 1.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); position: relative; 
    border-radius: 4px 4px 0 0;
}
.bar-val { position: absolute; top: -35px; left: 50%; transform: translateX(-50%); font-size: 1rem; color: var(--gold-primary); font-weight: bold; }

.btn-custom {
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(0,0,0,0.6);
    transition: all 0.4s;
    font-family: 'Philosopher', sans-serif;
    text-shadow: 1px 1px 2px #000;
}
.btn-custom:hover {
    background: var(--gold-primary);
    color: #1a0f05;
    box-shadow: 0 0 20px var(--gold-primary);
    text-shadow: none;
}

.text-container p {
    margin-bottom: 1.8rem;
    line-height: 2;
    font-size: 1.2rem;
    text-align: justify;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
}

.caption-text {
    color: var(--gray-neutral);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 2px #000;
}