/* ========== 1. FONT LOCAL ========== */
@font-face {
  font-family: 'ZZZFont';
  /* Đảm bảo đường dẫn này đúng */
  src: url('fonts/TTHovesProCompactBold-Bd.99bc171.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ========== 2. CORE VARIABLES ========== */
:root {
    --zzz-yellow: #ffd700;
    --zzz-black: #050505;
    --zzz-light: #e0e0e0;
    --font-main: 'ZZZFont', sans-serif; 
}

/* ========== 3. RESET ========== */
* { 
    margin: 0; padding: 0; box-sizing: border-box; 
    font-family: var(--font-main); 
    -webkit-tap-highlight-color: transparent; 
}

body {
    background: var(--zzz-black); color: var(--zzz-light);
    overflow: hidden; height: 100vh; width: 100vw;
}

/* ========== 4. BACKGROUND ========== */
.bg-layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
#bgVideo { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) brightness(0.4) contrast(1.2); }

.crt-lines {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0px, rgba(0,0,0,0.15) 1px, transparent 2px, transparent 4px);
    pointer-events: none;
}

/* ========== 5. LOADER ========== */
#loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: black; z-index: 9999;
    display: flex; justify-content: center; align-items: center;
}
.signal-text { color: var(--zzz-yellow); margin-bottom: 10px; font-weight: bold; letter-spacing: 2px; }
.loading-bar { width: 200px; height: 4px; background: #333; }
.progress { height: 100%; background: var(--zzz-yellow); width: 0%; animation: load 1.5s ease forwards; }
@keyframes load { to { width: 100%; } }

/* ========== 6. HEADER ========== */
header {
    position: fixed; top: 0; left: 0; width: 100%; padding: 15px 30px;
    display: flex; justify-content: space-between; align-items: center; z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
}

.main-logo { height: 45px; filter: drop-shadow(0 0 5px var(--zzz-yellow)); }
.version-tag { font-size: 0.7rem; color: var(--zzz-yellow); border: 1px solid var(--zzz-yellow); padding: 2px 5px; margin-left: 10px; }

/* Desktop Menu */
.desktop-nav {
    display: flex; gap: 5px; background: rgba(0,0,0,0.8); padding: 5px 15px;
    clip-path: polygon(15px 0, 100% 0, 100% 100%, 0 100%, 0 15px);
    border-bottom: 2px solid var(--zzz-yellow);
}

.nav-item {
    color: white; text-decoration: none; padding: 8px 20px;
    font-size: 1.1rem; font-weight: bold;
    text-transform: uppercase; transition: 0.3s;
}

.nav-item:hover, .nav-item.active {
    background: var(--zzz-yellow); color: black;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

/* --- CONTROLS (SỬA LỖI MÀU ICON) --- */
.controls { display: flex; gap: 15px; align-items: center; }

/* Wrapper riêng cho nút ngôn ngữ */
.lang-wrapper { position: relative; z-index: 200; }

.ctrl-btn {
    width: 42px; height: 42px; 
    border: 2px solid rgba(255, 255, 255, 0.3); /* Viền sáng hơn */
    background: rgba(0, 0, 0, 0.8);
    display: flex; justify-content: center; align-items: center; cursor: pointer;
    position: relative; transition: all 0.3s ease;
    clip-path: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%);
}

.ctrl-btn img { 
    width: 22px; height: 22px; object-fit: contain;
    filter: brightness(0) invert(1); /* Ép sang trắng 100% */
    opacity: 0.9;
}

.ctrl-btn:hover { 
    border-color: var(--zzz-yellow); 
    background: rgba(255, 215, 0, 0.15); 
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.ctrl-btn:hover img {
    /* Chuyển icon sang vàng khi hover */
    filter: brightness(0) saturate(100%) invert(86%) sepia(61%) saturate(1007%) hue-rotate(359deg) brightness(103%) contrast(104%);
    opacity: 1;
}

/* Language Dropdown (Đã chỉnh lại vị trí) */
.lang-dropdown {
    display: none; position: absolute; top: 55px; right: 0;
    background: rgba(10, 10, 10, 0.95); 
    border: 1px solid var(--zzz-yellow); width: 160px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
    z-index: 999; backdrop-filter: blur(5px);
}
.lang-dropdown.show { display: block; }
.lang-dropdown div { 
    padding: 12px 15px; color: white; cursor: pointer; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    font-size: 0.9rem; transition: 0.2s;
}
.lang-dropdown div:hover { background: var(--zzz-yellow); color: black; font-weight: bold; }

/* ========== 7. MAIN SECTIONS ========== */
main { position: relative; width: 100%; height: 100%; padding-top: 80px; }

.section {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: none; flex-direction: column; justify-content: center;
    padding: 80px 10% 40px 10%;
    opacity: 0; transition: opacity 0.5s ease;
}
.section.active { display: flex; opacity: 1 !important; z-index: 10; }

/* --- HOME --- */
.hero-box { max-width: 900px; }

.main-title { 
    font-size: 5rem; line-height: 1; color: white; margin: 15px 0; 
    text-shadow: 4px 4px 0 rgba(0,0,0,0.5); text-transform: uppercase; font-weight: 900;
}
.deco-label { background: var(--zzz-yellow); color: black; display: inline-block; padding: 4px 12px; font-weight: bold; text-transform: uppercase; }
.hero-desc { font-size: 1.3rem; margin-bottom: 30px; }

.cta-btn {
    display: inline-block; text-decoration: none;
    padding: 15px 40px; background: transparent; border: 2px solid var(--zzz-yellow);
    color: var(--zzz-yellow); font-size: 1.2rem; font-weight: bold; cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px); transition: 0.3s;
}
.cta-btn:hover { background: var(--zzz-yellow); color: black; }


/* --- NOTICE (SỬA LỖI MÉO THẺ) --- */
.notice-wrapper { 
    width: 100%; max-width: 1000px; margin: 0 auto; 
    height: 100%; display: flex; flex-direction: column; 
}
.sec-title { margin-bottom: 20px; border-bottom: 2px solid var(--zzz-yellow); padding-bottom: 5px; }
.sec-title h2 { font-size: 2.5rem; color: var(--zzz-yellow); text-transform: uppercase; }

.notice-list { 
    flex: 1; 
    overflow-y: auto; 
    padding-right: 10px;
    display: block !important; /* QUAN TRỌNG: Tắt Flex để không bị nén */
    mask-image: none !important; 
    opacity: 1 !important;
}
.notice-list::-webkit-scrollbar { width: 6px; }
.notice-list::-webkit-scrollbar-thumb { background: var(--zzz-yellow); border-radius: 3px; }

.notice-card {
    background: rgba(20,20,20,0.9); 
    border-left: 4px solid #444; 
    margin-bottom: 15px; 
    padding: 15px;
    display: flex; 
    gap: 15px; 
    transition: 0.3s; 
    cursor: pointer;
    
    /* FIX: Cấm co nhỏ thẻ */
    flex-shrink: 0 !important;
    min-height: 120px;
    opacity: 1 !important;
    transform: none !important;
}

.notice-card:hover { border-left-color: var(--zzz-yellow); transform: translateX(5px) !important; background: #222; }

.n-img { 
    width: 120px; height: 90px; object-fit: cover; 
    flex-shrink: 0 !important; border-radius: 4px; 
}

.n-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.n-info h3 { font-size: 1.4rem; color: white; margin-bottom: 5px; line-height: 1.2; }
.n-date { color: #888; font-size: 0.8rem; display: block; margin-bottom: 5px; }
.n-content { color: #ccc; font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }


/* --- SURVEY (SỬA LỖI BỊ DẸT) --- */
.survey-wrapper { width: 100%; height: 100%; display: flex; flex-direction: column; }
.iframe-box { 
    flex: 1; 
    width: 100%; background: black; 
    border: 2px solid #333; 
    position: relative; 
    min-height: 400px; /* Đặt chiều cao tối thiểu */
}
iframe { width: 100%; height: 100%; border: none; display: block; }

/* ========== 8. FOOTER ========== */
footer { 
    position: fixed; bottom: 0; left: 0; width: 100%; 
    padding: 10px 30px; display: flex; justify-content: space-between; 
    align-items: center; /* Căn giữa các thành phần theo chiều dọc */
    font-size: 0.8rem; color: #666; background: rgba(0,0,0,0.8); z-index: 50; 
}

/* Style cho cụm logo đơn vị vận hành */
.operator-logo img {
    height: 28px;      /* Thu nhỏ chiều cao */
    width: auto;       /* Tự cân đối chiều rộng theo tỉ lệ 300x100 */
    opacity: 0.6;      /* Làm mờ đi một chút để tinh tế hơn */
    filter: grayscale(1); /* Chuyển về đen trắng cho tiệp màu web */
    transition: all 0.3s ease;
    display: block;
}

.operator-logo img:hover {
    opacity: 1;
    filter: grayscale(0); /* Hiện màu gốc khi di chuột vào */
}

.socials a { color: var(--zzz-yellow); margin-right: 15px; text-decoration: none; font-weight: bold; }

/* Responsive cho Mobile */
@media (max-width: 768px) {
    footer {
        flex-direction: column;
        gap: 8px;
        padding: 15px;
    }
    .operator-logo img {
        height: 22px; /* Trên mobile nhỏ hơn nữa cho gọn */
    }
}
/* ========== 9. MOBILE MENU ========== */
.menu-toggle { display: none; }
.mobile-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: black;
    z-index: 90; display: flex; flex-direction: column; justify-content: center; align-items: center;
    clip-path: circle(0% at 100% 0%); transition: clip-path 0.5s ease;
}
.mobile-menu.active { clip-path: circle(150% at 100% 0%); }
.m-links a { color: white; font-size: 2rem; display: block; margin: 20px 0; text-decoration: none; font-weight: bold; }

/* ========== 11. RESPONSIVE (MOBILE) ========== */
@media (max-width: 768px) {

    /* Header nhỏ lại chút cho thoáng */
    header {
        padding: 10px 15px;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    h1.main-title {
        font-size: 3rem;
    }

    /* FIX LỖI FOOTER ĐÈ NỘI DUNG Ở ĐÂY */
    .section {
        /* Tăng padding-bottom lên 150px để chừa chỗ cho footer */
        padding: 90px 5% 150px 5%;
    }

    /* Thẻ thông báo xếp dọc */
    .notice-card {
        flex-direction: column;
        height: auto;
    }

    .n-img {
        width: 100%;
        height: 160px;
    }

    /* Footer trên mobile */
    footer {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;

        /* Thêm nền mờ để nếu nội dung có trôi qua cũng dễ nhìn hơn */
        background: rgba(0, 0, 0, 0.95);
        border-top: 1px solid #333;
    }
}