:root {
  --bg: #05010b;
  --bg-2: #0b0316;
  --panel: rgba(12, 6, 23, 0.82);
  --panel-2: rgba(22, 12, 40, 0.78);
  --line: rgba(207, 142, 255, 0.24);
  --line-strong: rgba(216, 138, 255, 0.78);
  --text: #fffaff;
  --muted: #d6c6ef;
  --cyan: #57f4ff;
  --cyan-soft: rgba(87, 244, 255, 0.18);
  --violet: #8747ff;
  --violet-2: #c768ff;
  --violet-3: #5b24ff;
  --danger: #ff6d9e;
  --ok: #6bffb8;
  --warn: #ffe46b;
  --shadow: 0 28px 90px rgba(105, 38, 210, 0.36);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  background:
    linear-gradient(rgba(127, 71, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 71, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(142, 65, 255, 0.28), transparent 46%),
    linear-gradient(180deg, #120620 0%, var(--bg) 58%, #020006 100%);
  background-size: 42px 42px, 42px 42px, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 5px
    );
  mix-blend-mode: screen;
  opacity: 0.38;
  z-index: 0;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.grid-glow {
  position: absolute;
  inset: -10% 0 auto;
  height: 52vh;
  background:
    radial-gradient(circle at 28% 20%, rgba(87, 244, 255, 0.12), transparent 28%),
    radial-gradient(circle at 72% 18%, rgba(199, 104, 255, 0.16), transparent 34%);
  filter: blur(8px);
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 26%;
  background: linear-gradient(180deg, transparent, rgba(87, 244, 255, 0.08), transparent);
  animation: scan 6s linear infinite;
}

.particle-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  top: -24px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(203, 112, 255, 0.62);
  box-shadow: 0 0 12px rgba(203, 112, 255, 0.38);
  opacity: var(--alpha);
  animation: fall var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.particle:nth-child(3n) {
  background: rgba(87, 244, 255, 0.58);
  box-shadow: 0 0 12px rgba(87, 244, 255, 0.32);
}

.shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 18px;
  position: relative;
  z-index: 1;
}

.app-panel {
  width: min(100%, 470px);
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(21, 10, 39, 0.88), rgba(6, 2, 13, 0.86)),
    rgba(8, 3, 16, 0.76);
  box-shadow: var(--shadow), inset 0 0 38px rgba(151, 71, 255, 0.08);
  backdrop-filter: blur(18px);
  animation: panelIn 0.5s ease-out both;
  overflow: hidden;
}

.app-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(87, 244, 255, 0.08);
  pointer-events: none;
  z-index: 1;
}

.panel-particle-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.panel-particle {
  position: absolute;
  top: -12px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  opacity: var(--alpha);
  background: rgba(211, 129, 255, 0.46);
  box-shadow: 0 0 11px rgba(211, 129, 255, 0.24);
  animation: panelFall var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.panel-particle:nth-child(3n) {
  background: rgba(87, 244, 255, 0.34);
  box-shadow: 0 0 10px rgba(87, 244, 255, 0.22);
}

.panel-particle:nth-child(4n) {
  width: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(190, 118, 255, 0.16);
}

.brand-copy {
  min-width: 0;
}

.eyebrow,
.section-title {
  margin: 0;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(87, 244, 255, 0.28);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--cyan);
  box-shadow: 0 0 12px rgba(87, 244, 255, 0.5);
}

h1,
h2,
p {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  margin-top: 5px;
  font-size: 36px;
  line-height: 1;
  font-weight: 950;
  text-shadow: 0 0 22px rgba(203, 112, 255, 0.18);
}

h1 span {
  color: transparent;
  background: linear-gradient(90deg, #ffffff, #d491ff, #57f4ff);
  background-size: 180% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 3.2s linear infinite;
}

h2 {
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.35;
}

.tagline {
  margin-top: 9px;
  max-width: 270px;
  color: #e2d5f6;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 650;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--cyan);
  font-size: 27px;
  font-weight: 950;
  background:
    linear-gradient(145deg, rgba(151, 71, 255, 0.26), rgba(87, 244, 255, 0.06)),
    rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 24px rgba(151, 71, 255, 0.2), 0 0 28px rgba(151, 71, 255, 0.24);
}

.brand-mark span {
  filter: drop-shadow(0 0 10px rgba(87, 244, 255, 0.5));
}

.generator,
.section,
.tier-panel,
.result {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.generator {
  margin-top: 18px;
}

.section {
  gap: 10px;
}

.reveal-card {
  animation: liftIn 0.45s ease-out both;
}

.reveal-card:nth-child(2) {
  animation-delay: 0.05s;
}

.reveal-card:nth-child(3) {
  animation-delay: 0.1s;
}

.reveal-card:nth-child(4) {
  animation-delay: 0.15s;
}

.input-wrap {
  min-height: 50px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid rgba(190, 118, 255, 0.26);
  border-radius: 8px;
  background: rgba(3, 1, 9, 0.42);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-wrap:focus-within {
  border-color: var(--line-strong);
  background: rgba(12, 5, 25, 0.96);
  box-shadow: 0 0 0 3px rgba(151, 71, 255, 0.16), 0 0 24px rgba(151, 71, 255, 0.12);
}

.input-wrap svg,
.choice svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.input-wrap svg {
  color: var(--cyan);
}

input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 15px;
  font-weight: 700;
}

input::placeholder {
  color: rgba(248, 241, 255, 0.58);
  font-weight: 650;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

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

.choice,
.tier-btn,
.primary-btn,
.secondary-btn,
.copy-btn {
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.choice,
.tier-btn {
  position: relative;
  overflow: hidden;
  padding: 0 12px;
  border: 1px solid rgba(190, 118, 255, 0.22);
  text-align: left;
  background: linear-gradient(180deg, rgba(24, 10, 44, 0.68), rgba(6, 2, 13, 0.58));
  color: #fffaff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.34);
}

.choice::after,
.tier-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: translateX(-120%);
  transition: transform 0.45s ease;
}

.choice:hover::after,
.tier-btn:hover::after {
  transform: translateX(120%);
}

.choice.active,
.tier-btn:hover,
.tier-btn.selected {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(151, 71, 255, 0.34), rgba(21, 8, 40, 0.78));
  box-shadow: inset 0 0 22px rgba(151, 71, 255, 0.16), 0 0 24px rgba(151, 71, 255, 0.2);
}

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

.os-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.os-card svg {
  color: var(--cyan);
  filter: drop-shadow(0 0 8px rgba(87, 244, 255, 0.35));
}

.os-card b,
.os-card small {
  display: block;
}

.os-card small {
  margin-top: 2px;
  color: #d6c6ef;
  font-size: 12px;
  font-weight: 650;
}

.issue-card {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
}

.issue-card i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--violet-2);
  font-style: normal;
  text-shadow: 0 0 12px rgba(203, 112, 255, 0.5);
}

.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 2px;
}

.primary-btn,
.secondary-btn,
.copy-btn {
  position: relative;
  overflow: hidden;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.03em;
}

.primary-btn {
  background: linear-gradient(100deg, var(--violet-3), var(--violet-2), #6a3dff);
  box-shadow: 0 14px 34px rgba(151, 71, 255, 0.32);
}

.primary-btn::before,
.secondary-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-120%);
  animation: buttonSweep 3s ease-in-out infinite;
}

.secondary-btn,
.copy-btn {
  border: 1px solid rgba(87, 244, 255, 0.3);
  background: rgba(9, 27, 42, 0.38);
  box-shadow: inset 0 0 20px rgba(87, 244, 255, 0.05);
}

.primary-btn span,
.secondary-btn span {
  position: relative;
  z-index: 1;
}

.credits {
  margin: -2px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(87, 244, 255, 0.25);
  border-radius: 8px;
  color: #e8ddf8;
  background: rgba(87, 244, 255, 0.08);
  font-size: 14px;
  font-weight: 750;
  animation: liftIn 0.28s ease-out both;
}

.credits b {
  color: var(--cyan);
  font-size: 18px;
  text-shadow: 0 0 10px rgba(87, 244, 255, 0.35);
}

.tier-panel,
.status,
.result {
  margin-top: 16px;
}

.tier-panel {
  padding: 14px;
  border: 1px solid rgba(190, 118, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(28, 12, 49, 0.68), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 0 28px rgba(151, 71, 255, 0.08);
  animation: tierOpen 0.34s ease-out both;
}

.tier-stack {
  display: grid;
  gap: 10px;
}

.tier-btn {
  display: grid;
  place-items: center;
  text-align: center;
}

.tier-btn strong {
  font-size: 14px;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(87, 244, 255, 0.28);
}

.status {
  padding: 12px;
  border: 1px solid rgba(190, 118, 255, 0.2);
  border-radius: 8px;
  color: #e2d5f6;
  background: rgba(0, 0, 0, 0.32);
  line-height: 1.45;
  font-size: 14px;
  font-weight: 700;
  animation: liftIn 0.25s ease-out both;
}

.status.ok {
  border-color: rgba(107, 255, 184, 0.32);
  color: var(--ok);
}

.status.err {
  border-color: rgba(255, 109, 158, 0.36);
  color: var(--danger);
}

.result {
  padding: 16px;
  border: 1px solid rgba(190, 118, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 3, 22, 0.9), rgba(28, 10, 51, 0.76)),
    rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 34px rgba(151, 71, 255, 0.1), 0 18px 42px rgba(0, 0, 0, 0.18);
  animation: tierOpen 0.34s ease-out both;
}

.result-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

#tierBadge {
  min-width: 58px;
  padding: 8px;
  border: 1px solid rgba(87, 244, 255, 0.32);
  border-radius: 8px;
  text-align: center;
  color: var(--cyan);
  font-weight: 950;
  background: rgba(87, 244, 255, 0.07);
}

.stat-list {
  display: grid;
  gap: 6px;
}

.stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 36px;
  border-bottom: 1px solid rgba(190, 118, 255, 0.1);
}

.stat-row span {
  color: #fff6ff;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
}

.stat-row b,
.mini-grid b {
  color: var(--cyan);
  font-size: 25px;
  line-height: 1;
  text-shadow: 0 0 13px rgba(87, 244, 255, 0.34);
}

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

.mini-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(190, 118, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.mini-grid span {
  color: var(--danger);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.mini-grid div:first-child span {
  color: var(--warn);
}

.hint {
  color: var(--warn);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 750;
}

.copy-btn {
  width: 100%;
}

.hidden {
  display: none !important;
}

@keyframes fall {
  from {
    transform: translate3d(0, -20px, 0);
  }
  to {
    transform: translate3d(var(--drift), 112vh, 0);
  }
}

@keyframes panelFall {
  from {
    transform: translate3d(0, -16px, 0);
  }
  to {
    transform: translate3d(var(--drift), 106%, 0);
  }
}

@keyframes scan {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(150vh);
  }
}

@keyframes shimmer {
  to {
    background-position: 180% center;
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tierOpen {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes buttonSweep {
  0%,
  55% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@media (max-width: 420px) {
  .shell {
    padding: 10px;
  }

  .app-panel {
    padding: 14px;
  }

  h1 {
    font-size: 30px;
  }

  .tagline {
    max-width: 220px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

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

  .primary-btn,
  .secondary-btn {
    min-height: 50px;
    font-size: 11px;
    padding: 0 8px;
  }
}

@media (max-width: 350px) {
  .choice-grid.issues {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
