:root {
  --bg: #06080f;
  --bg-2: #0d1018;
  --panel: rgba(15, 18, 29, 0.82);
  --panel-2: rgba(21, 25, 38, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f7fb;
  --text-soft: #b7bfd4;
  --text-dim: #7f879b;
  --acid: #c8ff5a;
  --cyan: #7de8ff;
  --orange: #ff8e4d;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 540px at 0% 0%, rgba(255, 142, 77, 0.18), transparent 58%),
    radial-gradient(720px 460px at 100% 8%, rgba(125, 232, 255, 0.14), transparent 54%),
    linear-gradient(180deg, #05070d 0%, #0a0d15 100%);
  overflow-x: hidden;
}

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

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

code {
  padding: 0 0.3em;
  border-radius: 0.5em;
  background: rgba(255, 255, 255, 0.06);
}

.hidden {
  display: none !important;
}

.app-bg,
.app-grid,
.app-orb {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.app-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.84), transparent 100%);
}

.app-orb {
  filter: blur(56px);
  opacity: 0.6;
}

.orb-a {
  inset: -12% auto auto -10%;
  width: 360px;
  height: 360px;
  background: rgba(255, 142, 77, 0.24);
}

.orb-b {
  inset: auto -12% 20% auto;
  width: 420px;
  height: 420px;
  background: rgba(125, 232, 255, 0.14);
}

.orb-c {
  inset: auto auto -18% 30%;
  width: 320px;
  height: 320px;
  background: rgba(200, 255, 90, 0.1);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(18, 21, 31, 0.96), rgba(10, 12, 20, 0.92)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(18px);
}

.sidebar {
  position: sticky;
  top: 24px;
  height: calc(100svh - 48px);
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 800 13px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-mark {
  width: 42px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--acid), rgba(125, 232, 255, 0.48));
  box-shadow: 0 0 28px rgba(200, 255, 90, 0.22);
}

.sidebar-copy h1,
.hero h2,
.section-head h2 {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  letter-spacing: -0.04em;
}

.sidebar-copy h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 0.98;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--acid);
  font: 700 11px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.muted {
  color: var(--text-soft);
  line-height: 1.6;
}

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

.nav-link,
.button-link,
.ghost-link {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-link {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  text-align: left;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.02);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(200, 255, 90, 0.08);
  transform: translateX(2px);
}

.session-card {
  margin-top: auto;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 10px;
}

.session-label,
.meta-label,
.tool-head span {
  color: var(--text-dim);
  font: 700 11px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

.ghost-link {
  color: var(--cyan);
  font-weight: 700;
}

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

.hero {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 20px;
}

.hero-subtitle {
  max-width: 58ch;
  color: #d9deec;
  line-height: 1.68;
}

.hero h2 {
  font-size: clamp(36px, 4.6vw, 62px);
  line-height: 0.96;
}

.hero-chips,
.hero-actions,
.inline-fields,
.triple-fields,
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-chips span {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f7faff;
  font-size: 13px;
}

.primary-button,
.secondary-button {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.primary-button {
  border: 1px solid rgba(200, 255, 90, 0.22);
  background: linear-gradient(135deg, var(--acid), #f5ffb8);
  color: #101309;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.block-button {
  min-width: 160px;
}

.hero-preview {
  min-height: 320px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 142, 77, 0.18), transparent 36%),
    linear-gradient(160deg, rgba(17, 20, 31, 0.95), rgba(9, 11, 18, 0.92));
}

.preview-stack {
  display: grid;
  gap: 12px;
  height: 100%;
}

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

.preview-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 8px;
}

.preview-card span {
  color: var(--text-dim);
  font-size: 12px;
}

.preview-card strong {
  font-size: 20px;
}

.preview-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.preview-card-main {
  min-height: 170px;
  align-content: end;
}

.preview-card-wide {
  background: linear-gradient(135deg, rgba(125, 232, 255, 0.08), rgba(200, 255, 90, 0.08));
}

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.workspace > .panel {
  padding: 26px;
}

.tool-grid,
.profile-grid,
.settings-grid,
.config-grid {
  display: grid;
  gap: 16px;
}

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

.tool-card,
.profile-card,
.config-editor,
.config-list-wrap {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 14px;
}

.tool-card-accent {
  background: linear-gradient(135deg, rgba(255, 142, 77, 0.08), rgba(125, 232, 255, 0.06));
}

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

.tool-head h3,
.list-head strong {
  margin: 0;
  font-size: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 17, 0.85);
  color: var(--text);
  outline: none;
}

.field textarea {
  min-height: 184px;
  padding: 14px 16px;
  resize: vertical;
}

.announce-strip {
  min-height: 100%;
  border-radius: 20px;
  padding: 16px;
  background: rgba(9, 11, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
}

.announce-strip strong,
.meta-pairs strong {
  display: block;
}

.announce-strip span {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  line-height: 1.5;
}

.result-browser {
  min-height: 220px;
  max-height: 920px;
  overflow: auto;
  border-radius: 22px;
  background: rgba(7, 9, 15, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px;
}

.result-browser > *:first-child {
  margin-top: 0;
}

.result-image-wrap {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 9, 15, 0.96);
}

.result-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.result-caption {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

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

.meta-pairs span {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 6px;
}

.config-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

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

.config-list {
  display: grid;
  gap: 12px;
}

.config-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 10px;
}

.config-item-head,
.config-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.config-item-actions button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.config-empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.login-panel {
  background: linear-gradient(135deg, rgba(255, 142, 77, 0.08), rgba(200, 255, 90, 0.08));
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  .hero,
  .config-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 12px;
  }

  .workspace > .panel,
  .sidebar {
    padding: 20px;
  }

  .tool-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .preview-row,
  .meta-pairs {
    grid-template-columns: 1fr;
  }

  .announce-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .hero h2 {
    font-size: clamp(30px, 10vw, 48px);
  }
}
