/* --- BIẾN CSS & CÀI ĐẶT CHUNG --- */
:root {
    --primary-navy: #0a192f;
    --secondary-blue: #112240;
    --accent-gold: #c5a059; /* Màu vàng kim sang trọng */
    --accent-cyan: #00f3ff; /* Xanh ngọc công nghệ */
    --text-light: #e6f1ff;
    --text-gray: #8892b0;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --sidebar-width: 20%;
    --transition-speed: 0.4s;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--primary-navy);
    color: var(--text-light);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- MÀN HÌNH CHÀO MỪNG (WELCOME) --- */
#welcome-screen {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* CẬP NHẬT: Đặt hình nền ngay tại đây để hiển thị lập tức */
    background: url('https://stockdep.net/files/images/19449606.jpg') no-repeat center center;
    background-size: cover;
}

/* Loại bỏ lớp nền cũ nếu không dùng đến để tránh xung đột */
.blockchain-bg {
    display: none; 
}

/* Ánh mặt trời góc trái (Giữ nguyên) */
.sun-effect {
    position: absolute;
    top: -100px; left: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,215,0,0.6) 0%, rgba(255,140,0,0.2) 50%, transparent 70%);
    filter: blur(40px);
    z-index: 2;
    animation: sunrise 3s ease-out forwards;
}
@keyframes sunrise { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }

.welcome-content {
    z-index: 10;
    text-align: center;
    opacity: 0;
    animation: fadeInContent 1.5s ease-out 1s forwards;
}
@keyframes fadeInContent { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Logo trang chào - giữ kích thước lớn như đã cập nhật */
.welcome-logo { width: 300px; margin-bottom: 20px; filter: drop-shadow(0 0 10px var(--accent-cyan)); }
.welcome-title { font-family: var(--font-heading); font-size: 2.5rem; color: var(--accent-gold); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 2px; }
.welcome-slogan { font-size: 1.2rem; letter-spacing: 3px; color: var(--text-light); margin-bottom: 30px; }
.welcome-subtitle { font-size: 1rem; color: var(--accent-cyan); margin-bottom: 40px; text-transform: uppercase; }

.btn-gold {
    padding: 15px 40px;
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}
.btn-gold:hover { background: var(--accent-gold); color: #000; box-shadow: 0 0 20px var(--accent-gold); }

/* --- CẬP NHẬT QUAN TRỌNG: HIỆU ỨNG RÈM --- */
.curtain {
    position: absolute; top: 0; width: 50%; height: 100%;
    /* THAY ĐỔI: Thay vì màu đen đặc (#000), dùng màu đen trong suốt (rgba) */
    /* Điều này giúp nhìn xuyên qua thấy hình nền ngay lập tức */
    background: rgba(0, 0, 0, 0.4); 
    z-index: 5;
    transition: transform 1.5s cubic-bezier(0.77, 0, 0.175, 1);
    /* Thêm hiệu ứng mờ nền (backdrop-filter) để làm chữ dễ đọc hơn nếu muốn (tùy chọn) */
    backdrop-filter: blur(2px); 
}
.curtain-left { left: 0; transform-origin: left; }
.curtain-right { right: 0; transform-origin: right; }

/* Trạng thái mở rèm */
#welcome-screen.open .curtain-left { transform: scaleX(0); }
#welcome-screen.open .curtain-right { transform: scaleX(0); }
#welcome-screen.open .welcome-content { opacity: 0; transition: 0.5s; }
#welcome-screen.open { pointer-events: none; transition-delay: 1.5s; opacity: 0; }

/* --- GIAO DIỆN CHÍNH (MAIN LAYOUT) --- */
#main-interface {
    display: flex;
    min-height: 100vh;
    opacity: 0;
    transition: opacity 1s ease-in;
}
#main-interface.visible { opacity: 1; }
.hidden { display: none; }

/* SIDEBAR (CỘT TRÁI) */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border-right: 2px solid var(--accent-gold);
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 20px rgba(0,0,0,0.5);
    transition: width var(--transition-speed);
}

.sidebar-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}

/* Sidebar Background Effect */
.sidebar-bg-effect {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(0deg, transparent 24%, rgba(197, 160, 89, .05) 25%, rgba(197, 160, 89, .05) 26%, transparent 27%, transparent 74%, rgba(197, 160, 89, .05) 75%, rgba(197, 160, 89, .05) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(197, 160, 89, .05) 25%, rgba(197, 160, 89, .05) 26%, transparent 27%, transparent 74%, rgba(197, 160, 89, .05) 75%, rgba(197, 160, 89, .05) 76%, transparent 77%, transparent);
    background-size: 30px 30px;
    z-index: -1;
}

.logo-frame {
    border: 1px solid var(--text-light);
    background: #fff;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px var(--accent-cyan);
    text-align: center;
}
.logo-frame img { width: 80%; height: auto; }

.info-block { text-align: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid rgba(197,160,89,0.3); }
.info-block h3 { color: var(--accent-gold); font-size: 1.1rem; margin-bottom: 5px; }
.slogan-text { font-size: 0.7rem; font-style: italic; color: var(--text-gray); margin-bottom: 10px; }
.contact-mini p { font-size: 0.75rem; margin: 3px 0; color: var(--text-light); display: flex; align-items: center; gap: 5px; }

/* Menu Styles */
.main-menu { margin-top: 10px; }
.menu-item { margin-bottom: 10px; }
.menu-header {
    padding: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    transition: all 0.3s;
    color: var(--text-light);
}
.menu-header:hover, .menu-item.active .menu-header {
    background: rgba(197, 160, 89, 0.2);
    color: var(--accent-gold);
    border-left: 3px solid var(--accent-gold);
}

.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding-left: 15px;
}
.menu-item.active .sub-menu { max-height: 500px; } /* Expand */
.sub-menu li {
    font-size: 0.8rem;
    padding: 8px 0;
    cursor: pointer;
    color: var(--text-gray);
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}
.sub-menu li:hover, .sub-menu li.current { color: var(--accent-cyan); padding-left: 5px; }

.sidebar-footer { text-align: center; font-size: 0.7rem; margin-top: 20px; color: var(--accent-gold); }

/* Toggle Button */
.sidebar-toggle { display: none; } /* Chỉ hiện trên mobile */

/* MAIN CONTENT (CỘT PHẢI) */
#main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar & Breadcrumb */
.top-bar {
    position: sticky; top: 0;
    background: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    z-index: 50;
    border-bottom: 1px solid rgba(197,160,89,0.2);
}
.breadcrumb { font-size: 0.9rem; color: var(--accent-gold); font-weight: bold; text-transform: uppercase; }
.progress-bar { height: 3px; background: rgba(255,255,255,0.1); margin-top: 10px; width: 100%; }
.progress-fill { height: 100%; background: var(--accent-cyan); width: 0%; transition: width 0.3s; }

/* Dynamic Background */
#dynamic-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: brightness(0.3); /* Làm tối nền để nổi bật chữ */
    transition: background-image 0.5s ease-in-out;
}

/* Content Area */
.content-wrapper { padding: 40px; flex: 1; padding-bottom: 100px; }

.content-section { display: none; animation: fadeIn 0.5s; }
.content-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.sub-section { margin-bottom: 40px; scroll-margin-top: 100px; }
.sub-section h2 { 
    font-family: var(--font-heading); 
    color: var(--accent-gold); 
    font-size: 2rem; 
    margin-bottom: 20px; 
    border-bottom: 2px solid var(--accent-cyan); 
    display: inline-block;
    padding-bottom: 5px;
}

/* Glassmorphism Cards */
.card-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    color: #fff;
    line-height: 1.6;
}
.card-glass p { margin-bottom: 10px; }

/* Grid Layouts */
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.core-values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.value-box { 
    background: rgba(197, 160, 89, 0.1); 
    padding: 20px; 
    text-align: center; 
    border: 1px solid var(--accent-gold);
    transition: transform 0.3s;
}
.value-box:hover { transform: translateY(-5px); background: rgba(197, 160, 89, 0.2); }
.val-icon { font-size: 2rem; font-weight: bold; color: var(--accent-cyan); margin-bottom: 10px; }

/* Accordion in Content */
.accordion-item { margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.1); border-radius: 5px; overflow: hidden; }
.accordion-item h3 { 
    padding: 15px; 
    background: rgba(255,255,255,0.05); 
    cursor: pointer; 
    color: var(--accent-gold);
}
.acc-content { padding: 15px; display: block; background: rgba(0,0,0,0.2); }
.acc-content ul li { margin-bottom: 8px; list-style: disc; margin-left: 20px; }

/* Tech Grid */
.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tech-card { background: rgba(0, 243, 255, 0.05); border: 1px solid var(--accent-cyan); padding: 20px; }
.tech-card h4 { color: var(--accent-cyan); margin-bottom: 15px; text-transform: uppercase; }

/* Process */
.process-container { display: flex; align-items: center; justify-content: space-between; overflow-x: auto; padding: 20px 0; }
.process-step { text-align: center; min-width: 120px; }
.step-num { 
    width: 60px; height: 60px; 
    border-radius: 50%; 
    background: var(--accent-gold); 
    color: #000; 
    font-weight: bold; 
    display: flex; align-items: center; justify-content: center; 
    margin: 0 auto 10px; font-size: 1.2rem;
}
.step-desc { font-size: 0.9rem; color: var(--text-light); }
.process-arrow { color: var(--accent-cyan); font-size: 1.5rem; }

/* Diff Grid */
.diff-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.diff-item { text-align: center; padding: 20px; border: 1px solid rgba(255,255,255,0.1); }
.icon-circle { 
    width: 50px; height: 50px; 
    border-radius: 50%; border: 2px solid var(--accent-cyan); 
    display: flex; align-items: center; justify-content: center; 
    margin: 0 auto 15px; color: var(--accent-cyan);
}

/* Nav Buttons Fixed */
.nav-controls {
    position: fixed;
    bottom: 30px; right: 30px;
    z-index: 100;
    display: flex; gap: 10px;
}
.nav-btn {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--accent-gold);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #000;
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.5);
    transition: 0.3s;
}
.nav-btn:hover { transform: scale(1.1); background: #fff; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    :root { --sidebar-width: 0px; } /* Ẩn sidebar mặc định trên mobile */
    #sidebar { transform: translateX(-100%); width: 280px; transition: transform 0.3s; }
    #sidebar.active { transform: translateX(0); }
    #main-content { margin-left: 0; width: 100%; }
    
    .sidebar-toggle {
        display: block;
        position: fixed; top: 15px; left: 15px; z-index: 200;
        font-size: 1.5rem; color: var(--accent-gold);
        cursor: pointer;
        background: rgba(0,0,0,0.5); padding: 5px 10px; border-radius: 5px;
    }
    
    .grid-2-col, .tech-grid, .diff-grid { grid-template-columns: 1fr; }
    .process-container { flex-direction: column; gap: 20px; }
    .process-arrow { transform: rotate(90deg); }
}