:root {
  --bg: #12091f;
  --panel: rgba(28, 17, 40, 0.96);
  --panel-2: rgba(38, 24, 54, 0.96);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f8f4ff;
  --muted: #d7cbef;
  --accent: #c7ff58;
  --shadow: 0 0.65rem 1.6rem rgba(0, 0, 0, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  background: var(--bg) url("images/space.gif") repeat;
  background-size: 280px auto;
}

button,
a {
  font: inherit;
}

a {
  color: #ffe9ff;
}

.dressup-page {
  width: min(1180px, calc(100% - 1.2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.84rem;
  font-weight: 700;
}

.hero,
.game-shell {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1rem;
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: #8df0ff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0 0 0.7rem;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 4.3rem);
  line-height: 0.95;
  color: #fff2a6;
}

h2 {
  font-size: 1.1rem;
  color: #fff0a2;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-content: start;
  justify-content: end;
}

.hero-stamps img {
  width: auto;
  max-width: none;
  height: 3rem;
  object-fit: contain;
}

.secret-stamp {
  cursor: pointer;
  transition: transform 140ms ease;
}

.secret-stamp:hover,
.secret-stamp:focus-visible {
  transform: scale(1.14) rotate(-3deg);
}

.game-shell {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(280px, 0.95fr);
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
}

.preview-panel,
.controls-panel {
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--panel-2);
  padding: 1rem;
}

.preview-stage {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 0.65rem;
  background: rgba(9, 6, 16, 0.45);
}

.stage-background {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.7) 0 0.3rem, transparent 0.35rem),
    radial-gradient(circle at 82% 24%, rgba(141, 240, 255, 0.75) 0 0.28rem, transparent 0.33rem),
    radial-gradient(circle at 70% 74%, rgba(255, 245, 172, 0.75) 0 0.3rem, transparent 0.35rem),
    linear-gradient(180deg, #160d2a, #24103c);
}

.stage-background.green-space {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.7) 0 0.3rem, transparent 0.35rem),
    radial-gradient(circle at 80% 24%, rgba(164, 255, 117, 0.75) 0 0.28rem, transparent 0.33rem),
    radial-gradient(circle at 70% 74%, rgba(255, 245, 172, 0.75) 0 0.3rem, transparent 0.35rem),
    linear-gradient(180deg, #102714, #16341d);
}

.stage-background.pink-space {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.7) 0 0.3rem, transparent 0.35rem),
    radial-gradient(circle at 82% 24%, rgba(255, 133, 195, 0.78) 0 0.28rem, transparent 0.33rem),
    radial-gradient(circle at 70% 74%, rgba(255, 245, 172, 0.75) 0 0.3rem, transparent 0.35rem),
    linear-gradient(180deg, #2b1325, #4d1836);
}

.stage-background.dark-grid {
  background:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, #0e0f1c, #211339);
  background-size: 44px 44px, 44px 44px, auto;
}

.stage-background.earth {
  background: url("images/dressup/earth.webp") center / cover no-repeat;
}

.stage-background.pluto {
  background: url("images/pluto.jpeg") center / cover no-repeat;
}
.stage-background.hallway {
  background: url("images/hallway.jpeg") center / cover no-repeat;
}
.stage-background.cambodia {
  background: url("images/dressup/phnom-penh.webp") center / cover no-repeat;
}

.stage-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  image-rendering: auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.action-button,
.option-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.action-button:hover,
.option-button:hover,
.action-button:focus-visible,
.option-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.36);
}

.action-button {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  font-weight: 700;
}

.action-button.primary,
.option-button.active {
  background: rgba(199, 255, 88, 0.16);
}

.save-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.controls-panel {
  display: grid;
  gap: 0.9rem;
}

.control-group {
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
}

.control-group:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.option-button {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  text-transform: lowercase;
}

.preset-button {
  background: rgba(141, 240, 255, 0.1);
}

@media (max-width: 900px) {
  .hero,
  .game-shell {
    grid-template-columns: 1fr;
  }

  .hero-stamps {
    justify-content: start;
  }
}

@media (max-width: 620px) {
  .dressup-page {
    width: min(100% - 0.7rem, 100%);
  }

  .hero,
  .game-shell,
  .preview-panel,
  .controls-panel {
    padding: 0.8rem;
  }

  .hero-stamps img {
    height: 2.5rem;
  }

}
