:root {
  --bg: #0b1020;
  --panel: #11182d;
  --panel-2: #0f1528;
  --border: rgba(255, 255, 255, 0.08);
  --text: #edf2ff;
  --muted: #a6b2d9;
  --accent: #8be9fd;
  --accent-2: #9effa6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 233, 253, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(158, 255, 166, 0.10), transparent 28%),
    linear-gradient(180deg, #08101f 0%, #0a1020 100%);
}

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

button {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }

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

.sidebar, .main { min-width: 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #08101f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
}
.eyebrow {
  color: var(--accent);
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.6rem; margin-top: 2px; }
h2 { font-size: 1.2rem; }

.panel {
  background: linear-gradient(180deg, rgba(17, 24, 45, 0.96), rgba(15, 21, 40, 0.96));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.sidebar .panel + .panel { margin-top: 18px; }

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.panel-head span, .muted, .hero-sub, .workflow li {
  color: var(--muted);
}

.workflow {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.stats {
  display: grid;
  gap: 14px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.stat-row strong { font-size: 1.2rem; }
.stat-row small { color: var(--muted); }

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.field span {
  font-size: 0.9rem;
  color: var(--muted);
}
input, textarea, select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 8, 20, 0.55);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(139, 233, 253, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 233, 253, 0.12);
}
textarea { resize: vertical; }

.primary {
  width: 100%;
  padding: 13px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08101f;
  font-weight: 800;
}
.ghost {
  width: auto;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
}

.main {
  display: grid;
  gap: 20px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 260px;
  gap: 18px;
  align-items: stretch;
}
.hero-copy {
  display: grid;
  gap: 16px;
  align-content: center;
}
.hero h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.98;
}
.hero p { max-width: 60ch; color: var(--muted); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-card {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(139, 233, 253, 0.14), rgba(158, 255, 166, 0.10));
  border: 1px solid rgba(139, 233, 253, 0.18);
  padding: 20px;
  display: grid;
  align-content: space-between;
}
.hero-card-title, .hero-sub { color: var(--muted); }
.big-number {
  font-size: 4.3rem;
  font-weight: 900;
  line-height: 1;
  margin: 10px 0;
}

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

.board, .analysis, .voice-output, .remix-output {
  display: grid;
  gap: 12px;
}
.idea-card, .analysis-card, .voice-card, .remix-card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 16px;
}
.idea-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(139, 233, 253, 0.12);
  color: #c8f7ff;
  font-size: 0.8rem;
}
.idea-title {
  font-weight: 800;
  margin-bottom: 6px;
}
.idea-note, .analysis-card p, .voice-card p, .remix-card p {
  color: var(--muted);
  line-height: 1.55;
}
.idea-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.small-btn {
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
}
.small-btn.danger { color: #ffb0b0; }

.analysis-card h3, .voice-card h3, .remix-card h3 { margin-bottom: 8px; }
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pill {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.pill strong { display: block; margin-bottom: 4px; }

.split-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.split-buttons > * { flex: 1 1 180px; }

.secondary { margin-top: 10px; }

.board-head {
  align-items: flex-start;
  flex-direction: column;
}

.board-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.field.inline {
  flex: 1 1 220px;
  margin-bottom: 0;
}

.idea-tags {
  margin-top: 10px;
  font-size: 0.88rem;
  color: #c9d5ff;
}

.idea-url {
  margin-top: 8px;
  word-break: break-all;
}

.idea-url a {
  color: var(--accent);
  text-decoration: none;
}

.empty-state {
  min-height: 120px;
  display: grid;
  align-content: center;
  text-align: center;
}

.analysis-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.analysis-block strong {
  display: block;
  margin-bottom: 8px;
}

.analysis-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

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

.full { grid-column: 1 / -1; }

.draft-output,
.voice-output,
.remix-output {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.draft-card,
.voice-card,
.remix-card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 16px;
}

.draft-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.draft-meta {
  color: var(--muted);
  margin-bottom: 12px;
}

.draft-pre {
  white-space: pre-wrap;
  margin: 0;
  color: var(--text);
  line-height: 1.65;
  font-family: inherit;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.footer strong {
  display: inline;
}

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

  .hero,
  .grid.two-up,
  .voice-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .board-head {
    gap: 14px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 14px;
    gap: 14px;
  }

  .panel {
    border-radius: 20px;
    padding: 16px;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .big-number {
    font-size: 3.4rem;
  }
}
.pill span { color: var(--muted); font-size: 0.92rem; }

.voice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.full { grid-column: 1 / -1; }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .app-shell, .hero, .grid.two-up, .voice-grid {
    grid-template-columns: 1fr;
  }
  .sidebar { order: 2; }
  .main { order: 1; }
}

@media (max-width: 720px) {
  .app-shell { padding: 14px; gap: 14px; }
  .panel { padding: 16px; border-radius: 20px; }
  .big-number { font-size: 3.2rem; }
  .footer { align-items: flex-start; }
}
