:root {
  color-scheme: dark;
  --bg: #070b18;
  --bg-2: #0d1327;
  --panel: rgba(255, 255, 255, 0.09);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --surface: rgba(10, 16, 34, 0.78);
  --surface-solid: #10172c;
  --line: rgba(255, 255, 255, 0.14);
  --text: #f7fbff;
  --muted: #a9b7cf;
  --subtle: #72809a;
  --primary: #38bdf8;
  --secondary: #8b5cf6;
  --accent: #22c55e;
  --warning: #f59e0b;
  --danger: #fb7185;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 16px 34px rgba(8, 13, 30, 0.22);
  --radius: 8px;
  --radius-sm: 6px;
  --blur: blur(22px);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f9ff;
  --bg-2: #edf3ff;
  --panel: rgba(255, 255, 255, 0.68);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --line: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.12), transparent 28%),
    linear-gradient(315deg, rgba(139, 92, 246, 0.16), transparent 32%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

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

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 86%);
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
  color: var(--muted);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6 55%, #22c55e);
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 24, 0.72);
  backdrop-filter: var(--blur);
}

body[data-theme="light"] .site-nav {
  background: rgba(246, 249, 255, 0.78);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.ghost-btn,
.icon-btn,
.tab-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 13px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
  white-space: nowrap;
}

.nav-links a:hover,
.ghost-btn:hover,
.icon-btn:hover,
.tab-btn:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.1);
}

.primary-btn,
.gradient-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius);
  color: white;
  font-weight: 850;
  padding: 12px 18px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary) 58%, var(--accent));
  box-shadow: 0 16px 34px rgba(56, 189, 248, 0.26);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
  white-space: nowrap;
}

.primary-btn:hover,
.gradient-btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 18px 42px rgba(139, 92, 246, 0.32);
}

.danger-btn {
  background: linear-gradient(135deg, #fb7185, #f97316);
}

.icon-btn {
  width: 42px;
  padding: 0;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 18px;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding: 42px clamp(18px, 5vw, 64px) 30px;
  position: relative;
}

.hero-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.94;
  margin: 0 0 22px;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(135deg, #38bdf8, #a78bfa 45%, #22c55e 85%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
}

.proof-item {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--blur);
  padding: 14px;
  border-radius: var(--radius);
}

.proof-item strong {
  display: block;
  font-size: 22px;
}

.proof-item span {
  color: var(--muted);
  font-size: 13px;
}

.hero-stage {
  position: relative;
  min-height: 540px;
}

.product-visual {
  position: absolute;
  inset: 18px 0 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.18), transparent 34%),
    linear-gradient(315deg, rgba(34, 197, 94, 0.16), transparent 36%),
    rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.55;
}

.visual-topbar {
  position: relative;
  z-index: 1;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--danger);
}

.dot:nth-child(2) {
  background: var(--warning);
}

.dot:nth-child(3) {
  background: var(--accent);
}

.visual-board {
  position: relative;
  z-index: 1;
  padding: 18px;
  display: grid;
  grid-template-columns: 0.76fr 1.24fr;
  gap: 14px;
}

.visual-rail,
.visual-main,
.visual-side {
  border: 1px solid var(--line);
  background: rgba(7, 11, 24, 0.46);
  border-radius: var(--radius);
  padding: 14px;
}

body[data-theme="light"] .visual-rail,
body[data-theme="light"] .visual-main,
body[data-theme="light"] .visual-side {
  background: rgba(255, 255, 255, 0.62);
}

.visual-rail {
  display: grid;
  gap: 10px;
}

.rail-pill {
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--muted);
}

.rail-pill.active {
  color: white;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.65), rgba(139, 92, 246, 0.55));
}

.visual-main {
  min-height: 418px;
}

.visual-main h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.visual-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  min-height: 122px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 14px;
  animation: floatUp 5s ease-in-out infinite;
}

.mini-card:nth-child(2) {
  animation-delay: 900ms;
}

.mini-card:nth-child(3) {
  animation-delay: 1600ms;
}

.mini-card:nth-child(4) {
  animation-delay: 2300ms;
}

.mini-card strong {
  display: block;
  font-size: 24px;
  margin-top: 18px;
}

.mini-card span,
.mini-card p {
  color: var(--muted);
  font-size: 13px;
}

.progress-line {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 14px;
}

.progress-line i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.hero-next {
  width: min(1180px, 100%);
  margin: 20px auto 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section {
  padding: 70px clamp(18px, 5vw, 64px);
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--primary);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.section h2,
.panel h2,
.view-title h1 {
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.08;
  margin: 7px 0 0;
  letter-spacing: 0;
}

.section-head p,
.view-title p,
.muted {
  color: var(--muted);
}

.feature-grid,
.course-grid,
.stat-grid,
.dashboard-grid,
.teacher-grid,
.classroom-grid {
  display: grid;
  gap: 14px;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.course-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

.teacher-grid {
  grid-template-columns: 0.95fr 1.05fr;
  align-items: start;
}

.panel,
.feature-card,
.course-card,
.stat-card,
.certificate-card,
.assignment-row,
.notification-row,
.leader-row,
.chat-bubble,
.lesson-item,
.test-item,
.profile-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--blur);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.panel {
  padding: 18px;
}

.feature-card,
.course-card,
.stat-card {
  padding: 18px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.feature-card:hover,
.course-card:hover,
.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.45);
  background: var(--panel-strong);
}

.feature-card .badge,
.course-card .badge {
  margin-bottom: 18px;
}

.feature-card h3,
.course-card h3,
.panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature-card p,
.course-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.course-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  cursor: pointer;
}

.course-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background: linear-gradient(135deg, var(--from), var(--to));
}

.course-card > * {
  position: relative;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.hot {
  color: white;
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.34), rgba(139, 92, 246, 0.24));
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(7, 11, 24, 0.68);
  backdrop-filter: var(--blur);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.72);
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.side-nav button:hover,
.side-nav button.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.side-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.main {
  min-width: 0;
  padding: 18px clamp(16px, 3vw, 34px) 42px;
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.view-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.18), transparent 42%),
    linear-gradient(315deg, rgba(34, 197, 94, 0.14), transparent 34%),
    var(--panel);
  box-shadow: var(--soft-shadow);
  backdrop-filter: var(--blur);
}

.hero-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 38px);
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.stat-card .trend {
  color: var(--accent);
  font-weight: 900;
  margin-top: 12px;
}

.stack {
  display: grid;
  gap: 14px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wrap {
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-weight: 760;
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  padding: 11px 12px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

textarea {
  resize: vertical;
  min-height: 98px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(56, 189, 248, 0.66);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.13);
}

option {
  color: #0f172a;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  gap: 4px;
}

.segmented button {
  min-height: 40px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.segmented button.active {
  color: white;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.7), rgba(139, 92, 246, 0.68));
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
}

.auth-art {
  min-height: 620px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.2), transparent 42%),
    linear-gradient(315deg, rgba(139, 92, 246, 0.22), transparent 40%),
    rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-art h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  margin: 28px 0 16px;
}

.auth-art p {
  color: var(--muted);
  line-height: 1.7;
}

.auth-form {
  padding: 28px;
  background: rgba(255, 255, 255, 0.03);
}

.avatar-uploader {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.avatar-preview {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 900;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assignment-row,
.notification-row,
.leader-row,
.lesson-item,
.test-item {
  padding: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.assignment-row + .assignment-row,
.notification-row + .notification-row,
.leader-row + .leader-row,
.lesson-item + .lesson-item,
.test-item + .test-item {
  margin-top: 9px;
}

.chart-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 180px;
  padding-top: 16px;
}

.bar {
  flex: 1;
  min-width: 26px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  position: relative;
}

.bar span {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.progress-ring {
  width: 138px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(var(--accent) calc(var(--value) * 1%), rgba(255, 255, 255, 0.12) 0);
  position: relative;
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  background: var(--surface-solid);
}

.progress-ring strong {
  position: relative;
  font-size: 30px;
}

.leader-row {
  justify-content: flex-start;
}

.leader-row .rank {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  font-weight: 900;
}

.chat-window {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.chat-bubble {
  padding: 12px;
  box-shadow: none;
}

.chat-bubble strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.chat-bubble p {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.classroom-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: var(--blur);
  margin-bottom: 14px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-btn.active {
  color: white;
  border-color: rgba(56, 189, 248, 0.6);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.38), rgba(139, 92, 246, 0.26));
}

.live-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
}

.video-grid {
  min-height: 520px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.video-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.22), transparent 48%),
    linear-gradient(315deg, rgba(34, 197, 94, 0.18), transparent 44%),
    rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
}

.video-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.45;
}

.video-person {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 42px rgba(56, 189, 248, 0.22);
}

.video-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: white;
  padding: 7px 10px;
  font-weight: 800;
  font-size: 12px;
}

.meeting-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: var(--blur);
}

.control-btn {
  min-width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 180ms ease, background 180ms ease;
}

.control-btn:hover {
  transform: translateY(-2px);
}

.control-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.certificate {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 34px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.14), transparent 40%),
    linear-gradient(315deg, rgba(34, 197, 94, 0.12), transparent 42%),
    var(--surface-solid);
  box-shadow: var(--shadow);
}

.certificate::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  pointer-events: none;
}

.certificate h2 {
  margin: 18px 0 8px;
  font-size: clamp(30px, 4vw, 54px);
}

.certificate .cert-name {
  font-size: clamp(28px, 5vw, 58px);
  color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
  font-weight: 950;
  margin: 20px 0 10px;
}

.cert-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
}

.signature {
  min-width: 220px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
}

.qr {
  width: 104px;
  height: 104px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: 8px;
  background: white;
  border-radius: var(--radius-sm);
}

.qr i {
  background: #0f172a;
  border-radius: 2px;
}

.assistant-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 24;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.assistant-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 25;
  width: min(380px, calc(100vw - 28px));
  max-height: 620px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  padding: 14px;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translate(-50%, 140%);
  max-width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.mobile-menu {
  display: none;
}

@keyframes floatUp {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 1120px) {
  .hero-grid,
  .auth-card,
  .dashboard-grid,
  .teacher-grid,
  .live-stage {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 520px;
  }

  .feature-grid,
  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-nav .nav-links {
    display: none;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .hero {
    min-height: auto;
  }

  .hero-proof,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    width: min(320px, calc(100vw - 34px));
    transform: translateX(-104%);
    transition: transform 220ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    background: rgba(7, 11, 24, 0.72);
    backdrop-filter: var(--blur);
    margin: -18px -16px 18px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }

  body[data-theme="light"] .topbar {
    background: rgba(246, 249, 255, 0.78);
  }
}

@media (max-width: 640px) {
  .hero,
  .section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1 {
    font-size: clamp(38px, 14vw, 58px);
  }

  .hero-stage {
    min-height: 480px;
  }

  .visual-board,
  .visual-cards,
  .feature-grid,
  .course-grid,
  .form-grid,
  .hero-panel,
  .video-grid,
  .hero-proof,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .visual-rail {
    display: none;
  }

  .product-visual {
    position: relative;
    inset: auto;
  }

  .auth-shell {
    padding: 12px;
  }

  .auth-art {
    min-height: 380px;
  }

  .auth-form,
  .auth-art,
  .panel {
    padding: 16px;
  }

  .view-title,
  .section-head,
  .classroom-header,
  .cert-footer {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .ghost-btn {
    display: none;
  }

  .assignment-row,
  .notification-row,
  .lesson-item,
  .test-item,
  .row {
    align-items: flex-start;
    flex-direction: column;
  }

  .certificate {
    padding: 22px;
  }
}
