:root {
  color-scheme: dark;
  --bg: #06111a;
  --panel: rgba(10, 21, 35, 0.88);
  --border: rgba(137, 209, 255, 0.18);
  --text: #eaf5ff;
  --muted: #97b2cc;
  --accent: #78ffd7;
  --accent-2: #ffcf7b;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(120, 255, 215, 0.14), transparent 32%),
    radial-gradient(circle at 85% 18%, rgba(255, 207, 123, 0.12), transparent 24%),
    linear-gradient(180deg, #09131d 0%, var(--bg) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  left: -9rem;
  bottom: -10rem;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 255, 215, 0.2), rgba(134, 186, 255, 0.08) 52%, transparent 72%);
  filter: blur(20px);
  animation: repairPulse 20s ease-in-out infinite;
}

body::after {
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.75), transparent 84%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 50px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(160, 198, 227, 0.14);
}

.nav-link.current {
  background: linear-gradient(135deg, var(--accent), #86baff);
  color: #06111a;
  font-weight: 700;
}

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  color: var(--accent);
}

h1,
h2 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 0.95;
}

.lede,
.page-note,
.status {
  color: var(--muted);
}

.page-note strong {
  color: var(--text);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.85fr);
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.form-panel,
.side-panel {
  padding: 22px;
}

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

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

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  font-size: 0.84rem;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(160, 198, 227, 0.18);
  border-radius: 16px;
  background: rgba(5, 12, 22, 0.75);
  color: var(--text);
  padding: 12px 14px;
}

.toggle-row,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle-row {
  margin-top: 18px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(160, 198, 227, 0.16);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(5, 12, 22, 0.6);
}

.action-row {
  margin-top: 20px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 700;
  cursor: pointer;
}

#build-button {
  background: linear-gradient(135deg, var(--accent), #85bfff);
  color: #06111a;
}

#download-difficulty-button {
  background: linear-gradient(135deg, #ffe184, #ffac7c);
  color: #241200;
}

#download-pack-button {
  background: linear-gradient(135deg, #9ae6ff, #ffd27b);
  color: #11161d;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.side-panel,
.summary-block,
.summary-list,
.download-list {
  display: grid;
  gap: 10px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.summary-line strong {
  color: var(--text);
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1140px);
    padding-top: 24px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes repairPulse {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2rem, -1rem, 0) scale(1.08); }
  100% { transform: translate3d(-1rem, 1rem, 0) scale(0.94); }
}
