@font-face {
    font-family: 'ROSNOC';
    src: url('fonts/Rosnoc.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
:root {
    --primary-color: #0084ff;
    --secondary-color: #6c757d;
    --background-color: #0a0a1a;
    --surface-color: #1a1a2e;
    --surface-color-2: #101024;
    --text-color: #e0e0e0;
    --text-light: #a0a0c0;
    --accent-glow: rgba(0, 132, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --header-bg: rgba(10, 10, 26, 0.8);
    --auth-bg: rgba(26, 21, 52, 0.85);
    --auth-border: #8A2BE2;
    --auth-glow: rgba(138, 43, 226, 0.6);
    --auth-title-color: #d1b3ff;
    --auth-subtitle-color: rgba(209, 179, 255, 0.6);
    --auth-input-bg: rgba(138, 43, 226, 0.1);
    --auth-input-text: #fff;
    --auth-btn-color: var(--auth-title-color);
    --auth-btn-bg-hover: var(--auth-border);
    --auth-btn-text-hover: #fff;
}

body[data-theme="light"] {
    --background-color: #f4f7fc;
    --surface-color: #ffffff;
    --surface-color-2: #f9f9f9;
    --text-color: #2c3e50;
    --text-light: #576a82;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-bg: rgba(255, 255, 255, 0.8);
    --auth-bg: var(--surface-color);
    --auth-border: var(--border-color);
    --auth-glow: rgba(0, 132, 255, 0.2);
    --auth-title-color: var(--primary-color);
    --auth-subtitle-color: var(--text-light);
    --auth-input-bg: var(--surface-color-2);
    --auth-input-text: var(--text-color);
    --auth-btn-color: #fff;
    --auth-btn-bg-hover: #0056b3; /* Một màu xanh đậm hơn khi hover */
    --auth-btn-text-hover: #fff;
}
body[data-theme="hologram"] {
    /* --- BIẾN MỚI CHO FORM XÁC THỰC (THEME HOLOGRAM/TERMINAL) --- */
    --auth-bg: #0a0a1a;
    --auth-border: #00eaff;
    --auth-glow: rgba(0, 234, 255, 0.6);
    --auth-title-color: #00eaff;
    --auth-subtitle-color: rgba(0, 234, 255, 0.5);
    --auth-input-bg: rgba(0, 234, 255, 0.05);
    --auth-input-text: #fff;
    --auth-btn-color: var(--auth-title-color);
    --auth-btn-bg-hover: var(--auth-border);
    --auth-btn-text-hover: #0a0a1a;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html { scroll-behavior: auto; }

body {
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        225deg, 
        #0a0a1a,
        #1a1a2e,
        #002244,
        var(--primary-color)
    );
    background-size: 400% 400%;
    animation: gradient-animation 25s ease infinite;
    z-index: -2;
    opacity: 0.8;
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: grid-shimmer 30s linear infinite alternate;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes grid-shimmer {
    from { opacity: 0; }
    to { opacity: 0.5; }
}

body[data-theme="light"]::before {
    background: linear-gradient(225deg, #f4f7fc, #e9ecf2, #d1d9e6);
}
body[data-theme="light"]::after {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.07) 1px, transparent 1px);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- Splash Screen V3 --- */
#splash-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--background-color);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    transition: opacity 0.5s 0.5s ease-out, visibility 0.5s 0.5s ease-out;
}
#splash-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
#splash-screen.hidden { opacity: 0; visibility: hidden; }
.splash-content { text-align: center; position: relative; z-index: 1; }

.splash-content .progress-bar,
.splash-content .splash-logo-img {
    display: none;
}

.logo-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin-bottom: 25px;
}

#aibot-logo-svg {
    width: 100%;
    height: 100%;
    overflow: visible; 
}

#logo-outline {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-dasharray: 5000;
    stroke-dashoffset: 5000;
    animation: draw-outline 2s cubic-bezier(0.65, 0, 0.35, 1) forwards,
               flicker-glow 3s infinite linear 2s;
}

@keyframes draw-outline {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes flicker-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--accent-glow));
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 15px var(--accent-glow));
        opacity: 0.8;
    }
}

#logo-wave {
    filter: blur(3px);
    animation: wave-motion 3s infinite linear;
}

@keyframes wave-motion {
    0% { transform: translateX(-10%); }
    50% { transform: translateX(10%); }
    100% { transform: translateX(-10%); }
}

.logo-container::after {
    content: '';
    position: absolute; top: 50%; left: 50%;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 3px solid #fff;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    pointer-events: none;
}

.logo-container.complete::after {
    animation: shockwave 0.8s ease-out;
}

@keyframes shockwave {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

#logo-symbols {
    opacity: 0;
    animation: fade-in-symbols 1s ease forwards 2.5s;
}

@keyframes fade-in-symbols {
    to {
        opacity: 1;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
    margin-bottom: 40px;
}

/* --- Theme Switcher --- */
.energy-core-switch {
    --track-width: 95px;
    --track-height: 40px;
    --core-size: 32px;
    --track-bg: rgba(10, 10, 26, 0.7);
    --track-border: rgba(0, 234, 255, 0.2);

    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: var(--track-width);
    height: var(--track-height);
    cursor: pointer;
    z-index: 1001;
}
.switch-track {
    width: 100%; height: 100%;
    background-color: var(--track-bg);
    border: 1px solid var(--track-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), inset 0 0 8px rgba(0, 0, 0, 0.5);
}
.theme-icon {
    width: 22px; height: 22px;
    fill: none; stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 0px transparent);
}
.energy-core {
    position: absolute; top: 4px; left: 4px;
    width: var(--core-size); height: var(--core-size);
    border-radius: 50%;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}
.energy-core::before, .energy-core::after {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border-radius: 50%;
    opacity: 0; transition: opacity 0.5s ease;
}
.energy-core::before { background-color: #f39c12; box-shadow: 0 0 10px #f39c12, 0 0 15px #f39c12; }
.energy-core::after { background: linear-gradient(45deg, #00eaff, #ff00de); box-shadow: 0 0 10px #00eaff, 0 0 15px #ff00de; animation: hologram-core-pulse-subtle 2s infinite ease-in-out; }
@keyframes hologram-core-pulse-subtle { 50% { transform: scale(0.98); } }
.energy-core-switch[data-theme-state="dark"] .energy-core { left: 4px; background-color: #ffffff; box-shadow: 0 0 10px #fff, 0 0 15px #fff; }
.energy-core-switch[data-theme-state="dark"] .icon-dark { stroke: #fff; transform: scale(1.1); filter: drop-shadow(0 0 5px #fff); }
.energy-core-switch[data-theme-state="light"] .energy-core { left: calc(50% - var(--core-size) / 2); background-color: transparent; box-shadow: none; }
.energy-core-switch[data-theme-state="light"] .energy-core::before { opacity: 1; }
.energy-core-switch[data-theme-state="light"] .icon-light { stroke: #f39c12; transform: scale(1.1); filter: drop-shadow(0 0 5px #f39c12); }
.energy-core-switch[data-theme-state="hologram"] .energy-core { left: calc(100% - var(--core-size) - 4px); background-color: transparent; box-shadow: none; }
.energy-core-switch[data-theme-state="hologram"] .energy-core::after { opacity: 1; }
.energy-core-switch[data-theme-state="hologram"] .icon-hologram { stroke: #00eaff; transform: scale(1.1); filter: drop-shadow(0 0 8px #00eaff); }

/* --- Hero Section & Background Canvas --- */
#hero {
    height: calc(var(--vh, 1vh) * 100);
    display: flex; align-items: center; justify-content: center;
    padding: 0; overflow: hidden; position: relative;
}
#particle-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}
.hero-content { text-align: center; z-index: 2; position: relative; }
.hero-title {
    font-family: 'Audiowide', sans-serif;
    font-size: 6rem; 
    font-weight: normal;
    margin-bottom: 20px; 
    color: var(--text-color);
    text-shadow: 0 0 25px var(--accent-glow);
}
body[data-theme="light"] .hero-title { text-shadow: none; }
.hero-subtitle {
    font-size: 1.3rem; color: var(--text-light); max-width: 600px; margin: 0 auto;
}
body[data-theme="light"] {
    --text-shadow-light: 0 1px 3px rgba(0,0,0,0.05); /* Bóng chữ nhẹ */
    --card-shadow-light: 0 5px 15px rgba(0,0,0,0.08); /* Bóng card mềm */
}

/* 1. Tiêu đề và Phụ đề */
body[data-theme="light"] .hero-title, 
body[data-theme="light"] .section-title {
    color: var(--text-color);
    text-shadow: var(--text-shadow-light);
}

/* 2. Thẻ Card (Sử dụng Box-Shadow nhiều lớp) */
body[data-theme="light"] .card {
    border: 1px solid #e0e0e0; /* Viền sáng hơn */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05), /* Lớp bóng nhỏ */
                var(--card-shadow-light); /* Lớp bóng lớn hơn */
}

body[data-theme="light"] .card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12); /* Tăng bóng khi hover */
}

/* 3. Nút Orbital Menu */
body[data-theme="light"] #orbital-toggle {
    background-color: var(--surface-color);
    border: 1px solid #e0e0e0;
    box-shadow: var(--card-shadow-light);
}

body[data-theme="light"] .orbital-link {
    background-color: var(--surface-color-2);
}

/* 4. Thẻ Thành viên (Member Card) */
body[data-theme="light"] .member-card {
    background: var(--surface-color);
    box-shadow: var(--card-shadow-light);
}
body[data-theme="light"] .member-card:hover .member-card-glow {
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/* === KHU VỰC LOGO DNTU SÁNG TẠO (HIỆU ỨNG RADAR SCAN) === */

.dntu-affiliation-creative {
    position: relative; /* Cần thiết cho định vị tuyệt đối của radar-line */
    text-align: center;
    padding: 40px 20px; /* Tăng padding để có không gian cho hiệu ứng */
    background-color: var(--background-color); /* Nền đồng bộ */
    border-top: 1px solid var(--border-color);
    overflow: hidden; /* Quan trọng: Ẩn phần chưa được quét */
    opacity: 0; /* Mặc định ẩn đi để reveal hoạt động */
    transition: opacity 0.5s ease; /* Hiệu ứng mờ khi hiện ra */
}

/* Kích hoạt khi cuộn tới */
.dntu-affiliation-creative.visible {
    opacity: 1;
}

/* Vạch quét radar */
.dntu-affiliation-creative .radar-line {
    position: absolute;
    top: 0;
    left: -5px; /* Bắt đầu bên ngoài cạnh trái một chút */
    width: 5px; /* Độ dày của vạch quét */
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--primary-color), transparent);
    box-shadow: 0 0 15px var(--accent-glow);
    animation: radar-scan 2s ease-out forwards; /* Chỉ chạy 1 lần khi hiện ra */
    animation-delay: 0.3s; /* Chờ hiệu ứng reveal mờ xong mới quét */
    z-index: 3; /* Nằm trên cùng */
    opacity: 0; /* Ban đầu ẩn đi */
}

/* Nội dung (logo và text) */
.dntu-affiliation-creative .content-wrapper {
    position: relative;
    z-index: 2; /* Nằm dưới vạch quét */
    /* Hiệu ứng hiện ra theo vạch quét */
    clip-path: inset(0 100% 0 0); /* Ban đầu ẩn hoàn toàn bên phải */
    animation: reveal-content 2s ease-out forwards;
    animation-delay: 0.3s;
}

.dntu-affiliation-creative .dntu-logo-link {
    display: inline-block;
    margin-bottom: 10px; /* Khoảng cách giữa logo và text */
}

.dntu-affiliation-creative .dntu-logo-img {
    height: 50px;
    display: block; /* Để margin auto hoạt động */
    margin: 0 auto;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}
.dntu-affiliation-creative .dntu-logo-link:hover .dntu-logo-img {
    transform: scale(1.1);
}

.dntu-affiliation-creative .dntu-affiliation-text {
    display: block; /* Luôn xuống dòng */
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Keyframes cho animation */
@keyframes radar-scan {
    0% {
        left: -5px;
        opacity: 0.5;
    }
    10% {
        opacity: 1; /* Hiện rõ khi bắt đầu quét */
    }
    90% {
        opacity: 1; /* Giữ độ sáng trong quá trình quét */
    }
    100% {
        left: 100%;
        opacity: 0; /* Mờ dần khi quét xong */
    }
}

@keyframes reveal-content {
    0% {
        clip-path: inset(0 100% 0 0); /* Ẩn bên phải */
    }
    100% {
        clip-path: inset(0 0 0 0); /* Hiện hoàn toàn */
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dntu-affiliation-creative {
        padding: 30px 15px;
    }
    .dntu-affiliation-creative .dntu-logo-img {
        height: 40px;
    }
    .dntu-affiliation-creative .dntu-affiliation-text {
        font-size: 0.85rem;
    }
}

/* === KẾT THÚC STYLE LOGO DNTU SÁNG TẠO === */
/* ===== BẮT ĐẦU: NÂNG CẤP FOOTER V2 (HYBRID) ===== */

/* 1. Wrapper footer tổng */
.site-footer {
    position: relative;
    width: 100%;
    /* Chúng ta sẽ dùng nền của #interactive-footer cho desktop 
      và nền --background-color cho mobile 
    */
    background-color: var(--background-color);
    overflow: hidden; /* Giữ mọi thứ bên trong */
}

/* 2. Đảm bảo canvas không tạo khoảng trống lạ */
#interactive-footer {
    /* Các style cũ (height, opacity...) đã có trong style-deferred.css */
    display: block; /* Đảm bảo nó là block để tránh lỗi margin */
    margin-bottom: 0;
}

/* 3. Wrapper cho nội dung HTML */
.footer-content-wrapper {
    position: relative; /* Nằm trên nền */
    padding: 30px 20px; /* Padding cho nội dung */
    text-align: center;
    /* Nền này sẽ chỉ hiển thị trên mobile,
      trên desktop nó sẽ bị che bởi canvas 
    */
    background-color: var(--background-color);
}

/* 4. Style cho Copyright HTML mới */
.footer-copyright {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 20px; /* Khoảng cách với logo DNTU */
    opacity: 0.7; /* Làm mờ một chút */
}

/* 5. Tối ưu cho Mobile: Ẩn canvas nặng */
@media (max-width: 768px) {
    /* Ẩn canvas để tiết kiệm tài nguyên */
    #interactive-footer {
        display: none; 
    }
}

/* 6. Tối ưu cho Desktop: Canvas là nền */
@media (min-width: 769px) {
    .site-footer {
        background-color: transparent; /* Tắt nền chung */
    }
    
    #interactive-footer {
        /* Đặt canvas làm nền, 
          nội dung HTML sẽ đè lên trên nó 
        */
        position: absolute;
        top: 0;
        left: 0;
        z-index: 0;
        height: 100%; /* Cho canvas chiếm 100% chiều cao footer */
    }

    /* Đảm bảo canvas bên trong cũng 100% */
    #footer-canvas {
        height: 100% !important;
    }

    .footer-content-wrapper {
        position: relative;
        z-index: 1; /* Đảm bảo nội dung HTML nổi lên trên canvas */
        background-color: transparent; /* Trong suốt để thấy canvas */
        
        /* Tạo một lớp nền mờ đè lên canvas
          để chữ dễ đọc hơn 
        */
        background-image: linear-gradient(
            transparent, 
            var(--background-color) 40%, 
            var(--background-color) 100%
        );
        padding-top: 150px; /* Đẩy nội dung xuống dưới phần logo của canvas */
    }
}

/* ===== KẾT THÚC: NÂNG CẤP FOOTER V2 ===== */
