:root {
  --premium-green: #39ff88;
  --premium-cyan: #35d9ff;
  --premium-pink: #ff2aa3;
  --premium-surface: rgba(7, 15, 29, 0.88);
}

body {
  background-color: #020712;
  background-image:
    linear-gradient(rgba(53, 217, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 42, 163, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 80% 5%, rgba(255, 42, 163, 0.14), transparent 26rem),
    radial-gradient(circle at 10% 35%, rgba(53, 217, 255, 0.1), transparent 30rem);
  background-size: 54px 54px, 54px 54px, auto, auto;
  animation: premiumGrid 30s linear infinite;
}

.topbar {
  border-bottom-color: rgba(53, 217, 255, 0.26);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.brand-logo {
  filter: saturate(1.16) contrast(1.1);
}

.brand span {
  text-shadow: 0 0 16px rgba(53, 217, 255, 0.18);
}

.hero::before {
  filter: saturate(1.28) contrast(1.12) brightness(1.08);
}

.hero-copy h1,
.page-hero h1 {
  text-shadow:
    0 2px 0 rgba(255,255,255,0.08),
    0 0 30px rgba(53, 217, 255, 0.13);
}

.hero-copy .lede,
.page-hero .lede {
  color: #e0edf7;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 26, 48, 0.94), rgba(3, 8, 18, 0.42)),
    linear-gradient(90deg, rgba(255, 42, 163, 0.08), transparent 55%);
}

.page-hero::after {
  content: "";
  position: absolute;
  left: -20%;
  bottom: 0;
  width: 40%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--premium-cyan), transparent);
  box-shadow: 0 0 18px var(--premium-cyan);
  animation: premiumSweep 5s linear infinite;
}

.section,
.page-hero .shell,
.auth-card,
.dashboard-layout > *,
.learning-layout > * {
  opacity: 0;
  transform: translateY(18px);
  animation: premiumReveal 700ms ease forwards;
}

.section:nth-of-type(2) { animation-delay: 90ms; }
.section:nth-of-type(3) { animation-delay: 160ms; }
.section:nth-of-type(4) { animation-delay: 230ms; }

.card,
.panel,
.terminal,
.stat,
.auth-card {
  border-color: rgba(53, 217, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(53, 217, 255, 0.035), rgba(255, 42, 163, 0.025)),
    var(--premium-surface);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(53, 217, 255, 0.055);
}

.card {
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(53, 217, 255, 0.5);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.36),
    0 0 34px rgba(53, 217, 255, 0.13),
    0 0 20px rgba(255, 42, 163, 0.08);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.035), transparent 65%);
  transform: translateX(-110%);
  transition: transform 600ms ease;
  pointer-events: none;
}

.card:hover::after { transform: translateX(110%); }

.btn {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(53, 217, 255, 0.65);
  box-shadow: 0 0 22px rgba(53, 217, 255, 0.16);
}

.btn.primary:hover {
  box-shadow:
    0 0 28px rgba(255, 42, 163, 0.3),
    0 0 18px rgba(53, 217, 255, 0.2);
}

.toolbar input,
.toolbar select,
.auth-card input,
.auth-card textarea,
.admin-form input,
.admin-form select,
.admin-form textarea {
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.toolbar input:focus,
.toolbar select:focus,
.auth-card input:focus,
.auth-card textarea:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--premium-cyan);
  background: rgba(3, 9, 20, 0.94);
  box-shadow: 0 0 0 3px rgba(53, 217, 255, 0.08), 0 0 22px rgba(53, 217, 255, 0.08);
}

.table tr { transition: background 180ms ease; }
.table tbody tr:hover { background: rgba(53, 217, 255, 0.045); }

.chip.green,
.terminal-line {
  color: var(--premium-green);
}

.workspace-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.workspace-nav {
  position: sticky;
  top: 92px;
  padding: 16px;
}

.workspace-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  margin-bottom: 7px;
  border-left: 2px solid transparent;
  color: var(--muted);
}

.workspace-nav a:hover,
.workspace-nav a.active {
  color: var(--text);
  border-left-color: var(--premium-green);
  background: rgba(57, 255, 136, 0.055);
}

.workspace-main { display: grid; gap: 20px; }

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 20px;
  align-items: start;
}

.editor-panel { padding: 22px; }

.editor-panel h2,
.editor-panel h3 { margin-bottom: 16px; }

.editor-form { display: grid; gap: 14px; }

.editor-form label {
  display: grid;
  gap: 7px;
  color: #bfd0df;
  font-size: 0.86rem;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.editor-form input,
.editor-form select,
.editor-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(3, 8, 18, 0.86);
  color: var(--text);
  padding: 12px 13px;
  border-radius: 6px;
  font: inherit;
}

.editor-form textarea { resize: vertical; }

.editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-window {
  padding: 18px;
  min-height: 260px;
  overflow: hidden;
}

.preview-window::before {
  content: "$ preview --live";
  display: block;
  color: var(--premium-green);
  font-family: "JetBrains Mono", Consolas, monospace;
  margin-bottom: 16px;
  animation: premiumType 2.6s steps(18) infinite alternate;
  white-space: nowrap;
  overflow: hidden;
  width: 18ch;
}

.management-list {
  display: grid;
  gap: 10px;
}

.management-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(53, 217, 255, 0.14);
  background: rgba(3, 9, 20, 0.65);
}

.status-live { color: var(--premium-green); }
.status-draft { color: var(--warning); }

.about-hero {
  padding: 92px 0 72px;
}

.about-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: clamp(34px, 7vw, 90px);
  align-items: center;
}

.about-hero h1 {
  max-width: 820px;
}

.about-signal {
  padding: 22px;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.about-signal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 17px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(53, 217, 255, 0.18);
  color: var(--premium-cyan);
  font-size: 0.76rem;
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--premium-green);
  box-shadow: 0 0 14px var(--premium-green);
  animation: dotPulse 1.8s ease-in-out infinite;
}

.signal-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  color: #a7b8c8;
  border-bottom: 1px solid rgba(53, 217, 255, 0.08);
  font-size: 0.82rem;
}

.signal-row strong {
  color: var(--premium-green);
  font-size: 0.74rem;
}

.signal-meter {
  height: 4px;
  margin: 24px 0 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
}

.signal-meter span {
  display: block;
  width: 84%;
  height: 100%;
  background: linear-gradient(90deg, var(--premium-green), var(--premium-cyan));
  box-shadow: 0 0 14px rgba(53, 217, 255, 0.5);
  animation: signalLoad 2.5s ease-in-out infinite alternate;
}

.about-signal code {
  color: var(--premium-pink);
  font-size: 0.78rem;
}

.about-band {
  background:
    linear-gradient(90deg, rgba(53, 217, 255, 0.035), transparent 45%, rgba(255, 42, 163, 0.04)),
    rgba(4, 11, 23, 0.62);
}

.about-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(53, 217, 255, 0.18);
}

.about-benefit {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid rgba(53, 217, 255, 0.12);
}

.about-benefit:nth-child(odd) {
  border-right: 1px solid rgba(53, 217, 255, 0.12);
}

.about-benefit:nth-child(even) {
  padding-left: 28px;
}

.benefit-index {
  color: var(--premium-pink);
  font: 700 0.76rem/1 "JetBrains Mono", Consolas, monospace;
}

.about-benefit h3 {
  font-size: 1.08rem;
}

.about-benefit p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.about-learning {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 90px);
  align-items: center;
}

.about-copy h2,
.about-mission h2,
.community-panel h2,
.about-final h2,
.section-head h2 {
  margin-top: 10px;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
}

.about-copy p,
.community-copy p,
.about-final p {
  color: var(--muted);
  line-height: 1.75;
}

.about-copy .btn {
  margin-top: 14px;
}

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

.topic-grid span {
  position: relative;
  padding: 14px 14px 14px 34px;
  border: 1px solid rgba(53, 217, 255, 0.15);
  background: rgba(6, 14, 28, 0.68);
  color: #c9d8e4;
  font-size: 0.9rem;
}

.topic-grid span::before {
  content: ">";
  position: absolute;
  left: 14px;
  color: var(--premium-green);
  font-family: "JetBrains Mono", Consolas, monospace;
}

.topic-grid span:hover {
  border-color: rgba(57, 255, 136, 0.42);
  color: #fff;
}

.about-mission {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(255, 42, 163, 0.1), transparent 36%),
    rgba(6, 14, 27, 0.78);
}

.about-mission::after {
  content: "";
  position: absolute;
  top: 0;
  right: 9%;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, var(--premium-cyan), transparent);
  opacity: 0.35;
}

.about-mission-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(40px, 8vw, 110px);
}

.about-mission-copy p {
  margin: 0 0 18px;
  color: #b7c8d6;
  font-size: 1.02rem;
  line-height: 1.8;
}

.community-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 50px;
  padding: clamp(26px, 5vw, 52px);
}

.community-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.community-list li {
  position: relative;
  padding: 12px 0 12px 24px;
  border-bottom: 1px solid rgba(53, 217, 255, 0.1);
  color: #c5d5e1;
}

.community-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--premium-green);
  text-shadow: 0 0 10px rgba(57, 255, 136, 0.5);
}

.about-final {
  padding: 90px 0;
  text-align: center;
  border-bottom: 1px solid rgba(53, 217, 255, 0.16);
  background:
    radial-gradient(circle at 50% 100%, rgba(53, 217, 255, 0.14), transparent 28rem),
    linear-gradient(180deg, rgba(4, 10, 21, 0.3), rgba(4, 10, 21, 0.9));
}

.about-final p {
  max-width: 660px;
  margin: 18px auto;
}

.about-final strong {
  color: var(--premium-pink);
  font-size: 1.05rem;
  text-shadow: 0 0 16px rgba(255, 42, 163, 0.3);
}

@keyframes signalLoad {
  from { width: 48%; }
  to { width: 94%; }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.65; }
  50% { transform: scale(1.18); opacity: 1; }
}

@keyframes premiumGrid {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 108px 54px, 54px 108px, 0 0, 0 0; }
}

@keyframes premiumSweep {
  from { transform: translateX(0); }
  to { transform: translateX(350%); }
}

@keyframes premiumReveal {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes premiumType {
  from { width: 3ch; }
  to { width: 18ch; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  .workspace-shell,
  .editor-grid,
  .about-hero-grid,
  .about-learning,
  .about-mission-grid {
    grid-template-columns: 1fr;
  }

  .about-signal {
    max-width: 620px;
  }

  .workspace-nav {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }

  .workspace-nav a {
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .workspace-nav a:hover,
  .workspace-nav a.active {
    border-left-color: transparent;
    border-bottom-color: var(--premium-green);
  }
}

@media (max-width: 600px) {
  .management-row { grid-template-columns: 1fr; }

  .about-benefits,
  .community-panel,
  .community-list,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .about-benefit,
  .about-benefit:nth-child(even) {
    padding: 22px 0;
    border-right: 0;
  }

  .about-hero {
    padding: 64px 0 48px;
  }

  .community-panel {
    gap: 30px;
  }
}
