:root {
  --bg: #0f1c2b;
  --bg-2: #182d41;
  --ink: #e8f0f8;
  --ink-dim: #aec3d8;
  --accent: #ff7a18;
  --accent-2: #ffd166;
  --panel: rgba(13, 28, 43, 0.7);
  --line: rgba(232, 240, 248, 0.15);
  --shadow: 0 18px 48px rgba(2, 8, 16, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 20% 20%, #284b6a 0%, transparent 65%),
    radial-gradient(900px 600px at 90% 70%, #2b3a5e 0%, transparent 60%),
    linear-gradient(145deg, var(--bg), var(--bg-2));
  display: grid;
  place-items: center;
  padding: 28px;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.26;
  z-index: 0;
}

.ambient-a {
  width: 280px;
  height: 280px;
  left: -40px;
  top: 12%;
  background: var(--accent);
  animation: driftA 13s ease-in-out infinite;
}

.ambient-b {
  width: 360px;
  height: 360px;
  right: -90px;
  bottom: 2%;
  background: #6ec1ff;
  animation: driftB 16s ease-in-out infinite;
}

.shell {
  width: min(920px, 100%);
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.hero {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(5px);
  padding: 22px 24px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent-2);
  font-weight: 700;
}

h1 {
  margin: 8px 0 10px;
  font-family: "Avenir Next Condensed", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  color: var(--ink-dim);
  max-width: 60ch;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.prompt-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.mode-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mode-wrap label {
  font-size: 0.92rem;
  color: var(--ink-dim);
}

select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 15, 24, 0.5);
  color: var(--ink);
  font: inherit;
  padding: 8px 10px;
}

select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 15, 24, 0.5);
  color: var(--ink);
  padding: 14px;
  font: inherit;
  resize: vertical;
  min-height: 120px;
}

textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 160ms ease, filter 180ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

button:active {
  transform: translateY(0);
}

#generateBtn {
  color: #111;
  background: linear-gradient(120deg, var(--accent), #ffb347);
}

button.ghost {
  color: var(--ink);
  background: rgba(232, 240, 248, 0.08);
  border: 1px solid var(--line);
}

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

h2 {
  margin: 0;
  font-family: "Avenir Next Condensed", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 1.35rem;
}

.status {
  color: var(--ink-dim);
  font-size: 0.84rem;
}

.response {
  margin: 14px 0 0;
  line-height: 1.8;
  font-size: 1.02rem;
}

.meter-wrap {
  margin-top: 12px;
}

.meter-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.84rem;
  color: var(--ink-dim);
}

.meter-meta strong {
  color: var(--accent-2);
  font-size: 1rem;
}

.meter-track {
  margin-top: 6px;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(232, 240, 248, 0.14);
  overflow: hidden;
}

.meter-fill {
  width: 91%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd166, #ff8f3f, #ff5f6d);
  transition: width 360ms ease;
}

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

.copy-status {
  min-height: 1.2em;
  color: var(--ink-dim);
  font-size: 0.88rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 580ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--delay);
}

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

@keyframes driftA {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(24px, 28px) scale(1.08);
  }
}

@keyframes driftB {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-28px, -16px) scale(1.05);
  }
}

@media (max-width: 720px) {
  body {
    padding: 16px;
  }

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

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