:root {
  color-scheme: dark;
  --bg: #08090d;
  --panel: rgba(28, 29, 35, 0.82);
  --panel-strong: rgba(36, 36, 45, 0.94);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f5ff;
  --muted: #a8a9b8;
  --soft: #6f7085;
  --cyan: #6be4ff;
  --violet: #ac80ff;
  --pink: #ff7bd9;
  --gold: #ffd36e;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(82, 102, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 76% 28%, rgba(255, 96, 208, 0.12), transparent 24rem),
    linear-gradient(135deg, #08090d 0%, #111219 46%, #08090d 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: progress;
  opacity: 0.72;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 116px;
  height: 100vh;
  padding: 28px 16px;
}

.brand {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background:
    conic-gradient(from 45deg, #69efff, #746cff, #de7cff, #69efff),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), transparent);
  box-shadow: 0 0 26px rgba(123, 125, 255, 0.44);
  mask:
    radial-gradient(circle at center, transparent 28%, black 29% 52%, transparent 53%),
    linear-gradient(#000 0 0);
  mask-composite: intersect;
}

.nav-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 88px;
  padding: 18px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(23, 24, 30, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.34);
}

.nav-item {
  display: grid;
  width: 66px;
  min-height: 76px;
  place-items: center;
  gap: 5px;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--muted);
  transition: 180ms ease;
}

.nav-item:hover,
.nav-item.active,
.feature-card:hover {
  color: #d8d3ff;
  background: rgba(104, 102, 140, 0.4);
  box-shadow: inset 0 0 0 1px rgba(174, 146, 255, 0.18);
}

.nav-icon {
  font-size: 24px;
  line-height: 1;
}

.workspace {
  width: min(1180px, calc(100vw - 116px));
  margin: 0 auto;
  padding: 40px 32px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.ghost-button,
.login-button,
.primary-button {
  border: 0;
  color: white;
  font-weight: 700;
}

.ghost-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.login-button {
  min-height: 46px;
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(100deg, #5ad8ff, #9b76ff 48%, #f26dff);
  box-shadow: 0 14px 32px rgba(139, 106, 255, 0.32);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  position: relative;
  min-height: 260px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 24px 58px rgba(0, 0, 0, 0.34);
  color: var(--text);
  text-align: left;
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
}

.feature-card::after {
  position: absolute;
  inset: auto -24% -34% auto;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent), transparent 72%);
  content: "";
  filter: blur(6px);
}

.accent-blue {
  --accent: var(--cyan);
}

.accent-violet {
  --accent: var(--violet);
}

.accent-pink {
  --accent: var(--pink);
}

.accent-gold {
  --accent: var(--gold);
}

.feature-icon {
  display: grid;
  width: 74px;
  height: 74px;
  margin-bottom: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(91, 83, 130, 0.55);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.22);
}

.feature-icon::before {
  color: color-mix(in srgb, var(--accent), white 28%);
  font-size: 35px;
  line-height: 1;
}

.folder::before {
  content: "▱";
}

.book::before {
  content: "◫";
}

.panels::before {
  content: "▣";
}

.wand::before {
  content: "✦";
}

.feature-card h2 {
  margin-bottom: 16px;
  font-size: 25px;
}

.feature-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.creator-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  margin-top: 18px;
}

.script-box,
.output-box {
  min-height: 420px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel-strong);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  color: white;
  font-size: 18px;
  font-weight: 800;
}

.section-title small {
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
}

label {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
  color: #d8d9e6;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  outline: 0;
  background: rgba(8, 9, 13, 0.68);
  color: white;
}

input,
select {
  height: 48px;
  padding: 0 16px;
}

textarea {
  resize: vertical;
  padding: 15px 16px;
  line-height: 1.7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(107, 228, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(107, 228, 255, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 14px;
}

.primary-button {
  width: 100%;
  min-height: 54px;
  border-radius: 18px;
  background: linear-gradient(100deg, #5ad8ff, #9674ff 48%, #ff73db);
  box-shadow: 0 18px 40px rgba(111, 113, 255, 0.28);
}

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

.output-stack article {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.output-stack h3 {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 17px;
}

.output-stack p {
  color: var(--muted);
  line-height: 1.75;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(12px);
}

.modal-backdrop[hidden] {
  display: none;
}

.login-modal {
  position: relative;
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(28, 29, 38, 0.98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

.login-modal h2 {
  margin-bottom: 24px;
  font-size: 28px;
}

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 24px;
  line-height: 1;
}

.modal-note {
  margin-top: 16px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 10;
    inset: auto 14px 14px;
    width: auto;
    height: 76px;
    padding: 0;
  }

  .brand {
    display: none;
  }

  .nav-list {
    flex-direction: row;
    width: min(560px, calc(100vw - 28px));
    height: 76px;
    padding: 8px;
    border-radius: 28px;
  }

  .nav-item {
    width: 100%;
    min-height: 58px;
    border-radius: 20px;
    font-size: 12px;
  }

  .workspace {
    width: 100%;
    padding: 30px 18px 112px;
  }

  .topbar,
  .creator-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

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

@media (max-width: 620px) {
  .hero-grid,
  .creator-panel {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 220px;
    padding: 28px;
  }

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

  .ghost-button {
    display: none;
  }
}
