:root {
  color: #d7e6ff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg-top: #1f3f8f;
  --bg-mid: #111c46;
  --bg-deep: #090f24;
  --line: rgba(108, 175, 255, 0.06);
  --card-border: rgba(100, 180, 255, 0.24);
  --card-bg-top: rgba(8, 21, 52, 0.82);
  --card-bg-bottom: rgba(6, 15, 37, 0.92);
  --card-bg-solid: rgba(13, 22, 50, 0.82);
  --chip-bg: rgba(15, 41, 95, 0.55);
  --chip-border: rgba(86, 176, 255, 0.22);
  --accent: #8fd7ff;
  --accent-strong: #bce9ff;
  --accent-soft: #83b7ff;
  --success: #4effc5;
  --danger: #ff9cbb;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  background: radial-gradient(circle at top right, var(--bg-top) 0%, var(--bg-mid) 35%, var(--bg-deep) 100%);
  color: #d7e6ff;
}

body,
textarea,
button,
a {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(61, 121, 255, 0.18), transparent 28%),
    radial-gradient(circle at 80% 16%, rgba(58, 214, 197, 0.16), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(0, 209, 255, 0.12), transparent 30%),
    linear-gradient(160deg, #050a1a 0%, #08112b 44%, #040814 100%);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 44%, transparent 100%);
  pointer-events: none;
}

.app-card {
  position: relative;
  z-index: 1;
  width: min(100%, 1100px);
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--card-border);
  background:
    linear-gradient(180deg, var(--card-bg-top) 0%, var(--card-bg-bottom) 100%),
    var(--card-bg-solid);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(183, 228, 255, 0.08),
    inset 0 -1px 0 rgba(90, 140, 255, 0.1);
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(120, 207, 255, 0.08), transparent 28%, transparent 72%, rgba(120, 207, 255, 0.06));
}

.view {
  position: relative;
  z-index: 1;
}

.hidden {
  display: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #b4ddff;
  background: rgba(33, 58, 122, 0.46);
  border: 1px solid rgba(127, 195, 255, 0.18);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
}

h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.96;
  color: #e5f5ff;
  text-shadow: 0 0 20px rgba(79, 227, 255, 0.15);
}

.lead {
  margin: 0;
  max-width: 760px;
  color: #a7c9f7;
  font-size: 18px;
  line-height: 1.55;
}

.lead.compact {
  max-width: 540px;
  font-size: 16px;
}

.panel-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

.user-chip-wrap {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.user-chip,
.copy-state,
.status-banner {
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: #c7e8ff;
}

.status-banner {
  margin-bottom: 20px;
}

.status-banner.error {
  border-color: rgba(255, 156, 187, 0.34);
  color: #ffd5e1;
  background: rgba(80, 18, 37, 0.45);
}

.status-banner.success {
  border-color: rgba(78, 255, 197, 0.34);
  color: #d8fff1;
  background: rgba(11, 74, 64, 0.4);
}

.report-layout {
  display: grid;
  gap: 18px;
}

.input-panel,
.output-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(127, 195, 255, 0.16);
  background: rgba(9, 18, 43, 0.62);
}

.panel-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.panel-label {
  color: var(--accent);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

textarea,
pre {
  width: 100%;
  min-height: 340px;
  margin: 0;
  border: 1px solid rgba(127, 195, 255, 0.14);
  border-radius: 18px;
  background: rgba(5, 11, 28, 0.86);
  color: #dff4ff;
  padding: 18px;
  resize: vertical;
  line-height: 1.6;
  font-size: 15px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

textarea:focus {
  outline: 2px solid rgba(120, 207, 255, 0.3);
  border-color: rgba(120, 207, 255, 0.42);
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.action-row {
  display: flex;
  justify-content: flex-start;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(127, 195, 255, 0.22);
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button {
  color: #061226;
  font-weight: 700;
  background: linear-gradient(135deg, #9fe2ff 0%, #7fc2ff 45%, #76a6ff 100%);
  box-shadow: 0 14px 32px rgba(78, 142, 255, 0.28);
}

.ghost-button {
  color: #d7ebff;
  background: rgba(12, 24, 54, 0.5);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  border-color: rgba(166, 219, 255, 0.42);
}

@media (max-width: 760px) {
  .page-shell {
    padding: 16px;
  }

  .app-card {
    padding: 18px;
    border-radius: 24px;
  }

  .panel-topline {
    grid-template-columns: 1fr;
    display: grid;
  }

  .user-chip-wrap {
    justify-items: start;
  }

  textarea,
  pre {
    min-height: 280px;
  }
}