:root {
  --bg: #06080f;
  --bg-soft: #10162b;
  --card: #0f1729cc;
  --card-border: #6ee7ff33;
  --text: #f7fbff;
  --muted: #8fa4c4;
  --aqua: #45e6ff;
  --amber: #ffbe3d;
  --danger: #ff5f5f;
  --shadow: 0 18px 45px #02060fcc;
}

* {
  box-sizing: border-box;
}

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

body {
  background: radial-gradient(circle at 20% 15%, #14213f 0%, transparent 45%),
    radial-gradient(circle at 85% 0%, #47290f 0%, transparent 40%),
    linear-gradient(140deg, var(--bg), #090e1c 55%, #0a1316);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
}

.bg-layer {
  position: fixed;
  inset: -20vmax;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.25;
}

.bg-layer-a {
  background: radial-gradient(circle, #20d4f0 0%, transparent 60%);
  animation: driftA 17s ease-in-out infinite alternate;
}

.bg-layer-b {
  background: radial-gradient(circle, #ff9a2f 0%, transparent 60%);
  animation: driftB 22s ease-in-out infinite alternate;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#ffffff08 0.7px, transparent 0.7px);
  background-size: 4px 4px;
  opacity: 0.35;
}

.app {
  position: relative;
  z-index: 1;
  width: min(1080px, 92vw);
  margin: 0 auto;
  padding: 40px 0 64px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--aqua);
  font-size: 0.78rem;
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3rem, 9vw, 6.5rem);
  letter-spacing: 0.05em;
  line-height: 0.95;
  text-shadow: 0 0 25px #4ad6ff40;
}

.subtitle {
  margin: 12px auto 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.03rem;
}

.roulette {
  backdrop-filter: blur(8px);
  background: linear-gradient(160deg, #131d3494, #0a121f73);
  border: 1px solid #9cecff2b;
  border-radius: 24px;
  padding: clamp(16px, 3vw, 28px);
  box-shadow: var(--shadow);
}

.roulette-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(340px, 1.35fr);
  gap: 14px;
  align-items: stretch;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--card);
  padding: 16px;
  min-height: 154px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 20%,
    #a1f4ff2a 48%,
    transparent 72%
  );
  transform: translateX(-120%);
  animation: shimmer 7s linear infinite;
}

.card h2 {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #9ec5ef;
}

.value {
  margin: 16px 0 8px;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  font-weight: 700;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.35;
}

.card.is-spinning {
  border-color: #ffbe3d8e;
  box-shadow: 0 0 0 1px #ffbe3d2e, inset 0 0 24px #ffbe3d14;
}

.controls {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.spin-btn {
  border: 0;
  border-radius: 999px;
  color: #0a0f1a;
  background: linear-gradient(140deg, var(--aqua), #85f8a4 70%);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 28px;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  box-shadow: 0 8px 22px #25bdd85c;
}

.spin-btn:hover:enabled {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.05);
}

.spin-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.share-btn {
  border: 1px solid var(--aqua);
  border-radius: 999px;
  color: var(--aqua);
  background: transparent;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 28px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.share-btn:hover {
  background: var(--aqua);
  color: #0a0f1a;
}

.status {
  margin: 0;
  color: #b2c7e8;
  min-height: 1.2em;
}

.image-wrap {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #99e7ff33;
  background: #0b1120;
  box-shadow: var(--shadow);
  min-height: 100%;
  aspect-ratio: 3 / 4.2;
}

#champion-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: none;
  transform: scale(1.04);
  animation: revealImg 0.8s ease forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: revealUp 0.8s ease forwards;
}

.reveal:nth-of-type(2) {
  animation-delay: 0.12s;
}

.reveal:nth-of-type(3) {
  animation-delay: 0.24s;
}

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

@keyframes shimmer {
  0% {
    transform: translateX(-120%);
  }
  26% {
    transform: translateX(140%);
  }
  100% {
    transform: translateX(140%);
  }
}

@keyframes driftA {
  from {
    transform: translate(-7%, -4%) scale(1.05);
  }
  to {
    transform: translate(8%, 6%) scale(1.2);
  }
}

@keyframes driftB {
  from {
    transform: translate(7%, 7%) scale(1.03);
  }
  to {
    transform: translate(-5%, -7%) scale(1.17);
  }
}

@keyframes revealImg {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1.01);
  }
}

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

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

  .card {
    min-height: 140px;
  }

  .image-wrap {
    aspect-ratio: 3 / 4;
    min-height: unset;
  }
}
