/* ====== NosXLAB x Quantix: COMPACT TECH ====== */
/* FONT GOOGLE SANS FLEX NATIVE */
@font-face {
    font-family: 'Google Sans Flex';
    src: url('https://fonts.gstatic.com/s/googlesans/v29/4UaGrENHsxJlGDuGo1OIlL3Owp4.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
}

:root {
    --deep-space: #0a0a10;
    --surface: rgba(26, 26, 36, 0.7);
    --accent: #8b5cf6; /* Màu tím chuẩn */
    --accent-gradient: linear-gradient(135deg, #60a5fa 0%, #8b5cf6 100%);
    --text-main: #ffffff;
    --text-dim: #9e9eb3;
    --border-dim: rgba(255, 255, 255, 0.08);
    --editor-bg: #14141e;
    --green: #27c93f;
    --dur: 300ms;
}

/* HIỆU ỨNG NHÁY LIVE UPDATE */
@keyframes blinkCode {
    0%, 100% { background: transparent; }
    50% { background: rgba(139, 92, 246, 0.15); border-radius: 4px; }
}
.blink-code { animation: blinkCode 1.5s infinite ease-in-out; padding: 2px 4px; }

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

body { 
    font-family: 'Google Sans Flex', 'Google Sans', 'Plus Jakarta Sans', sans-serif; 
    background: var(--deep-space); 
    color: var(--text-main); 
    line-height: 1.5; 
    overflow-x: hidden; 
    transition: background 0.4s ease, color 0.4s ease;
}

.container { width: min(1120px, 92%); margin: 0 auto; }
.mono { font-family: 'JetBrains Mono', monospace; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }

/* NAVBAR PILL */
.header-wrapper { padding: 20px 0; position: sticky; top: 0; z-index: 100; }
.navbar { background: var(--surface); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-dim); border-radius: 100px; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text-main); text-decoration: none;}
.brand-img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { color: var(--text-dim); font-size: 14px; font-weight: 600; text-decoration: none; transition: 0.3s; }
.nav-links a:hover { color: var(--text-main); }
.nav-actions { display: flex; align-items: center; gap: 10px;}

/* HERO COMPACT */
.hero { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; padding: 20px 0 40px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.2); border-radius: 100px; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 20px; }
.badge-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 8px var(--green); }
h1 { font-size: clamp(32px, 4.5vw, 52px); font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.gradient-text { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-dim); font-size: 15px; margin-bottom: 24px; max-width: 440px; }
.hero-cta { display: flex; gap: 12px; margin-bottom: 30px; }

/* STATS SÁT HERO */
.stats-row { display: flex; align-items: center; padding: 20px 0; border-top: 1px solid var(--border-dim); border-bottom: 1px solid var(--border-dim); }
.stat-item { flex: 1; text-align: left; }
.border-l { border-left: 1px solid var(--border-dim); padding-left: 20px;}
.stat-number { font-size: 28px; font-weight: 800; }
.stat-label { color: var(--text-dim); font-size: 12px; font-weight: 500;}

/* MOCKUP & CODE */
.mockup-window { background: var(--editor-bg); border-radius: 14px; border: 1px solid var(--border-dim); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.5); width: 100%; transition: 0.3s; }
.mockup-toolbar { display: flex; gap: 6px; padding: 12px 16px; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border-dim); }
.mockup-toolbar span { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f56; } .dot-y { background: #ffbd2e; } .dot-g { background: #27c93f; }
.code-block { font-size: 13px; padding: 20px; line-height: 1.6; color: var(--text-main); opacity: 0.9; }
.indent { padding-left: 20px; }
.c-pre { color: #ff7b72; } .c-comment { color: #8b949e; font-style: italic;} .c-key { color: #79c0ff; } .c-fn { color: #d2a8ff; } .c-str { color: #a5d6ff; } .c-num { color: #d2a8ff; }

/* TABS PILL */
.section { padding: 60px 0;}
.section-header-compact { text-align: center; margin-bottom: 40px; }
.section-title { font-size: 32px; font-weight: 800; margin-bottom: 20px;}
.tabs-pill-wrapper { display: flex; justify-content: center; }
.tabs-pill { background: rgba(255,255,255,0.03); padding: 6px; border-radius: 99px; border: 1px solid var(--border-dim); display: inline-flex; align-items: center; gap: 4px; transition: 0.3s; }
.tab-item { background: transparent; color: var(--text-dim); border: none; padding: 10px 24px; border-radius: 99px; font-size: 14.5px; font-weight: 700; cursor: pointer; transition: 0.3s; font-family: inherit;}
.tab-item:hover { color: var(--text-main); }
.tab-item.active { background: var(--accent); color: #fff; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); }

/* PANEL SPLIT */
.tab-panel { display: none; animation: fadeUp 0.4s ease forwards; }
.tab-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.panel-split { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; align-items: center; }
.panel-text h3 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.panel-text p { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.pulse-dot { display: inline-block; width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 8px var(--green); margin-right: 8px; }
.status-line { color: var(--green); font-size: 12.5px; display: flex; align-items: center; }

/* UTILS BUttons */
.btn { padding: 10px 22px; border-radius: 10px; font-size: 14px; font-weight: 700; transition: 0.3s; cursor: pointer; display: inline-flex; text-decoration: none; align-items: center; justify-content: center; font-family: inherit;}
.btn-sm { padding: 6px 14px; border-radius: 100px; font-size: 13px;}
.btn-primary { background: var(--accent); color: #fff; border: none; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text-main); border: 1px solid var(--border-dim); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.footer { text-align: center; padding: 40px 0; color: var(--text-dim); font-size: 13px; border-top: 1px solid var(--border-dim); margin-top: 60px;}

.reveal { opacity: 0; transform: translateY(10px); transition: 0.6s ease-out; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal[data-anim="scale"] { transform: scale(0.96); }

/* UI LOGIN & SIGNUP */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.auth-box { background: var(--surface); backdrop-filter: blur(20px); border: 1px solid var(--border-dim); border-radius: 24px; padding: 40px; width: 100%; max-width: 420px; z-index: 1; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; text-align: center;}
  .stats-row { flex-direction: column; gap: 20px; align-items: center; }
  .stat-item { padding: 0; text-align: center;}
  .border-l { border-left: none; border-top: 1px solid var(--border-dim); padding-top: 20px; width: 100%; }
  .panel-split { grid-template-columns: 1fr; gap: 30px; text-align: center;}
  .nav-links { display: none; }
  .navbar { border-radius: 16px; }
}

/* ===== MOBILE TASKBAR ===== */
.mobile-taskbar{
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 500px;
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 10px 14px;
    border-radius: 22px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-dim);
    box-shadow: 0 10px 35px rgba(0,0,0,0.35);
    z-index: 9999;
}

.task-item{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: .25s ease;
}

.task-item.active, .task-item:hover{ color: var(--text-main); transform: translateY(-2px); }

@media (max-width: 768px){
    .mobile-taskbar{ display: flex; }
    body{ padding-bottom: 90px; }
}

/* --- THEME SYSTEM --- */
body.light {
    --deep-space: #ffffff;
    --surface: rgba(255, 255, 255, 0.7);
    --text-main: #171717;
    --text-dim: #666666;
    --border-dim: rgba(0, 0, 0, 0.06);
    --editor-bg: #fafafa;
    --bg-gradient: radial-gradient(circle at top right, rgba(139, 92, 246, 0.03), transparent);
}

/* Style cho nút Toggle */
.theme-toggle {
    cursor: pointer;
    padding: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 50px;
    border: 1px solid var(--border-dim);
    width: 54px;
    height: 28px;
    position: relative;
    transition: 0.3s;
}

.toggle-track {
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
    align-items: center;
    height: 100%;
    font-size: 12px;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

body.light .toggle-thumb { transform: translateX(26px); background: var(--accent); }
body.light .theme-toggle { background: #e2e8f0; }

/* NextJS/macOS Style Fixes cho Light Mode */
body.light .mockup-window { background: #ffffff; border-color: rgba(0,0,0,0.05); box-shadow: 0 20px 40px rgba(0,0,0,0.04); }
body.light .mockup-toolbar { background: rgba(0,0,0,0.02); border-bottom: 1px solid rgba(0,0,0,0.03); }
body.light .code-block { color: #334155; }
body.light .tabs-pill { background: #f5f5f5; border-color: #e5e5e5; }
body.light .tab-item.active { background: #fff; color: #000; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
body.light .btn-secondary { background: #fff; border-color: #e5e5e5; }
body.light .hero-badge { background: rgba(139, 92, 246, 0.05); border-color: rgba(139, 92, 246, 0.1); }




/* Style dùng chung cho các trang Auth/Page */
.auth-box, .mockup-window {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-dim);
    transition: all 0.3s ease;
}

body.light .auth-box, 
body.light .mockup-window {
    background: #ffffff;
    border-color: rgba(0,0,0,0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}

body.light input, 
body.light textarea {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light h1, body.light h2, body.light h3, body.light h4 {
    color: #0f172a;
}








/* --- TRANG CON (PAGES) OPTIMIZATION --- */
body.light .auth-box, body.light .mockup-window {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.06) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05) !important;
}

body.light input, body.light textarea {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #1e293b !important;
}

body.light .auth-box h2, body.light label { color: #171717; }
body.light .desc { color: #64748b; }