/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-dark: #050a14;
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --neon-green: #39ff14;
    --neon-orange: #ff5e00;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a8b8;
    --section-spacing: 120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Ẩn con trỏ mặc định để dùng Custom Cursor */
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =========================================
   2. UTILITIES & TYPOGRAPHY
   ========================================= */
.highlight { color: var(--neon-blue); text-shadow: 0 0 15px var(--neon-blue); }

.gradient-text {
    background: linear-gradient(to right, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-huge {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    display: block;
    margin: 20px 0;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
}

.center { text-align: center; margin-left: auto; margin-right: auto; }
.text-secondary { color: var(--text-secondary); }

/* Margins */
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-100 { margin-top: 100px; }

/* =========================================
   3. BACKGROUND & CURSOR
   ========================================= */
#vanta-bg {
    position: fixed;
    z-index: -1;
    top: 0; left: 0; width: 100%; height: 100vh;
    opacity: 0.6;
}

/* Custom Cursor */
.cursor, .cursor2 {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s;
}

.cursor { width: 8px; height: 8px; background: var(--neon-blue); left: -4px; top: -4px; }
.cursor2 { width: 40px; height: 40px; border: 2px solid var(--neon-blue); left: -20px; top: -20px; transition: all 0.2s ease-out; }
.cursor-hover .cursor2 { transform: scale(2); background: rgba(0, 243, 255, 0.1); border-color: transparent; }

/* =========================================
   4. NAVIGATION
   ========================================= */
.glass-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 50px; position: fixed; width: 100%; top: 0; z-index: 100;
    background: rgba(5, 10, 20, 0.7); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border); transition: 0.4s;
}

.glass-nav.scrolled { padding: 10px 50px; background: rgba(5, 10, 20, 0.9); }

.logo { font-family: 'Orbitron'; font-weight: 700; font-size: 1.5rem; }

.nav-links { display: flex; gap: 30px; }

.nav-links a {
    font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    position: relative; transition: 0.3s;
}

.nav-links a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0%; height: 2px;
    background: var(--neon-blue); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--neon-blue); text-shadow: 0 0 10px var(--neon-blue); }

/* =========================================
   5. HERO SECTION
   ========================================= */
#hero {
    height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative; padding-top: 80px;
}

/* Glitch Text */
.glitch-text { position: relative; display: inline-block; font-size: 1.5rem; letter-spacing: 5px; margin-bottom: 20px;}
.glitch-text::before, .glitch-text::after {
    content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark); clip: rect(0, 0, 0, 0);
}
.glitch-text::before { left: -2px; text-shadow: 2px 0 var(--neon-purple); animation: glitch-anim-1 2s infinite linear alternate-reverse; }
.glitch-text::after { left: 2px; text-shadow: -2px 0 var(--neon-blue); animation: glitch-anim-2 3s infinite linear alternate-reverse; }

@keyframes glitch-anim-1 {
  0% { clip: rect(30px, 9999px, 10px, 0); } 20% { clip: rect(85px, 9999px, 90px, 0); }
  40% { clip: rect(5px, 9999px, 35px, 0); } 60% { clip: rect(60px, 9999px, 20px, 0); }
  80% { clip: rect(20px, 9999px, 50px, 0); } 100% { clip: rect(95px, 9999px, 75px, 0); }
}
@keyframes glitch-anim-2 {
  0% { clip: rect(65px, 9999px, 85px, 0); } 20% { clip: rect(10px, 9999px, 55px, 0); }
  40% { clip: rect(90px, 9999px, 30px, 0); } 60% { clip: rect(25px, 9999px, 95px, 0); }
  80% { clip: rect(70px, 9999px, 40px, 0); } 100% { clip: rect(45px, 9999px, 15px, 0); }
}

/* Cyber Button */
.cyber-btn {
    position: relative; padding: 15px 40px; background: transparent; color: var(--neon-blue);
    font-family: 'Orbitron'; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    border: 2px solid var(--neon-blue); overflow: hidden; transition: 0.3s; display: inline-block;
}
.cyber-btn:hover { background: var(--neon-blue); color: var(--bg-dark); box-shadow: 0 0 30px var(--neon-blue); }
.cyber-btn__glitch {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--neon-blue);
    transform: translateX(-110%); transition: 0.3s; z-index: -1;
}
.cyber-btn:hover .cyber-btn__glitch { transform: translateX(0); }

/* Scroll Indicator */
.scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 0.8rem; letter-spacing: 2px; color: var(--text-secondary); }
.mouse { width: 25px; height: 40px; border: 2px solid var(--text-secondary); border-radius: 20px; position: relative; }
.wheel { width: 4px; height: 8px; background: var(--neon-blue); position: absolute; top: 10px; left: 50%; transform: translateX(-50%); border-radius: 2px; animation: scroll 1.5s infinite; }
@keyframes scroll { 0% { opacity: 1; top: 10px; } 100% { opacity: 0; top: 25px; } }

/* =========================================
   6. GLOBAL SECTIONS & LAYOUT
   ========================================= */
section { padding: var(--section-spacing) 0; position: relative; }
.section-title { font-size: 3rem; margin-bottom: 60px; text-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.content-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 30px; position: relative; z-index: 2; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.row-layout { display: flex; align-items: center; gap: 60px; }
.row-layout.reverse { flex-direction: row-reverse; }
.text-col { flex: 1; } .media-col { flex: 1; }
.lead-text { font-size: 1.3rem; margin-bottom: 30px; color: var(--text-secondary); }

/* Cyber Divider */
.cyber-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--glass-border), transparent);
    margin: 20px 0;
}

/* =========================================
   7. COMPONENTS: CARDS, FRAMES, LISTS
   ========================================= */

/* Glass Cards (Tilt) */
.glass-card {
    background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 40px; position: relative; overflow: hidden;
    transform-style: preserve-3d; transform: perspective(1000px);
}
.card-content { transform: translateZ(30px); }
.card-icon { font-size: 3rem; margin-bottom: 20px; }
.glass-card h3 { margin-bottom: 15px; font-size: 1.5rem; }
.stat-bar { margin-top: 25px; padding: 10px 20px; background: rgba(0,0,0,0.3); border-radius: 10px; display: flex; justify-content: space-between; font-family: 'Orbitron'; font-size: 0.9rem; }

.alert-state { border-color: rgba(255, 0, 85, 0.3); }
.alert-state .card-icon, .alert-state h3 { color: #ff0055; text-shadow: 0 0 15px #ff0055; }
.red-bar { border-left: 3px solid #ff0055; color: #ff0055; }

.success-state { border-color: rgba(57, 255, 20, 0.3); position: relative; }
.success-state .card-icon, .success-state h3 { color: var(--neon-green); text-shadow: 0 0 15px var(--neon-green); }
.green-bar { border-left: 3px solid var(--neon-green); color: var(--neon-green); }
.card-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 200px; height: 200px; background: var(--neon-green); filter: blur(150px); opacity: 0; transition: 0.5s; pointer-events: none;
}
.success-state:hover .card-glow { opacity: 0.3; }

/* Cyber Frames (Images) */
.cyber-frame {
    position: relative; padding: 5px; background: linear-gradient(45deg, var(--neon-blue), transparent, var(--neon-purple));
    border-radius: 10px; box-shadow: 0 0 30px rgba(0, 243, 255, 0.2); overflow: hidden;
}
.cyber-frame::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-dark); margin: 2px; border-radius: 8px; z-index: 1;
}
.cyber-img { position: relative; z-index: 2; border-radius: 8px; border: 1px solid var(--glass-border); width: 100%;}
.frame-label {
    position: absolute; bottom: 10px; right: 15px; z-index: 3; font-family: 'Orbitron'; font-size: 0.7rem; color: var(--neon-blue);
    background: rgba(0,0,0,0.7); padding: 2px 10px; border-radius: 4px; letter-spacing: 1px;
}

/* Cyber Portals (Iframes) */
.portal-container { margin-bottom: 80px; }
.portal-header { margin-bottom: 20px; padding-left: 20px; border-left: 3px solid var(--neon-blue); }
.portal-header h3 { color: var(--neon-blue); margin-bottom: 5px; }

/* 1. Khung chứa cơ bản */
.cyber-portal {
    width: 100%;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    
    /* STYLE NEON */
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.15), inset 0 0 30px rgba(0, 243, 255, 0.1);
    background: rgba(0, 0, 0, 0.6); /* Nền tối hơn để biểu đồ nổi bật */

    /* KÍCH THƯỚC MẶC ĐỊNH (Cho BCG Matrix, Scatter Plot...) */
    height: 70vh; /* Chiếm 70% chiều cao màn hình người xem */
    min-height: 600px; /* Không bao giờ nhỏ hơn 600px */
}

.interactive-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block; /* Loại bỏ khoảng trắng thừa ở chân iframe */
    
    /* Mẹo: Nếu biểu đồ bên trong có nền trắng, dùng cái này để làm dịu mắt */
    /* filter: invert(0.9) hue-rotate(180deg); -> Chỉ dùng nếu muốn đảo màu biểu đồ sang Dark Mode tự động */
}

/* 4. Responsive cho Mobile */
@media (max-width: 768px) {
    .cyber-portal, .portal-tall {
        height: 60vh; /* Trên điện thoại thì ngắn lại một chút */
        min-height: 500px;
    }
}
.portal-scanline {
    position: absolute; top: 0; left: 0; width: 100%; height: 10px;
    background: linear-gradient(to bottom, transparent, var(--neon-blue), transparent);
    opacity: 0.5; animation: scan 4s linear infinite; pointer-events: none;
}
@keyframes scan { 0% { top: -10%; } 100% { top: 110%; } }
.portal-tall {
    height: 90vh; /* Chiếm 90% màn hình - Gần như Full màn hình */
    min-height: 800px; /* Đảm bảo đủ chỗ cho mạng lưới phức tạp */
    
    /* Đổi màu viền sang Tím để phân biệt */
    border-color: var(--neon-purple);
    box-shadow: 0 0 40px rgba(188, 19, 254, 0.2);
}

.portal-tall .portal-scanline {
    background: linear-gradient(to bottom, transparent, var(--neon-purple), transparent);
}

/* Glass Panel & Lists */
.glass-panel { background: var(--glass-bg); backdrop-filter: blur(15px); padding: 30px; border-radius: 15px; border: 1px solid var(--glass-border); }
.glass-panel h4 { color: var(--neon-purple); margin-bottom: 15px; font-size: 1.1rem; }
.glass-panel ul li { margin-bottom: 10px; padding-left: 20px; position: relative; }
.glass-panel ul li::before { content: '>'; position: absolute; left: 0; color: var(--neon-purple); font-family: 'Orbitron'; }
.glass-panel strong { color: var(--text-primary); }

/* Cyber List (Custom list with arrows) */
.cyber-list { margin: 20px 0; }
.cyber-list li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    color: var(--text-secondary);
}
.cyber-list li strong { color: var(--text-primary); }
.cyber-list li::before {
    content: '>>'; position: absolute; left: 0;
    color: var(--neon-purple); font-family: 'Orbitron'; font-size: 0.8rem;
}

/* Stat Grid */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 30px 0; }
.stat-box {
    background: rgba(0, 243, 255, 0.05); border: 1px solid rgba(0, 243, 255, 0.2);
    padding: 20px; border-radius: 10px; text-align: center;
}
.stat-num {
    display: block; font-family: 'Orbitron'; font-size: 2.5rem;
    color: var(--neon-blue); font-weight: 700; text-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}
.stat-desc { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; }

/* Insight Blocks */
.insight-block { margin-bottom: 120px; position: relative; }
.insight-block::after {
    content: ''; position: absolute; left: 50%; bottom: -80px; width: 2px; height: 60px;
    background: linear-gradient(to bottom, var(--neon-blue), transparent); opacity: 0.3;
}

/* =========================================
   8. STRATEGY GRID (FIXED VISIBILITY)
   ========================================= */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
    position: relative;
    z-index: 5; /* Nổi lên trên nền */
}

.strat-node {
    /* Nền tối đục để chữ rõ ràng */
    background: rgba(5, 10, 20, 0.85) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: 0.4s;
    position: relative;
    top: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.strat-node:hover {
    top: -15px;
    background: rgba(10, 20, 30, 0.95) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.node-icon { font-size: 3.5rem; margin-bottom: 25px; }

/* Node Text */
.strat-node p {
    color: #e0e0e0; font-size: 0.95rem; line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Strategy Colors */
.node-green .node-icon, .node-green h3 { color: var(--neon-green); text-shadow: 0 0 20px var(--neon-green); }
.node-green:hover { border-color: var(--neon-green); box-shadow: 0 0 30px rgba(57, 255, 20, 0.2); }

.node-purple .node-icon, .node-purple h3 { color: var(--neon-purple); text-shadow: 0 0 20px var(--neon-purple); }
.node-purple:hover { border-color: var(--neon-purple); box-shadow: 0 0 30px rgba(188, 19, 254, 0.2); }

.node-orange .node-icon, .node-orange h3 { color: var(--neon-orange); text-shadow: 0 0 20px var(--neon-orange); }
.node-orange:hover { border-color: var(--neon-orange); box-shadow: 0 0 30px rgba(255, 94, 0, 0.2); }

.node-blue .node-icon, .node-blue h3 { color: #2563eb; text-shadow: 0 0 20px #2563eb; }
.node-blue:hover { border-color: #2563eb; box-shadow: 0 0 30px rgba(37, 99, 235, 0.2); }

.node-red .node-icon, .node-red h3 { color: #ef4444; text-shadow: 0 0 20px #ef4444; }
.node-red:hover { border-color: #ef4444; box-shadow: 0 0 30px rgba(239, 68, 68, 0.2); }

.final-viz h3 { margin: 80px 0 30px; color: var(--text-secondary); }
.wide-frame { max-width: 800px; margin: 0 auto; border-radius: 15px; }

/* =========================================
   9. FOOTER & RESPONSIVE
   ========================================= */
footer {
    background: #020408; padding: 50px 0; text-align: center;
    margin-top: 100px; border-top: 1px solid var(--glass-border);
}
footer h2 { font-size: 2rem; margin-bottom: 10px; }
footer p { color: var(--text-secondary); font-family: 'Orbitron'; letter-spacing: 1px; }

/* Responsive */
@media (max-width: 992px) {
    .text-huge { font-size: 3.5rem; }
    .section-title { font-size: 2.2rem; }
    .grid-2, .row-layout, .strategy-grid { grid-template-columns: 1fr; gap: 40px; }
    .row-layout.reverse { flex-direction: column; }
    .cyber-portal, .portal-tall { height: 500px; }
    .glass-nav { padding: 15px 20px; }
    .nav-links { display: none; } /* Ẩn menu trên mobile */
}
/* ======================================================
   CẤP CỨU: FIX LỖI HIỂN THỊ CHIẾN LƯỢC (FORCE Z-INDEX)
   ====================================================== */

/* 1. Đẩy toàn bộ Section Chiến Lược lên tầng cao nhất */
#strategy {
    position: relative; /* Bắt buộc có để z-index hoạt động */
    z-index: 100 !important; /* Cao hơn tất cả các thành phần khác */
    
    /* Mẹo: Thêm một lớp nền mờ tối màu bao quanh cả khu vực này 
       để tách biệt hẳn với mạng lưới 3D phía sau */
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(10px); /* Làm mờ nền 3D phía sau khu vực này */
    border-radius: 40px;
    margin-top: 50px;
    padding-bottom: 50px; /* Tạo khoảng thở */
}

/* 2. Đẩy lưới chứa các thẻ lên cao hơn nữa */
.strategy-grid {
    position: relative;
    z-index: 200 !important;
    transform: translateZ(50px); /* Mẹo 3D: Đẩy khối này "gần" mắt người xem hơn */
}

/* 3. Làm thẻ bài đặc hoàn toàn (Không trong suốt nữa) */
.strat-node {
    /* Màu nền gần như đen đặc (98%) để che hoàn toàn các đường kẻ neon */
    background: rgba(5, 8, 15, 0.98) !important; 
    
    /* Viền sáng hơn để nổi bật */
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
    
    /* Đổ bóng cực mạnh để tạo cảm giác "bay" lên khỏi nền */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9) !important;
    
    z-index: 300 !important;
    opacity: 1 !important; /* Đảm bảo GSAP không làm mờ nó */
}

/* 4. Fix màu chữ để tương phản tối đa trên nền đen đặc */
.strat-node h3 {
    text-shadow: 0 2px 10px rgba(0,0,0,1) !important;
}

.strat-node p {
    color: #ffffff !important; /* Chữ trắng tinh */
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0,0,0,1) !important;
}

/* 5. Fix riêng cho Footer để không bị đè */
footer {
    position: relative;
    z-index: 150; /* Cao hơn nền, thấp hơn strategy cards một chút */
    background: #020408 !important; /* Nền đen đặc cho footer */
}