/* ============================================================
   The Untold Secret — Course Site
   Dark trading-terminal design system
   ============================================================ */

:root {
  --bg: #07090e;
  --bg-soft: #0b0f16;
  --panel: #0f1520;
  --panel-2: #131b29;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.24);
  --text: #e8eef8;
  --text-dim: #93a1b8;
  --text-faint: #5b6b82;
  --accent: #34d399;
  --accent-2: #22d3ee;
  --grad: linear-gradient(135deg, #34d399, #22d3ee);
  --danger: #fb7185;
  --warn: #fbbf24;
  --info: #60a5fa;
  --violet: #a78bfa;
  --radius: 14px;
  --radius-sm: 9px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(52, 211, 153, 0.25), 0 8px 40px rgba(52, 211, 153, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(52, 211, 153, 0.32); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: #263247 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #263247; border-radius: 8px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
/* WICHTIG: das HTML-hidden-Attribut muss display:none erzwingen. Ohne diese Regel
   überschreiben display:inline-flex / flex / block-Regeln (z. B. .btn) das
   hidden-Attribut und ausgeblendete Elemente bleiben sichtbar. */
[hidden] { display: none !important; }
code { font-family: var(--mono); background: rgba(148, 163, 184, 0.1); padding: 1px 6px; border-radius: 5px; font-size: 0.9em; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ============ ORBS / BACKGROUND ============ */
.bg-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-scene .orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .4; animation: drift 18s ease-in-out infinite alternate; }
.bg-scene .orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(52,211,153,.3), transparent 65%); top: -180px; left: -120px; }
.bg-scene .orb-2 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(34,211,238,.24), transparent 65%); bottom: -160px; right: -100px; animation-delay: -6s; }
.bg-scene .orb-3 { width: 340px; height: 340px; background: radial-gradient(circle, rgba(96,165,250,.16), transparent 65%); top: 30%; left: 55%; animation-delay: -11s; }
.bg-grid { position: absolute; inset: 0; background-image:
  linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px),
  linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 78%);
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, -30px) scale(1.12); }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes spin { to { transform: rotate(360deg); } }

.anim-rise { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.anim-fade { animation: fadeIn .4s ease both; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 14.5px; font-weight: 600;
  padding: 11px 20px;
  border-radius: 11px;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); background: rgba(52, 211, 153, 0.08); transform: translateY(-1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary {
  background: var(--grad); color: #04130e; border: none;
  box-shadow: 0 6px 22px rgba(52, 211, 153, 0.28);
}
.btn-primary:hover { background: linear-gradient(135deg, #2fd9a0, #1fc4e0); box-shadow: 0 8px 28px rgba(52, 211, 153, 0.4); color: #04130e; }
.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { border-color: rgba(251, 113, 133, 0.35); color: var(--danger); background: rgba(251, 113, 133, 0.06); }
.btn-danger:hover { background: rgba(251, 113, 133, 0.14); border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ============ FORMS ============ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; letter-spacing: .02em; }
.input, .textarea, .select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.13);
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2393a1b8' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; line-height: 1.5; }
.error-text { color: var(--danger); font-size: 13px; margin-top: 8px; line-height: 1.5; white-space: pre-line; }
.success-text { color: var(--accent); font-size: 13px; margin-top: 8px; }

/* ============ TOASTS ============ */
#toasts { position: fixed; bottom: 24px; right: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: rise .3s ease both;
  max-width: 380px;
}
.toast.err { border-color: rgba(251, 113, 133, 0.4); }
.toast.err .t-ico { color: var(--danger); }
.toast.ok .t-ico { color: var(--accent); }
.toast .t-ico { font-size: 16px; }

/* ============ LANDING ============ */
#view-landing { min-height: 100vh; display: flex; flex-direction: column; }
.land-nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 28px;
  background: rgba(7, 9, 14, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.land-nav .brand { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.brand .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.land-nav .spacer { flex: 1; }
.land-nav .nav-link { color: var(--text-dim); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 9px; transition: all .15s; }
.land-nav .nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); text-decoration: none; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 90px 28px 100px;
}
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 7px 14px; border-radius: 999px;
  margin-bottom: 24px;
}
.hero .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(52, 211, 153, 0.55); }
.hero h1 {
  font-size: clamp(40px, 6vw, 66px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  background: linear-gradient(180deg, #fff 25%, #b6c4da 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}
.hero h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .tagline { font-size: 17.5px; line-height: 1.65; color: var(--text-dim); max-width: 560px; margin: 0 auto 30px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: center; }
.hero .cta-note { font-size: 12.5px; color: var(--text-faint); margin-top: 14px; }

/* stats strip */
.stat-strip {
  max-width: 1180px; width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  padding: 0 28px 70px;
}
.stat-strip .st {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: border-color .2s, transform .2s;
}
.stat-strip .st:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.stat-strip .st .v { font-size: 30px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-family: var(--mono); }
.stat-strip .st .k { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; }

/* section shells */
.sec { max-width: 1180px; width: 100%; margin: 0 auto; padding: 0 28px 80px; }
.sec-head { text-align: center; margin-bottom: 44px; }
.sec-head .kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-family: var(--mono); margin-bottom: 12px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.sec-head p { color: var(--text-dim); font-size: 15.5px; max-width: 620px; margin: 0 auto; line-height: 1.6; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.feature-card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card .ic { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 22px; border-radius: 13px; background: linear-gradient(180deg, rgba(52, 211, 153, 0.14), rgba(34, 211, 238, 0.08)); border: 1px solid rgba(52, 211, 153, 0.25); margin-bottom: 16px; }
.feature-card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }

/* curriculum preview on landing */
.curriculum-list { display: flex; flex-direction: column; gap: 12px; }
.cur-row {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color .2s, transform .2s;
  cursor: default;
}
.cur-row:hover { border-color: var(--border-strong); transform: translateX(4px); }
.cur-row .num { font-family: var(--mono); font-size: 13px; color: var(--accent-2); min-width: 30px; font-weight: 700; }
.cur-row .ic { font-size: 22px; }
.cur-row .t { flex: 1; font-size: 15.5px; font-weight: 700; }
.cur-row .s { font-size: 13px; color: var(--text-dim); }
.cur-row .lessons { font-family: var(--mono); font-size: 12px; color: var(--text-faint); white-space: nowrap; }

/* pricing */
.pricing-wrap { display: flex; justify-content: center; }
.pricing-card {
  width: 100%; max-width: 460px;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 22px;
  padding: 36px 34px;
  text-align: center;
  box-shadow: var(--glow);
  position: relative;
  overflow: hidden;
}
.pricing-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); }
.pricing-card .pc-tag { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-family: var(--mono); margin-bottom: 14px; }
.pricing-card .pc-price { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.pricing-card .pc-note { font-size: 13px; color: var(--text-faint); margin-bottom: 22px; }
.pricing-card ul { list-style: none; text-align: left; margin-bottom: 26px; display: flex; flex-direction: column; gap: 12px; }
.pricing-card li { display: flex; gap: 10px; font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.pricing-card li .ck { color: var(--accent); font-weight: 700; }
.pricing-card .pc-foot { font-size: 12.5px; color: var(--text-faint); margin-top: 16px; line-height: 1.6; }

/* footer */
.land-foot {
  border-top: 1px solid var(--border);
  padding: 24px 28px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--text-faint); font-size: 13px;
  flex-wrap: wrap;
}
.foot-admin {
  background: transparent; border: 1px solid var(--border); color: var(--text-faint);
  font-size: 11.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  transition: all .15s;
}
.foot-mail {
  color: var(--accent); text-decoration: none; font-size: 12.5px;
  padding: 5px 12px; border: 1px solid rgba(52,211,153,.3); border-radius: 999px;
  background: rgba(52,211,153,.06); transition: all .15s;
}
.foot-mail:hover { background: rgba(52,211,153,.14); border-color: rgba(52,211,153,.6); }
.foot-admin:hover { color: var(--accent); border-color: rgba(52,211,153,.4); }

/* guest course header pill + sidebar admin link */
.free-pill {
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em;
  color: var(--accent); border: 1px solid rgba(52,211,153,.35);
  background: rgba(52,211,153,.08); padding: 5px 12px; border-radius: 999px;
  white-space: nowrap;
}
.side-foot { margin: 18px 8px 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.admin-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-faint); text-decoration: none; padding: 6px 8px; border-radius: 8px;
  transition: all .15s;
}
.admin-link:hover { color: var(--accent); background: rgba(52,211,153,.07); }

/* ============ AUTH SCREENS ============ */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
  width: 100%; max-width: 430px;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 38px 34px;
  box-shadow: var(--shadow);
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.auth-card .a-logo { font-size: 34px; text-align: center; margin-bottom: 10px; }
.auth-card h2 { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-card .a-sub { text-align: center; font-size: 13.5px; color: var(--text-dim); margin-bottom: 26px; line-height: 1.55; }
.auth-card .a-back { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-faint); }
.auth-card .a-back:hover { color: var(--text); text-decoration: none; }

/* ============ APP SHELL (student + admin) ============ */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell-top {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 22px;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.shell-top .brand { font-size: 17px; font-weight: 800; white-space: nowrap; }
.shell-top .crumb { font-size: 13.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell-top .spacer { flex: 1; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.user-chip .av { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #04130e; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.user-chip .u-name { font-size: 13px; font-weight: 600; }
.user-chip .u-role { font-size: 10.5px; color: var(--text-faint); font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }

.shell-body { display: grid; grid-template-columns: 280px 1fr; flex: 1; min-height: 0; }
.sidebar {
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 40%);
}
.side-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); margin: 20px 8px 10px; }
.side-label:first-child { margin-top: 0; }
.side-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; border: none; color: var(--text-dim);
  font-size: 13.5px; padding: 9px 12px;
  border-radius: 10px;
  transition: all .15s;
  margin-bottom: 2px;
}
.side-item:hover { background: rgba(52, 211, 153, 0.08); color: var(--text); }
.side-item.active { background: rgba(52, 211, 153, 0.12); color: var(--text); border: 1px solid rgba(52, 211, 153, 0.22); }
.side-item .ic { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.side-item .check { margin-left: auto; color: var(--accent); font-size: 13px; }
.side-item .badge-c { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

.side-progress { margin: 18px 8px 6px; }
.sp-ring-wrap { display: flex; align-items: center; gap: 14px; }
.sp-ring { position: relative; width: 54px; height: 54px; flex-shrink: 0; }
.sp-ring svg { transform: rotate(-90deg); }
.sp-ring .bg { stroke: rgba(148, 163, 184, 0.15); }
.sp-ring .fg { stroke: url(#gradStroke); stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.sp-ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.sp-meta .t { font-size: 12px; font-weight: 700; }
.sp-meta .s { font-size: 11.5px; color: var(--text-faint); }

/* main content */
.main { overflow-y: auto; padding: 26px 30px 60px; min-width: 0; }
.page-head { margin-bottom: 24px; }
.page-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.page-head .sub { font-size: 14px; color: var(--text-dim); margin-top: 6px; line-height: 1.55; }

/* cards / grids */
.card { background: linear-gradient(180deg, var(--panel), var(--bg-soft)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card { position: relative; overflow: hidden; transition: transform .2s, border-color .2s; }
.stat-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.stat-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); opacity: 0; transition: opacity .2s; }
.stat-card:hover::before { opacity: 1; }
.stat-card .k { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.stat-card .v { font-family: var(--mono); font-size: 30px; font-weight: 800; line-height: 1; }
.stat-card .v.pos { color: var(--accent); }
.stat-card .v.warn { color: var(--warn); }
.stat-card .x { font-size: 12px; color: var(--text-faint); margin-top: 8px; font-family: var(--mono); }

/* lesson list on landing of student app */
.lesson-list { display: flex; flex-direction: column; gap: 10px; }
.lesson-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color .2s, transform .2s, background .2s;
  color: var(--text);
}
.lesson-row:hover { border-color: var(--border-strong); transform: translateX(4px); background: rgba(52, 211, 153, 0.04); }
.lesson-row .idx { font-family: var(--mono); font-size: 12px; color: var(--text-faint); min-width: 34px; }
.lesson-row .t { flex: 1; font-size: 15px; font-weight: 600; }
.lesson-row .t .mod { display: block; font-size: 11.5px; color: var(--text-faint); font-weight: 500; margin-top: 2px; }
.lesson-row .dur { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }
.lesson-row .st { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; border: 1.5px solid var(--border-strong); color: transparent; flex-shrink: 0; }
.lesson-row .st.done { background: var(--grad); border-color: transparent; color: #04130e; }
.lesson-row .vid-badge { font-family: var(--mono); font-size: 10.5px; color: var(--accent-2); border: 1px solid rgba(34, 211, 238, 0.3); padding: 3px 8px; border-radius: 999px; background: rgba(34, 211, 238, 0.06); }

/* ============ VIDEO PLAYER ============ */
.player-shell { position: relative; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--border-strong); box-shadow: var(--shadow); margin-bottom: 24px; }
.player-shell video { width: 100%; display: block; max-height: 62vh; background: #000; }
.player-shell .watermark {
  position: absolute; top: 14px; right: 16px; z-index: 5;
  font-family: var(--mono); font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 11px;
  border-radius: 8px;
  pointer-events: none;
  user-select: none;
  backdrop-filter: blur(4px);
  letter-spacing: .04em;
}
.player-shell .lock-note {
  display: flex; align-items: center; gap: 8px;
  position: absolute; bottom: 14px; left: 16px; z-index: 5;
  font-size: 11.5px; color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.45);
  padding: 5px 11px; border-radius: 8px;
  pointer-events: none;
  font-family: var(--mono);
}
.player-shell video::-webkit-media-controls-download-button { display: none !important; }
.player-shell video::-webkit-media-controls-fullscreen-button { display: block; }
.video-empty {
  border: 1.5px dashed var(--border-strong);
  border-radius: 16px;
  padding: 44px 24px;
  text-align: center;
  color: var(--text-faint);
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.015);
}
.video-empty .ic { font-size: 34px; margin-bottom: 10px; }

/* ============ LESSON CONTENT (markdown) ============ */
.lesson-content { background: linear-gradient(180deg, var(--panel), var(--bg-soft)); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 34px; }
.lesson-content h3 { font-size: 21px; font-weight: 800; margin: 26px 0 12px; letter-spacing: -0.01em; }
.lesson-content h3:first-child { margin-top: 0; }
.lesson-content h4 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
.lesson-content p { font-size: 15px; line-height: 1.75; color: var(--text-dim); margin-bottom: 14px; }
.lesson-content strong { color: var(--text); }
.lesson-content em { color: var(--accent-2); }
.lesson-content ul, .lesson-content ol { margin: 0 0 16px 22px; font-size: 15px; line-height: 1.75; color: var(--text-dim); }
.lesson-content li { margin-bottom: 6px; }
.lesson-content li::marker { color: var(--accent); }
.lesson-content table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 16px 0 20px; }
.lesson-content th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); padding: 9px 12px; border-bottom: 1px solid var(--border-strong); }
.lesson-content td { padding: 9px 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.08); color: var(--text-dim); vertical-align: top; line-height: 1.55; }
.lesson-content tr:hover td { background: rgba(52, 211, 153, 0.03); color: var(--text); }
.lesson-content blockquote { border-left: 3px solid var(--accent); padding: 12px 18px; margin: 16px 0; background: rgba(52, 211, 153, 0.05); border-radius: 0 10px 10px 0; color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }
.lesson-content pre { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border); border-radius: 10px; padding: 16px; overflow-x: auto; margin: 16px 0; }
.lesson-content pre code { background: transparent; padding: 0; font-size: 13px; color: var(--accent-2); }
.lesson-content hr { border: none; border-top: 1px dashed var(--border-strong); margin: 24px 0; }

.lesson-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

.complete-btn { display: inline-flex; align-items: center; gap: 9px; }
.complete-btn .cb-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; transition: all .2s; }
.complete-btn.done { background: var(--grad); color: #04130e; border: none; }
.complete-btn.done .cb-box { border-color: rgba(4, 19, 14, 0.4); color: #04130e; }

/* ============ TABLES ============ */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); padding: 10px 12px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.07); color: var(--text-dim); vertical-align: middle; }
.data-table tr:hover td { background: rgba(52, 211, 153, 0.03); color: var(--text); }
.data-table .mono { font-family: var(--mono); font-size: 12.5px; }
.data-table td.strong { color: var(--text); font-weight: 600; }

.cat-badge { display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .04em; }
.cat-W { color: #34d399; background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.3); }
.cat-L { color: #fb7185; background: rgba(251, 113, 133, 0.1); border: 1px solid rgba(251, 113, 133, 0.3); }
.cat-M { color: #fbbf24; background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.3); }
.cat-S { color: #a78bfa; background: rgba(167, 139, 250, 0.1); border: 1px solid rgba(167, 139, 250, 0.3); }
.cat-R { color: #60a5fa; background: rgba(96, 165, 250, 0.1); border: 1px solid rgba(96, 165, 250, 0.3); }
.cat-SKIP { color: #94a3b8; background: rgba(148, 163, 184, 0.1); border: 1px solid rgba(148, 163, 184, 0.3); }

.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.status-dot .d { width: 8px; height: 8px; border-radius: 50%; }
.status-dot .d.on { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.status-dot .d.off { background: var(--danger); }

/* trade chart thumbnails */
.trade-thumb {
  float: right; width: 150px; max-height: 90px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--border-strong);
  margin: 0 0 6px 12px; cursor: zoom-in;
  background: rgba(0, 0, 0, 0.3);
  transition: border-color .2s, transform .2s;
}
.trade-thumb:hover { border-color: var(--accent-2); transform: scale(1.03); }

/* small inline thumbnail in the admin trades list */
.tmin {
  width: 72px; height: 42px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border-strong);
  vertical-align: middle; cursor: zoom-in; margin-left: 6px;
  background: rgba(0, 0, 0, 0.3);
  transition: border-color .2s, transform .2s;
}
.tmin:hover { border-color: var(--accent-2); transform: scale(1.08); }

/* fullscreen trade chart lightbox */
.lightbox-backdrop {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(3, 5, 9, 0.92);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 26px;
  cursor: zoom-out;
  animation: fadeIn .18s ease both;
}
.lightbox-img {
  max-width: 94vw; max-height: 88vh;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: rise .28s cubic-bezier(.2,.8,.2,1) both;
  cursor: default;
  user-select: none;
}

/* admin lessons rows */
.lesson-row .vc-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* filter chips */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  font-size: 12.5px; font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  padding: 7px 15px;
  border-radius: 999px;
  transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.35); color: var(--accent); }

/* ============ ADMIN ============ */
.tab-row { display: inline-flex; gap: 4px; background: var(--panel); border: 1px solid var(--border); padding: 4px; border-radius: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.tab-btn { border: none; background: transparent; color: var(--text-dim); font-size: 13.5px; font-weight: 600; padding: 9px 18px; border-radius: 9px; transition: all .2s; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--grad); color: #04130e; box-shadow: 0 4px 16px rgba(52, 211, 153, 0.28); }

.admin-grid { display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: start; }
.panel-card { background: linear-gradient(180deg, var(--panel), var(--bg-soft)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.panel-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.panel-card .pc-sub { font-size: 12.5px; color: var(--text-faint); margin-bottom: 18px; }

/* upload zone */
.upload-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.015);
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--accent); background: rgba(52, 211, 153, 0.05); }
.upload-zone .uz-ic { font-size: 32px; margin-bottom: 10px; }
.upload-zone .uz-t { font-size: 14.5px; font-weight: 600; }
.upload-zone .uz-s { font-size: 12px; color: var(--text-faint); margin-top: 5px; }

.progress-track { height: 8px; border-radius: 6px; background: rgba(148, 163, 184, 0.12); overflow: hidden; margin-top: 12px; }
.progress-fill { height: 100%; background: var(--grad); width: 0%; border-radius: 6px; transition: width .2s; }

/* video cards (admin) */
.video-list { display: flex; flex-direction: column; gap: 12px; }
.video-card { display: flex; gap: 16px; align-items: center; background: linear-gradient(180deg, var(--panel), var(--bg-soft)); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; transition: border-color .2s; }
.video-card:hover { border-color: var(--border-strong); }
.video-card .thumb { width: 96px; height: 56px; border-radius: 10px; background: linear-gradient(135deg, rgba(52, 211, 153, 0.18), rgba(34, 211, 238, 0.12)); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; border: 1px solid var(--border); }
.video-card .vc-body { flex: 1; min-width: 0; }
.video-card .vc-t { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-card .vc-m { font-size: 12px; color: var(--text-faint); font-family: var(--mono); margin-top: 4px; }
.video-card .vc-actions { display: flex; gap: 8px; flex-shrink: 0; }
.video-card .lesson-tag { font-size: 11px; color: var(--accent-2); border: 1px solid rgba(34, 211, 238, 0.25); background: rgba(34, 211, 238, 0.05); padding: 2px 9px; border-radius: 999px; margin-top: 6px; display: inline-block; font-family: var(--mono); }

/* users */
.user-list { display: flex; flex-direction: column; gap: 10px; }
.user-row { display: flex; align-items: center; gap: 14px; background: linear-gradient(180deg, var(--panel), var(--bg-soft)); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; transition: border-color .2s; }
.user-row:hover { border-color: var(--border-strong); }
.user-row .av { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #04130e; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.av-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.user-row .av { overflow: hidden; }
.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.avatar-big { width: 72px; height: 72px; border-radius: 50%; background: var(--grad); color: #04130e; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 26px; flex-shrink: 0; overflow: hidden; box-shadow: var(--glow); }
.avatar-big img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-row .u-body { flex: 1; min-width: 0; }
.user-row .u-name { font-size: 14.5px; font-weight: 700; }
.user-row .u-name .role { font-size: 10.5px; font-family: var(--mono); color: var(--violet); background: rgba(167, 139, 250, 0.1); border: 1px solid rgba(167, 139, 250, 0.25); padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.user-row .u-meta { font-size: 12px; color: var(--text-faint); margin-top: 4px; font-family: var(--mono); }
.user-row .u-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ============ EMPTY / LOADING ============ */
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-faint); border: 1px dashed var(--border-strong); border-radius: var(--radius); font-size: 14px; line-height: 1.7; }
.empty-state .ic { font-size: 34px; margin-bottom: 12px; }
.loading-wrap { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(52, 211, 153, 0.15); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* ============ MODAL ============ */
.modal-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(4, 6, 10, 0.7); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s ease both; }
.modal {
  width: 100%; max-width: 460px;
  background: linear-gradient(180deg, var(--panel-2), var(--bg-soft));
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  animation: rise .3s cubic-bezier(.2,.8,.2,1) both;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.modal .m-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; }
.modal .m-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.modal .m-close { float: right; background: none; border: none; color: var(--text-faint); font-size: 20px; line-height: 1; padding: 4px; }
.modal .m-close:hover { color: var(--text); }
.modal-editor { width: min(480px, 94vw); }
.crop-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 0 4px; }
.crop-viewport {
  width: 300px; height: 300px; max-width: 100%; max-height: 56vh;
  border-radius: 14px; overflow: hidden; position: relative; cursor: grab;
  background: rgba(0, 0, 0, 0.5); border: 1px solid var(--border-strong);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport img {
  position: absolute; left: 50%; top: 50%; max-width: none;
  transform-origin: center center; pointer-events: none; will-change: transform;
}
.crop-controls { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 4px; }
.crop-controls input[type=range] { flex: 1; accent-color: var(--accent); }
.crop-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
}

/* ============ MISC ============ */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex-1 { flex: 1; }
.muted { color: var(--text-faint); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.text-center { text-align: center; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero { gap: 40px; padding-top: 50px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .shell-body { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .admin-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .main { padding: 18px 16px 50px; }
  .land-nav { padding: 12px 16px; }
  .sec { padding: 0 16px 60px; }
  .hero { padding: 50px 16px 60px; }
  .lesson-content { padding: 22px 18px; }
  .user-row { flex-wrap: wrap; }
  .user-row .u-actions { width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
