:root {
    --color-money: #f6ad55;
    --color-tech: #4299e1;
    --color-park: #48bb78;
    --color-water: #0bc5ea;
    
    /* Tinh chỉnh kính mờ cho Desktop sắc nét hơn */
    --glass-bg: rgba(255, 255, 255, 0.55); /* Tăng độ đục lên chút để chữ nét hơn */
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-blur: 40px; /* Blur mạnh hơn để xóa nhòe background dưới chữ */
    --text-main: #1a202c;
    --text-sub: #111827; /* Đen đậm hơn */
    
    /* NAV DESKTOP */
    --nav-left: 5px;      
    --nav-width: 2px;     
    --dot-size: 8px; /* To hơn chút cho desktop */     
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Font chữ hiển thị sắc nét trên máy tính */
body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: #1a202c;
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; /* Khử răng cưa cho MacOS */
    -moz-osx-font-smoothing: grayscale;
}

/* --- BACKGROUND --- */
.bg-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    background-color: #0f172a;
}

.bg-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; /* Phủ kín màn hình */
    opacity: 0;
    transition: opacity 1s ease-in-out;
    /* Giảm tối đi một chút để chữ trắng Intro nổi hơn */
    filter: brightness(0.8); 
    will-change: opacity; /* Tối ưu render */
}

.bg-image.active { opacity: 1; }

#detail-bg-layer {
    z-index: 1; 
    transition: opacity 0.6s ease-in-out;
}

/* --- LAYOUT DESKTOP (FULL WIDTH) --- */
.scrolly-container {
    position: relative;
    width: 100%;
    /* BỎ max-width giới hạn */
    margin: 0;
}

.story-section {
    height: 100vh; /* Chiếm trọn 1 màn hình cứng */
    width: 100%;
    position: relative;
    overflow: hidden; /* Tránh thanh cuộn ngang */
}

/* --- HEADER (Page-0) --- */
.header-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.header-title {
    font-size: 5vw; /* Responsive theo chiều rộng màn hình */
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 10px 30px rgba(0,0,0,0.7);
    margin-bottom: 20px;
    letter-spacing: -2px;
}
.header-subtitle {
    color: #f1f5f9;
    font-size: 1.8rem;
    font-weight: 600;
    background: rgba(0,0,0,0.6);
    padding: 15px 40px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.scroll-down-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white; 
    cursor: pointer;
    transition: all 0.3s;
    padding: 15px;
    opacity: 0.8;
}
.scroll-down-btn:hover { opacity: 1; bottom: 25px; }

/* --- BOX TEXT VUÔNG (Yêu cầu 3) --- */
.content-card {
    /* Cố định vị trí góc dưới phải */
    position: absolute;
    bottom: 5px;
    right: 5px;
    
    /* Kích thước Vuông 1:1 */
    width: 450px;
    height: 450px; 
    /* Đề phòng màn hình nhỏ hơn 450px thì co lại */
    max-width: 90vw;
    max-height: 90vw;
    
    /* Giao diện */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px; /* Bo góc mềm mại */
    padding: 30px;
    
    /* Đổ bóng đậm hơn để nổi trên nền ảnh */
    box-shadow: -10px -10px 40px rgba(0, 0, 0, 0.2), 
                inset 0 0 0 1px rgba(255,255,255,0.5);
    
    /* Flex để bố cục nội dung bên trong */
    display: flex;
    flex-direction: column;
    
    /* Hiệu ứng xuất hiện */
    transform: translateX(100px); /* Trượt từ phải sang */
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.story-section.active .content-card {
    transform: translateX(0);
    opacity: 1;
}

.card-header-row {
    display: flex;
    align-items: center; 
    gap: 15px;
    margin-bottom: 15px;
    flex-shrink: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.card-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.card-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
    color: #000;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

/* Khu vực nội dung chính có thể cuộn */
.card-scroll-area {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
    /* Custom Scrollbar cho đẹp */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.3) transparent;
}

.card-body {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-sub);
    margin-bottom: 20px;
    font-weight: 500;
}

/* --- DETAIL ITEMS (Trong box vuông) --- */
.details-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    background: rgba(255,255,255,0.8);
    border-radius: 12px;
    padding: 12px 15px;
    border: 1px solid rgba(0,0,0,0.05);
    cursor: default;
    transition: all 0.2s;
    position: relative;
}

.detail-item[data-detail-img]:not([data-detail-img=""]) {
    cursor: pointer;
    padding-right: 30px; /* Chừa chỗ cho icon */
}

.detail-item[data-detail-img]:not([data-detail-img=""]):hover {
    background: white;
    transform: translateX(5px); /* Hiệu ứng hover trên desktop */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Icon con mắt/ảnh khi có link */
.detail-item[data-detail-img]:not([data-detail-img=""])::after {
    content: '\f03e'; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%; right: 15px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.detail-item.selected {
    background: #e0f2fe;
    border-color: var(--color-tech);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3);
}
.detail-item.selected::after { color: var(--color-tech); }

.detail-title { 
    font-weight: 800; 
    font-size: 0.95rem; 
    color: #334155;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.detail-text { 
    font-size: 0.9rem; 
    color: #475569; 
    line-height: 1.4; 
}

/* --- NAV TRÁI --- */
.river-progress {
    position: fixed;
    left: var(--nav-left);
    top: 50%;
    transform: translateY(-50%);
    width: var(--nav-width); 
    height: 60vh; 
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    z-index: 100;
}
.river-fill {
    position: absolute; top: 0; left: 0; width: 100%; height: 0%;
    background: linear-gradient(to bottom, var(--color-money), var(--color-tech), var(--color-park), var(--color-water));
    border-radius: 10px;
    transition: height 0.5s ease-out;
}
.progress-node {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: var(--dot-size);
    height: var(--dot-size);
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    transition: all 0.3s;
    cursor: pointer; /* Desktop bấm được */
}
.progress-node:hover {
    transform: translateX(-50%) scale(1.5);
    background: white;
}
.progress-node.active {
    background: white;
    transform: translateX(-50%) scale(1.8); 
    box-shadow: 0 0 10px rgba(255,255,255,1);
}

/* --- THEME COLORS --- */
.theme-money .card-icon { background: var(--color-money); }
.theme-tech .card-icon { background: var(--color-tech); }
.theme-park .card-icon { background: var(--color-park); }
.theme-water .card-icon { background: var(--color-water); }

/* --- CREDITS (Footer) --- */
.credits-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    background: rgba(0,0,0,0.6);
    padding: 15px 30px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}
.credits-item {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
}
.credits-item strong { color: #fff; font-weight: 700; margin-right: 5px; text-transform: uppercase; font-size: 0.8rem; opacity: 0.7; }