/* ===== RESET & ROOT ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:        #070e1f;
  --bg2:       #0a1328;
  --bg3:       #0d1835;
  --card:      #0c1730;
  --blue:      #4f8ef7;
  --blue2:     #2563eb;
  --blue-lt:   #7eb3ff;
  --purple:    #7c5cfc;
  --cyan:      #22d3ee;
  --teal:      #14b8a6;
  --text:      #e2ecff;
  --muted:     #5a7aa8;
  --border:    #1a2d52;
  --border2:   #223562;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* PARTICLES */
#particles-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5; }

/* LOGO */
.logo-wrap {
  width: 36px; height: 36px;
  overflow: visible; background: transparent;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-wrap img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: screen; filter: brightness(1.3) contrast(1.1); }
.logo-sm { width: 28px; height: 28px; }

/* ===== NAV ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 52px; height: 64px;
  background: rgba(7,14,31,0.7); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(79,142,247,0.08);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
  overflow: visible;
}
#navbar.scrolled {
  background: rgba(7,14,31,0.97);
  border-color: rgba(79,142,247,0.18);
  box-shadow: 0 4px 40px rgba(0,0,0,0.45);
}

/* Left: logo — shrinks but never overflows */
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  min-width: 0; flex: 1; overflow: hidden;
}
.nav-logo span { color: var(--blue); }
.ns-blue { color: var(--blue); }
.nav-logo-text {
  display: flex; flex-direction: column; line-height: 1.2;
  min-width: 0; overflow: hidden;
}
.nav-logo-title {
  font-size: 17px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Right container: holds hamburger (mobile) + nav-links */
.nav-right {
  display: flex; align-items: center; flex-shrink: 0;
}

/* Hamburger hidden on desktop */
.hamburger { display: none; }

/* Nav links — column 2, desktop */
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-link {
  padding: 7px 18px; border-radius: 8px; font-size: 14px; font-weight: 500;
  text-decoration: none; color: var(--muted);
  transition: color 0.25s, background 0.25s; cursor: pointer;
}
.nav-link:hover { color: var(--text); background: rgba(79,142,247,0.07); }
.nav-link.active {
  color: var(--blue); background: rgba(79,142,247,0.12);
  border: 1px solid rgba(79,142,247,0.22);
}

/* ===== HERO ===== */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; text-align: center; padding: 90px 24px 72px; overflow: hidden; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; animation: floatOrb 9s ease-in-out infinite; }
.orb1 { width: 560px; height: 560px; background: radial-gradient(circle, rgba(79,142,247,0.13) 0%, transparent 70%); top: -120px; left: -100px; }
.orb2 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(124,92,252,0.1) 0%, transparent 70%); bottom: -80px; right: -80px; animation-delay: -3.5s; }
.orb3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(34,211,238,0.07) 0%, transparent 70%); top: 40%; left: 65%; animation-delay: -6s; }
.hero-grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(79,142,247,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(79,142,247,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, black, transparent);
}
.hero-content { position: relative; z-index: 2; max-width: 730px; }

.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 0; border-radius: 0; background: none; border: none; font-size: 13px; color: var(--blue-lt); margin-bottom: 28px; }
.hero h1 { font-size: clamp(52px, 9vw, 94px); font-weight: 900; line-height: 1.0; letter-spacing: -3px; margin-bottom: 22px; }
.g-text { background: linear-gradient(135deg, var(--blue) 30%, var(--cyan) 85%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 16px; color: var(--muted); line-height: 1.75; margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-tags { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.tag { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dred    { background: #f87171; box-shadow: 0 0 8px rgba(248,113,113,0.6); }
.dpurple { background: #c084fc; box-shadow: 0 0 8px rgba(192,132,252,0.6); }
.damber  { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,0.6); }
.dgreen  { background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.6); }
.hero-btns { display: flex; align-items: center; justify-content: center; gap: 16px; }

/* BUTTONS */
.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 12px; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, #3b82f6, #7c5cfc);
  color: #fff; text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 4px 24px rgba(79,142,247,0.38), 0 0 0 1px rgba(79,142,247,0.2);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
  position: relative; overflow: hidden;
}
.btn-primary::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.1); opacity: 0; transition: opacity 0.25s; }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 40px rgba(79,142,247,0.52); }
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: scale(0.97); }
.btn-lg { padding: 15px 34px; font-size: 16px; border-radius: 14px; }
.btn-secondary { display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px; border-radius: 12px; font-size: 15px; font-weight: 600; background: rgba(255,255,255,0.03); color: var(--text); text-decoration: none; border: 1px solid var(--border2); cursor: pointer; transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), background 0.25s, border-color 0.25s; backdrop-filter: blur(8px); }
.btn-secondary:hover { transform: translateY(-3px); background: rgba(79,142,247,0.08); border-color: rgba(79,142,247,0.35); }
.btn-secondary:active { transform: scale(0.97); }
.arr { display: inline-block; transition: transform 0.22s; }
.btn-primary:hover .arr, .btn-secondary:hover .arr { transform: translateX(5px); }

/* SCROLL HINT */
.scroll-hint { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); width: 26px; height: 44px; border-radius: 13px; border: 2px solid rgba(79,142,247,0.28); display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; }
.scroll-ball { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: scrollBall 2.2s ease-in-out infinite; }

/* ===== NEUMORPHISM ===== */
.stat-card, .feat-card, .step-card, .cta-box {
  background: linear-gradient(145deg, #0e1d3b, #081428);
  border-radius: 20px;
  border: 1px solid rgba(79,142,247,0.09);
  box-shadow: 7px 7px 18px rgba(3,7,18,0.8), -4px -4px 12px rgba(25,50,95,0.28), inset 0 1px 0 rgba(79,142,247,0.07);
  transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}

/* ===== STATS ===== */
.stats-wrap { position: relative; z-index: 2; background: linear-gradient(180deg, var(--bg), var(--bg2)); padding: 0 52px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; padding: 64px 0; }
.stat-card { padding: 36px 24px; text-align: center; cursor: default; position: relative; overflow: hidden; opacity: 0; transform: translateY(32px); }
.stat-card.in-view { animation: cardUp 0.6s ease forwards; }
.stat-icon-bg { width: 56px; height: 56px; border-radius: 14px; background: rgba(79,142,247,0.09); border: 1px solid rgba(79,142,247,0.16); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; color: var(--blue); box-shadow: inset 3px 3px 7px rgba(3,7,18,0.55), inset -2px -2px 6px rgba(25,50,95,0.2); }
.stat-val { font-size: 40px; font-weight: 900; background: linear-gradient(135deg, #e2ecff 20%, var(--blue-lt)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 6px; letter-spacing: -2px; }
.stat-lbl { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.stat-sub { font-size: 12px; color: var(--muted); }

/* ===== SECTIONS ===== */
.section { padding: 90px 52px; position: relative; z-index: 2; }
.sec-dark { background: var(--bg2); }
.sec-header { text-align: center; max-width: 620px; margin: 0 auto 60px; }
.sec-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 14px; }
.sec-title { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -1.5px; margin-bottom: 14px; }
.sec-sub { font-size: 15px; color: var(--muted); line-height: 1.75; }

/* ===== FEATURE CARDS ===== */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1100px; margin: 0 auto; }
.feat-card { padding: 32px 28px; position: relative; overflow: hidden; cursor: pointer; opacity: 0; transform: translateY(36px); }
.feat-card.in-view { animation: cardUp 0.65s ease forwards; }
.feat-card:hover { transform: translateY(-8px); border-color: rgba(79,142,247,0.28); box-shadow: 10px 18px 36px rgba(3,7,18,0.9), -4px -4px 14px rgba(25,50,95,0.28); }
.feat-icon-bg { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 22px; color: #fff; box-shadow: 4px 4px 12px rgba(0,0,0,0.45), -2px -2px 8px rgba(255,255,255,0.04); transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1); }
.feat-card:hover .feat-icon-bg { transform: scale(1.1) rotate(-5deg); }
.c-blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.c-purple { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.c-teal   { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.feat-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.feat-card p  { font-size: 14px; color: var(--muted); line-height: 1.75; }
.feat-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; font-size: 13px; font-weight: 600; color: var(--blue); cursor: pointer; }
.feat-arr { display: inline-block; transition: transform 0.25s; }
.feat-card:hover .feat-arr { transform: translateX(6px); }
.card-glow { position: absolute; bottom: -40px; right: -40px; width: 160px; height: 160px; border-radius: 50%; filter: blur(55px); opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.feat-card:hover .card-glow { opacity: 1; }
.glow-blue   { background: rgba(79,142,247,0.28); }
.glow-purple { background: rgba(124,92,252,0.28); }
.glow-teal   { background: rgba(20,184,166,0.28); }

/* ===== STEPS ===== */
.steps-list { display: flex; flex-direction: column; max-width: 820px; margin: 0 auto; }
.step-line { width: 2px; height: 24px; background: linear-gradient(to bottom, rgba(79,142,247,0.35), rgba(79,142,247,0.08)); margin-left: 39px; }
.step-card { display: flex; align-items: center; gap: 24px; padding: 26px 30px; opacity: 0; transform: translateX(-28px); }
.step-card.in-view { animation: slideRight 0.55s ease forwards; }
.step-num-box { min-width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--blue2), var(--purple)); display: flex; align-items: center; justify-content: center; box-shadow: 4px 4px 14px rgba(0,0,0,0.5), 0 0 16px rgba(79,142,247,0.22); flex-shrink: 0; }
.step-num-box span { font-size: 14px; font-weight: 800; color: #fff; }
.step-body { flex: 1; }
.step-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.step-body p  { font-size: 13.5px; color: var(--muted); }
.step-svg { color: rgba(79,142,247,0.38); flex-shrink: 0; }

/* ===== CTA ===== */
.cta-sec { background: var(--bg); text-align: center; overflow: hidden; }
.cta-orb { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(79,142,247,0.07), transparent 70%); filter: blur(60px); pointer-events: none; }
.cta-box { max-width: 640px; margin: 0 auto; padding: 64px 48px; position: relative; z-index: 2; border: 1px solid rgba(79,142,247,0.14); overflow: hidden; }
.cta-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(79,142,247,0.5), transparent); }
.cta-logo-ring { width: 72px; height: 72px; border-radius: 50%; background: rgba(79,142,247,0.09); border: 1px solid rgba(79,142,247,0.18); display: flex; align-items: center; justify-content: center; margin: 0 auto 28px; box-shadow: 0 0 24px rgba(79,142,247,0.15), inset 3px 3px 9px rgba(3,7,18,0.65); }
.cta-logo { width: 52px; height: 52px; object-fit: contain; mix-blend-mode: screen; filter: brightness(1.35); }
.cta-box h2 { font-size: 32px; font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; }
.cta-box p  { font-size: 15px; color: var(--muted); margin-bottom: 32px; line-height: 1.7; }

/* ===== FOOTER ===== */
footer { background: var(--bg2); border-top: 1px solid rgba(79,142,247,0.09); position: relative; z-index: 2; }
.foot-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 52px; max-width: 1100px; margin: 0 auto; padding: 60px 52px 40px; }
.foot-logo { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.foot-logo em { color: var(--blue); font-style: normal; }
.foot-brand p { font-size: 14px; color: var(--muted); line-height: 1.75; }
.foot-col h4 { font-size: 11px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 18px; }
.foot-col a { display: block; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 10px; transition: color 0.22s; width: fit-content; }
.foot-col a:hover { color: var(--blue); }
.contact-row { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.contact-row svg { color: var(--blue); flex-shrink: 0; }
.foot-bottom { text-align: center; padding: 20px 52px; border-top: 1px solid rgba(79,142,247,0.07); font-size: 13px; color: var(--muted); }

/* ===== REVEAL ===== */
.reveal       { opacity: 0; transform: translateY(28px); transition: opacity 0.75s ease, transform 0.75s ease; }
.reveal-card  { opacity: 0; transform: translateY(36px); transition: opacity 0.75s ease, transform 0.75s ease; }
.reveal-step  { opacity: 0; transform: translateX(-28px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.in-view, .reveal-card.in-view, .reveal-step.in-view { opacity: 1; transform: none; }

/* ===== KEYFRAMES ===== */
@keyframes fadeDown  { from { opacity:0; transform:translateY(-18px); } to { opacity:1; transform:none; } }
@keyframes fadeUp    { from { opacity:0; transform:translateY(28px);  } to { opacity:1; transform:none; } }
@keyframes cardUp    { from { opacity:0; transform:translateY(32px);  } to { opacity:1; transform:none; } }
@keyframes slideRight{ from { opacity:0; transform:translateX(-28px); } to { opacity:1; transform:none; } }
@keyframes floatOrb  { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-22px); } }
@keyframes scrollBall{ 0%,100% { transform:translateY(0); opacity:1; } 80% { transform:translateY(18px); opacity:0; } }
@keyframes modalIn   { from { opacity:0; transform:translateY(40px) scale(0.97); } to { opacity:1; transform:none; } }

.fade-down { animation: fadeDown 0.9s cubic-bezier(0.22,1,0.36,1) both; }
.fade-up   { animation: fadeUp  0.9s cubic-bezier(0.22,1,0.36,1) both; }
.d1 { animation-delay: 0.1s; }
.d2 { animation-delay: 0.22s; }
.d3 { animation-delay: 0.34s; }
.d4 { animation-delay: 0.46s; }

/* ===== UPLOAD MODAL ===== */
#uploadModal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(4,9,22,0.88); backdrop-filter: blur(14px);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 0;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
#uploadModal.open {
  opacity: 1; pointer-events: all;
}
#uploadModal .modal-inner {
  width: 100%; min-height: 100vh;
  animation: modalIn 0.4s cubic-bezier(0.22,1,0.36,1) both;
  background: #0a0a0f;
}
.modal-close-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 10px 20px;
  background: rgba(13,13,26,0.95);
  border-bottom: 1px solid #1e2a3a;
}
.modal-close-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(79,142,247,0.1); border: 1px solid rgba(79,142,247,0.25);
  color: #7eb3ff; font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 8px; cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.modal-close-btn:hover { background: rgba(79,142,247,0.2); transform: scale(1.04); }

/* ===== UPLOAD UI INSIDE MODAL ===== */
.ns-body { background: #0a0a0f; color: #fff; font-family: "Segoe UI", sans-serif; min-height: calc(100vh - 48px); }
.ns-header { background: #0d0d1a; border-bottom: 1px solid #1e2a3a; padding: 14px 32px; display: flex; align-items: center; justify-content: space-between; }
.ns-header-left { display: flex; align-items: center; gap: 14px; }
.ns-logo-img { width: 46px; height: 46px; object-fit: contain; border-radius: 6px; }
.ns-logo-text h1 { font-size: 21px; font-weight: 700; color: #fff; letter-spacing: 0.5px; }
.ns-logo-text p { font-size: 10px; letter-spacing: 3px; color: #4a9eff; text-transform: uppercase; margin-top: 2px; }
.ns-version { background: #0f1e35; border: 1px solid #1e3a5f; color: #4a9eff; font-size: 12px; padding: 4px 12px; border-radius: 4px; font-weight: 500; }
.ns-steps-bar { background: #0d0d1a; border-bottom: 1px solid #1a1a2e; padding: 16px 32px; }
.ns-steps-label { font-size: 10px; letter-spacing: 3px; color: #fff; text-transform: uppercase; margin-bottom: 12px; font-weight: 500; }
.ns-steps-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ns-step { display: flex; align-items: center; gap: 8px; }
.ns-step-num { font-size: 10px; color: #fff; letter-spacing: 1px; font-weight: 700; }
.ns-step-name { font-size: 13px; color: #fff; padding: 5px 14px; border: 1px solid #1e3a5a; border-radius: 4px; background: #0f1e30; transition: all 0.3s; }
.ns-step-name.active { background: #1a3a6a; border-color: #4a9eff; }
.ns-step-arrow { color: #2a5cbf; font-size: 16px; margin: 0 8px; }
.ns-main { display: grid; grid-template-columns: 330px 1fr; gap: 24px; padding: 28px 32px; }
.ns-left { display: flex; flex-direction: column; gap: 22px; }
.ns-section-title { font-size: 10px; letter-spacing: 3px; color: #fff; text-transform: uppercase; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #2a4a6a; font-weight: 600; }
.ns-upload-area { border: 1.5px dashed #1e3a5a; border-radius: 6px; background: #0d1520; overflow: hidden; cursor: pointer; transition: border-color 0.2s; }
.ns-upload-area:hover, .ns-upload-area.dragover { border-color: #4a9eff; background: #0f1e30; }
.ns-upload-tab { background: #0f1e30; border-bottom: 1px solid #1a2a3a; padding: 8px 14px; font-size: 11px; color: #fff; display: flex; align-items: center; gap: 7px; pointer-events: none; }
.ns-upload-drop { padding: 30px 20px; text-align: center; pointer-events: none; }
.ns-upload-icon svg { width: 34px; height: 34px; stroke: #3a6abf; fill: none; margin-bottom: 12px; }
.ns-drop-title { font-size: 14px; color: #fff; margin-bottom: 4px; font-weight: 500; }
.ns-drop-or { font-size: 12px; color: #aac4d8; margin: 4px 0; }
.ns-drop-click { font-size: 12px; color: #fff; }
.ns-file-chosen { font-size: 12px; color: #4a9eff; margin-top: 10px; word-break: break-all; }
#nsFileInput { display: none; }
.ns-model-box { background: #0d1520; border: 1px solid #1a2a3a; border-radius: 6px; padding: 14px; }
.ns-model-box label { font-size: 12px; color: #fff; display: block; margin-bottom: 10px; font-weight: 500; }
.ns-model-select { width: 100%; background: #0a1220; border: 1px solid #1e3a5a; color: #fff; padding: 9px 36px 9px 14px; border-radius: 4px; font-size: 13px; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234a9eff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.ns-model-select option { background: #0a1220; color: #fff; }
.ns-run-btn { width: 100%; padding: 13px; background: #2a5cbf; border: none; border-radius: 5px; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; letter-spacing: 0.4px; transition: background 0.2s; }
.ns-run-btn:hover { background: #3a6cd0; }
.ns-run-btn:disabled { background: #1a2a4a; color: #4a6a8a; cursor: not-allowed; }
.ns-result-box { background: #0d1520; border: 1px solid #1a2a3a; border-radius: 6px; padding: 16px; min-height: 70px; display: flex; align-items: center; justify-content: center; }
.ns-result-placeholder { font-size: 12px; color: #fff; font-style: italic; }
.ns-result-content { width: 100%; }
.ns-tumor-label { font-size: 10px; color: #fff; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1.5px; }
.ns-tumor-type { font-size: 20px; font-weight: 700; color: #4a9eff; margin-bottom: 10px; }
.ns-conf-header { display: flex; justify-content: space-between; font-size: 11px; color: #fff; margin-bottom: 5px; font-weight: 500; }
.ns-conf-bar-bg { background: #0a1220; border-radius: 3px; height: 7px; overflow: hidden; margin-bottom: 12px; }
.ns-conf-bar { height: 100%; background: linear-gradient(90deg,#1a4abf,#4a9eff); border-radius: 3px; transition: width 1.2s ease; }
.ns-tumor-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.ns-badge { font-size: 11px; padding: 4px 12px; border-radius: 3px; font-weight: 500; }
.ns-badge-glioma { background: #0f1e35; border: 1px solid #1e4a7f; color: #4a9eff; }
.ns-badge-meningioma { background: #1a1030; border: 1px solid #4a1a8f; color: #aa7aff; }
.ns-badge-notumor { background: #0f1e1a; border: 1px solid #1a4a3a; color: #4adf8a; }
.ns-badge.active-glioma { background: #1e3a6a; border-color: #4a9eff; color: #fff; }
.ns-badge.active-meningioma { background: #2a1050; border-color: #8a4aff; color: #fff; }
.ns-badge.active-notumor { background: #0f3020; border-color: #2adf6a; color: #fff; }
.ns-fps-box { background: #0d1520; border: 1px solid #1a2a3a; border-radius: 6px; padding: 14px; }
.ns-fps-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ns-fps-label { font-size: 12px; color: #fff; font-weight: 500; }
.ns-fps-value-wrap { display: flex; align-items: center; gap: 6px; }
.ns-fps-input { background: #0a1220; border: 1px solid #1e3a5a; color: #fff; width: 50px; padding: 5px 8px; border-radius: 3px; font-size: 13px; text-align: center; }
.ns-fps-reset { background: #0f1e30; border: 1px solid #1e3a5a; color: #4a9eff; width: 28px; height: 28px; border-radius: 3px; cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.ns-fps-slider-row { display: flex; align-items: center; gap: 10px; }
.ns-fps-min, .ns-fps-max { font-size: 11px; color: #fff; }
.ns-fps-slider-row input[type=range] { flex: 1; -webkit-appearance: none; height: 4px; border-radius: 2px; background: linear-gradient(to right,#2a5cbf var(--pct,28%),#1a2a3a var(--pct,28%)); outline: none; cursor: pointer; }
.ns-fps-slider-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: #4a9eff; cursor: pointer; border: 2px solid #0a1220; }
.ns-log-box { background: #0a0f1a; border: 1px solid #1a2a3a; border-radius: 6px; overflow: hidden; }
.ns-log-inner { height: 145px; overflow-y: auto; padding: 10px 12px; font-family: "Courier New", monospace; font-size: 11px; }
.ns-log-inner::-webkit-scrollbar { width: 4px; }
.ns-log-inner::-webkit-scrollbar-track { background: #0a1220; }
.ns-log-inner::-webkit-scrollbar-thumb { background: #1e3a5a; border-radius: 2px; }
.ns-log-line { display: flex; gap: 8px; margin-bottom: 4px; line-height: 1.6; }
.ns-log-time { color: #5a8fbf; min-width: 52px; flex-shrink: 0; }
.ns-log-msg { color: #fff; white-space: pre-wrap; word-break: break-word; }
.ns-log-msg.ok { color: #3abf7a; }
.ns-log-msg.info { color: #4a9eff; }
.ns-log-msg.warn { color: #e07a30; }
.ns-log-msg.err { color: #e04a4a; }
.ns-output-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; align-items: start; }
.ns-output-card { background: #0d1520; border: 1px solid #2a4a6a; border-radius: 6px; overflow: hidden; }
.ns-output-header { padding: 11px 16px; border-bottom: 1px solid #2a4a6a; display: flex; align-items: center; gap: 8px; background: #0f1a28; }
.ns-output-num { font-size: 11px; color: #fff; font-weight: 700; }
.ns-output-title { font-size: 13px; color: #fff; font-weight: 500; }
.ns-output-body { height: 340px; display: flex; align-items: center; justify-content: center; background: #080d14; }
.ns-output-placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0.55; }
.ns-output-placeholder svg { width: 30px; height: 30px; stroke: #6a9abf; fill: none; }
.ns-output-placeholder span { font-size: 11px; color: #fff; }
.ns-output-body img { width: 100%; height: 100%; object-fit: contain; }
.ns-spinner { width: 34px; height: 34px; border: 3px solid #1a2a3a; border-top: 3px solid #4a9eff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ns-error-banner { background: #1a0f0f; border: 1px solid #5a2a2a; border-radius: 5px; padding: 10px 14px; font-size: 12px; color: #e07a7a; display: none; margin-top: 8px; }
.ns-footer { text-align: center; padding: 18px; font-size: 12px; color: #8aaac4; border-top: 1px solid #1a2a3a; margin-top: 8px; }
.ns-footer a { color: #2a5cbf; text-decoration: none; }
@media(max-width:960px) {
  .ns-main { grid-template-columns: 1fr; }
  .ns-output-grid { grid-template-columns: 1fr; }
}

/* ===== SAMPLE BUTTON ===== */
.ns-sample-btn {
  width: 100%; padding: 10px 14px;
  background: rgba(74,158,255,0.08);
  border: 1px dashed rgba(74,158,255,0.35);
  border-radius: 5px; color: #4a9eff;
  font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 8px;
  transition: background 0.2s, border-color 0.2s;
  font-family: "Segoe UI", sans-serif;
}
.ns-sample-btn:hover  { background: rgba(74,158,255,0.16); border-color: #4a9eff; }
.ns-sample-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ===== MODEL TOOLTIP ===== */
.ns-model-tooltip-wrap {
  position: relative; display: inline-flex;
}
.ns-model-qmark {
  width: 17px; height: 17px; border-radius: 50%;
  background: rgba(74,158,255,0.15);
  border: 1px solid rgba(74,158,255,0.4);
  color: #4a9eff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; user-select: none;
  transition: background 0.2s;
}
.ns-model-qmark:hover { background: rgba(74,158,255,0.28); }
.ns-model-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: #0d1a2e; border: 1px solid rgba(74,158,255,0.3);
  border-radius: 7px; padding: 10px 13px;
  font-size: 11.5px; color: #c8daff; line-height: 1.55;
  width: 240px; text-align: left;
  box-shadow: 0 8px 28px rgba(0,0,0,0.7);
  pointer-events: none; opacity: 0;
  transition: opacity 0.18s;
  z-index: 999; white-space: normal;
}
.ns-model-tooltip-wrap:hover .ns-model-tooltip { opacity: 1; }
.ns-model-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(74,158,255,0.3);
}

/* ===== DOWNLOAD BUTTON on output cards ===== */
.ns-output-header { padding: 11px 16px; border-bottom: 1px solid #2a4a6a; display: flex; align-items: center; gap: 8px; background: #0f1a28; }
.ns-dl-btn {
  margin-left: auto; display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 5px; font-size: 11px; font-weight: 600;
  background: rgba(74,158,255,0.1); border: 1px solid rgba(74,158,255,0.25);
  color: #4a9eff; cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.ns-dl-btn:hover { background: rgba(74,158,255,0.22); border-color: #4a9eff; }

/* ============================================================
   QUIZ HOME BUTTON (shared by quiz.html + practical_quiz.html)
   ============================================================ */
.quiz-home-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: rgba(79,142,247,0.07); border: 1px solid rgba(79,142,247,0.2);
  color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.quiz-home-btn:hover {
  background: rgba(79,142,247,0.16); color: var(--blue-lt);
  border-color: rgba(79,142,247,0.4);
}


/* HAMBURGER / MOBILE NAV — styles are in the mobile @media block below */


/* ============================================================
   LAPTOP (1025px – 1280px)
   ============================================================ */
@media (min-width: 1025px) and (max-width: 1280px) {
  #navbar { padding: 0 36px; }
  .hero { padding: 90px 36px 72px; }
  .section { padding: 80px 36px; }
  .stats-wrap { padding: 0 36px; }
  .stats-grid { max-width: 960px; gap: 16px; }
  .feat-grid  { max-width: 960px; gap: 20px; }
  .foot-inner { padding: 56px 36px 36px; gap: 40px; }
  .foot-bottom { padding: 18px 36px; }
}


/* ============================================================
   TABLET (769px – 1024px)
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  #navbar { padding: 0 28px; height: 60px; }

  .hero { padding: 88px 28px 64px; }
  .hero h1 { font-size: clamp(44px, 7vw, 72px); letter-spacing: -2px; }
  .hero-sub { font-size: 15px; }
  .hero-content { max-width: 640px; }

  .stats-wrap { padding: 0 28px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 52px 0; }
  .stat-card { padding: 28px 20px; }
  .stat-val { font-size: 36px; }

  .section { padding: 72px 28px; }
  .feat-grid  { grid-template-columns: 1fr 1fr; gap: 18px; }
  .feat-card { padding: 28px 22px; }

  .steps-list { padding: 0; }
  .step-card { padding: 22px 24px; gap: 18px; }

  .cta-box { padding: 52px 40px; }

  .foot-inner { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 50px 28px 36px; }
  .foot-bottom { padding: 16px 28px; }

  /* Upload modal — tablet */
  .ns-main { grid-template-columns: 290px 1fr; padding: 20px 24px; gap: 20px; }
  .ns-header { padding: 14px 24px; }
  .ns-steps-bar { padding: 14px 24px; }
  .ns-output-grid { grid-template-columns: repeat(2, 1fr); }
  .ns-output-body { height: 280px; }

  /* Articles */
  .articles-page { padding: 88px 28px 64px !important; }
  .articles-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 18px !important; }
}


/* ============================================================
   MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Navbar: flex row, logo left, nav-right (hamburger) right */
  #navbar {
    padding: 0 16px;
    height: 56px;
  }

  /* Logo shrinks, title truncates */
  .nav-logo {
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  .logo-wrap {
    width: 30px; height: 30px; flex-shrink: 0;
  }
  .nav-logo-text {
    min-width: 0; overflow: hidden; flex: 1;
  }
  .nav-logo-title {
    font-size: 14px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block; max-width: 100%;
  }

  /* Hamburger button — shows on mobile */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    padding: 0;
    flex-shrink: 0;
    background: rgba(79,142,247,0.07);
    border: 1px solid rgba(79,142,247,0.18);
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--blue-lt); border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
  }
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Nav-links: hidden dropdown, slides down from below navbar */
  .nav-links {
    position: fixed;
    top: 56px; left: 0; right: 0;
    background: rgba(7,14,31,0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(79,142,247,0.2);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 20px;
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), visibility 0.3s;
    z-index: 998;
    box-shadow: 0 16px 48px rgba(0,0,0,0.75);
    width: 100%;
    box-sizing: border-box;
  }
  .nav-links.mobile-open { transform: translateY(0); visibility: visible; }

  .nav-link {
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    min-height: 48px;
    text-align: left;
  }

  /* User/login area inside mobile menu */
  #navUserArea {
    margin-left: 0 !important;
    margin-top: 8px;
    border-top: 1px solid rgba(79,142,247,0.12);
    padding-top: 12px;
  }
  #navUserArea button,
  #navUserArea a { width: 100% !important; box-sizing: border-box; }

  /* Hero */
  .hero { padding: 80px 18px 60px; }
  .hero h1 { font-size: clamp(36px, 10vw, 58px); letter-spacing: -2px; }
  .hero-sub { font-size: 14px; }
  .hero-btns { flex-direction: column; align-items: center; gap: 12px; }
  .hero-btns .btn-primary,
  .hero-btns .btn-secondary { width: 100%; max-width: 340px; justify-content: center; }
  .hero-tags { gap: 14px; }
  .scroll-hint { display: none; }

  /* Stats */
  .stats-wrap { padding: 0 18px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 40px 0; }
  .stat-card { padding: 22px 14px; }
  .stat-val { font-size: 30px; }
  .stat-icon-bg { width: 46px; height: 46px; }

  /* Sections */
  .section { padding: 56px 18px; }
  .sec-title { font-size: clamp(26px, 6vw, 38px); }

  /* Features */
  .feat-grid { grid-template-columns: 1fr; gap: 14px; }
  .feat-card { padding: 24px 20px; }

  /* Steps */
  .steps-list { padding: 0 2px; }
  .step-card { padding: 18px 16px; gap: 14px; }
  .step-num-box { min-width: 42px; height: 42px; }
  .step-line { margin-left: 34px; }

  /* CTA */
  .cta-box { padding: 40px 20px; margin: 0; }
  .cta-box h2 { font-size: 26px; }
  .cta-box p { font-size: 14px; }

  /* Footer */
  .foot-inner { grid-template-columns: 1fr; gap: 28px; padding: 40px 18px 28px; }
  .foot-bottom { padding: 14px 18px; font-size: 12px; }

  /* Upload modal */
  .ns-main { grid-template-columns: 1fr; padding: 14px 14px; gap: 16px; }
  .ns-output-grid { grid-template-columns: 1fr; }
  .ns-header { padding: 12px 14px; }
  .ns-steps-bar { padding: 10px 14px; }
  .ns-steps-row { gap: 3px; flex-wrap: wrap; }
  .ns-step-name { font-size: 11px; padding: 4px 8px; }
  .ns-step-arrow { margin: 0 2px; font-size: 13px; }
  .ns-output-body { height: 220px; }
  .ns-logo-text h1 { font-size: 17px; }
  .ns-logo-text p  { font-size: 9px; }
  .ns-logo-img { width: 36px; height: 36px; }
  .modal-close-bar { padding: 8px 14px; }

  /* Login modal scrollable */
  #loginModal > div {
    max-height: 92vh !important;
    overflow-y: auto;
    padding: 28px 18px !important;
    width: 96% !important;
    border-radius: 16px;
  }

  /* Articles page */
  .articles-page { padding: 80px 14px 50px !important; }
  .upload-banner { padding: 20px 16px !important; flex-direction: column; align-items: flex-start; }
  .articles-filter-bar { gap: 8px; }
  .filter-btn { padding: 7px 14px; font-size: 12px; }
  .search-box { margin-left: 0; width: 100%; }
  .search-box input { width: 100%; }
  .articles-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .ua-box { padding: 28px 18px !important; width: 96% !important; max-height: 92vh !important; }
  .av-box { padding: 28px 18px !important; width: 96% !important; max-height: 90vh !important; }
  .admin-box { padding: 24px 14px !important; }
  .admin-stat-row { gap: 8px; }
  .admin-stat { padding: 12px 10px; }
  .admin-stat-num { font-size: 24px; }
}

/* ============================================================
   SMALL MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  #navbar { padding: 0 12px; height: 52px; }
  .nav-links { top: 52px; }
  .logo-wrap { width: 26px; height: 26px; }
  .nav-logo-title { font-size: 13px; }
  .hamburger { width: 40px; height: 40px; }
  .hero { padding: 72px 14px 52px; }
  .hero h1 { font-size: clamp(30px, 9.5vw, 46px); letter-spacing: -1.5px; }
  .hero-badge { font-size: 11px; padding: 6px 12px; }
  .hero-sub { font-size: 13.5px; }
  .hero-tags { gap: 10px; }
  .hero-btns .btn-primary,
  .hero-btns .btn-secondary { font-size: 14px; padding: 12px 20px; max-width: 100%; }

  .stats-grid { gap: 10px; }
  .stat-card { padding: 18px 12px; }
  .stat-val { font-size: 26px; }
  .stat-lbl { font-size: 13px; }

  .section { padding: 48px 14px; }
  .feat-card { padding: 20px 16px; }
  .feat-card h3 { font-size: 17px; }

  .cta-box { padding: 36px 16px; }
  .cta-box h2 { font-size: 22px; }
  .btn-lg { font-size: 14px; padding: 12px 22px; }

  .foot-inner { padding: 36px 14px 24px; }
  .foot-brand p { font-size: 13px; }

  /* Upload modal small */
  .ns-header { padding: 10px 12px; }
  .ns-logo-text h1 { font-size: 15px; }
  .ns-logo-text p  { display: none; }
  .ns-logo-img { width: 30px; height: 30px; }
  .ns-main { padding: 12px; gap: 14px; }
  .ns-steps-bar { padding: 8px 12px; }
  .ns-step-name { font-size: 10px; padding: 3px 7px; }
  .ns-output-body { height: 200px; }

  /* Articles */
  .articles-page { padding: 72px 12px 40px !important; }
  .articles-header h1 { font-size: clamp(26px, 7vw, 38px) !important; }
  .article-card-thumb { height: 130px; }
  .ua-box, .av-box { padding: 22px 14px !important; }
}


/* ============================================================
   EXTRA SMALL (≤ 360px) — very small phones
   ============================================================ */
@media (max-width: 360px) {
  .hero h1 { font-size: 28px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-val { font-size: 22px; }
  .stat-lbl { font-size: 12px; }
  .feat-card h3 { font-size: 15px; }
  .nav-logo span:last-child { display: none; }
}


/* ============================================================
   TOUCH / HOVER improvements for all mobile
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  /* Disable tilt/hover transforms on touch devices */
  .feat-card:hover,
  .stat-card:hover { transform: none; }
  .feat-card:hover .feat-icon-bg { transform: none; }

  /* Larger touch targets */
  .nav-link { min-height: 44px; display: flex; align-items: center; }
  .btn-primary, .btn-secondary { min-height: 48px; }
  .quiz-option-btn { min-height: 52px; }
  .filter-btn { min-height: 40px; }

  /* Disable parallax (performance) */
  .hero-orb { animation: none !important; }
}


/* ============================================================
   LANDSCAPE MOBILE (short + wide)
   ============================================================ */
@media (max-width: 768px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 70px 18px 40px; }
  .hero h1 { font-size: clamp(28px, 6vw, 44px); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); padding: 28px 0; }
  .stat-card { padding: 16px 10px; }
}


/* ============================================================
   PRINT — remove decorative chrome
   ============================================================ */
@media print {
  #particles-canvas, .hamburger, .scroll-hint { display: none !important; }
  #navbar { position: static; box-shadow: none; }
  .hero-orb, .hero-grid-overlay, .cta-orb { display: none; }
}
