/* style.css - Thiết Kế Chuẩn Apple / Vercel Pro: Kính Mờ Siêu Thực & Ambient Glow */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ===================================================
   HỆ THỐNG KÍNH MỜ SIÊU THỰC (APPLE FROSTED GLASS PRO)
   =================================================== */
.glass, .glass-pro {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03);
}

.dark .glass, .dark .glass-pro {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.4);
}

/* Thẻ nổi khối Vercel Pro Card */
.glass-card {
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -12px rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.4);
}
.dark .glass-card:hover {
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.7);
    border-color: rgba(129, 140, 248, 0.35);
}

/* Scrollbar tinh tế chuẩn macOS */
.custom-scrollbar::-webkit-scrollbar { width: 5px; height: 5px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
.dark .custom-scrollbar::-webkit-scrollbar-thumb { background: #334155; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Animation chuyển cảnh mượt mà */
.view-section { animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hiệu ứng Ambient Shimmer Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 35%, #2563eb 70%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dark .gradient-text {
    background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 40%, #818cf8 70%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Floating Island Header Glow */
.floating-navbar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.8);
}
.dark .floating-navbar {
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ===================================================
   BẢO MẬT HỆ THỐNG: CHỐNG SAO CHÉP & BẢO VỆ BẢN QUYỀN
   =================================================== */
html, body {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

input, textarea, [contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

img {
    -webkit-user-drag: none !important;
    user-drag: none !important;
    pointer-events: none;
}

/* ===================================================
   HIỆU ỨNG CHUỖI STREAK 🔥 & GIAO DIỆN HIỆN ĐẠI
   =================================================== */
@keyframes flameBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.6));
    }
    50% {
        transform: translateY(-2.5px) scale(1.12);
        filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.8));
    }
}

.flame-active {
    display: inline-block;
    animation: flameBounce 1.8s infinite ease-in-out;
}

@keyframes streakGlow {
    0%, 100% {
        box-shadow: 0 0 15px -3px rgba(249, 115, 22, 0.25), inset 0 0 10px rgba(251, 146, 60, 0.08);
    }
    50% {
        box-shadow: 0 0 25px 2px rgba(239, 68, 68, 0.35), inset 0 0 15px rgba(251, 146, 60, 0.15);
    }
}

.streak-card-glow {
    animation: streakGlow 3s infinite ease-in-out;
}

/* Chặn in ấn trộm đề thi qua phím Print */
@media print {
    body * {
        visibility: hidden !important;
    }
    body::after {
        content: "NỘI DUNG ĐỀ THI ĐƯỢC BẢO MẬT BẢN QUYỀN HUIT - KHÔNG ĐƯỢC PHÉP IN ẤN TRÁI PHÉP!";
        visibility: visible !important;
        position: fixed;
        top: 40%;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 20pt;
        font-weight: bold;
        color: #ef4444;
    }
}

/* ===================================================
   STYLING CHO MENU ĐIỀU HƯỚNG HIỆN ĐẠI (CAPSULE ISLAND)
   =================================================== */
.nav-tab-btn {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}
.nav-tab-btn:active {
    transform: scale(0.97);
}
.m-nav-btn {
    user-select: none;
    -webkit-user-select: none;
}
.m-nav-btn:active {
    transform: scale(0.92);
}

/* ===================================================
   HOÀN THIỆN PHONG CÁCH APPLE / VERCEL PRO
   =================================================== */
/* Lưới chấm Vercel / Linear Dot Matrix */
.bg-grid-pattern {
    background-size: 32px 32px;
    background-image: radial-gradient(circle, rgba(99, 102, 241, 0.08) 1.2px, transparent 1.2px);
}
.dark .bg-grid-pattern {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1.2px, transparent 1.2px);
}

/* Thẻ Tiêu Điểm Spotlight Card */
.spotlight-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dark .spotlight-card {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.spotlight-card:hover {
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(99, 102, 241, 0.3) inset;
}
.dark .spotlight-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(129, 140, 248, 0.25) inset;
}
