:root {
  --bg: #070b14;
  --panel: rgba(13, 18, 31, 0.78);
  --panel-strong: rgba(17, 24, 41, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f7ff;
  --muted: #9aa6c9;
  --blue: #4b7bff;
  --epic: #7b4dff;
  --legend: #ff547f;
  --common: #6f7897;
  --glow: 0 20px 45px rgba(20, 30, 60, 0.38);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(75, 123, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 84, 127, 0.16), transparent 32%),
    linear-gradient(180deg, #0a1120 0%, #050810 100%);
  color: var(--text);
  font-family: "Segoe UI Variable Text", "Trebuchet MS", "Segoe UI", sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
}

.background-glow {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}

.background-glow-left {
  top: -40px;
  left: -60px;
  background: rgba(69, 113, 255, 0.3);
}

.background-glow-right {
  right: -80px;
  top: 220px;
  background: rgba(255, 84, 127, 0.24);
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding:
    max(20px, env(safe-area-inset-top))
    16px
    max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero {
  padding: 12px 8px 0;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: rgba(170, 184, 225, 0.75);
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 9vw, 48px);
  line-height: 0.98;
  font-weight: 800;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.wheel-card,
.status-card,
.timer-card,
.result-card,
.notice-card {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: var(--glow);
}

.wheel-card {
  position: relative;
  padding: 28px 18px 18px;
  border-radius: var(--radius-xl);
}

.wheel-wrap {
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.09), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.pointer {
  width: 22px;
  height: 22px;
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background: white;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
  z-index: 2;
}

.wheel {
  --rotation: 0deg;
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  margin: 8px auto 0;
  border-radius: 50%;
  transform: rotate(var(--rotation));
  transition: transform 5.3s cubic-bezier(0.15, 0.88, 0.12, 1);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12), transparent 55%),
    conic-gradient(
      #ff547f 0deg 60deg,
      #707ba4 60deg 120deg,
      #3b74ff 120deg 180deg,
      #7749ff 180deg 240deg,
      #315fd6 240deg 300deg,
      #8188a6 300deg 360deg
    );
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(94, 130, 255, 0.18);
}

.wheel::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wheel-center {
  position: absolute;
  inset: 50%;
  width: 86px;
  height: 86px;
  margin: -43px 0 0 -43px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.14), transparent 40%),
    linear-gradient(180deg, #09111f, #10192c);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 12px;
  z-index: 2;
}

.wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  margin-left: -60px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transform-origin: center -86px;
}

.label-1 { transform: rotate(30deg) translateY(-126px) rotate(-30deg); }
.label-2 { transform: rotate(90deg) translateY(-126px) rotate(-90deg); }
.label-3 { transform: rotate(150deg) translateY(-126px) rotate(-150deg); }
.label-4 { transform: rotate(210deg) translateY(-126px) rotate(-210deg); }
.label-5 { transform: rotate(270deg) translateY(-126px) rotate(-270deg); }
.label-6 { transform: rotate(330deg) translateY(-126px) rotate(-330deg); }

.spin-button {
  width: 100%;
  margin-top: 18px;
  padding: 18px 22px;
  border: 0;
  border-radius: 20px;
  color: white;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.18em;
  background:
    linear-gradient(135deg, rgba(66, 114, 255, 0.96), rgba(255, 84, 127, 0.96));
  box-shadow:
    0 16px 28px rgba(66, 114, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.spin-button:active {
  transform: scale(0.98);
}

.spin-button:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.status-card,
.timer-card,
.result-card,
.notice-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.status-title,
.timer-label {
  color: rgba(213, 220, 255, 0.9);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

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

.streak-day {
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  border: 1px solid transparent;
}

.streak-day.active {
  color: white;
  background: rgba(77, 124, 255, 0.22);
  border-color: rgba(77, 124, 255, 0.36);
}

.streak-day.current {
  background: linear-gradient(135deg, rgba(77, 124, 255, 0.92), rgba(119, 73, 255, 0.92));
  box-shadow: 0 10px 18px rgba(77, 124, 255, 0.26);
}

.streak-day.milestone {
  border-color: rgba(255, 255, 255, 0.16);
}

.status-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.timer-text {
  font-size: clamp(20px, 6vw, 28px);
  font-weight: 800;
  line-height: 1.1;
}

.result-card {
  transform: translateY(0);
  opacity: 1;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.result-card.hidden,
.notice-card.hidden,
.result-code.hidden {
  display: none;
}

.result-rarity {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.result-rarity.common { color: #cad0e2; }
.result-rarity.rare { color: #89a8ff; }
.result-rarity.epic { color: #be9cff; }
.result-rarity.legend { color: #ff96b6; }

.result-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.result-code {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notice-card {
  font-size: 14px;
  line-height: 1.5;
  color: #dfe7ff;
}

@media (max-width: 380px) {
  .app-shell {
    padding-inline: 12px;
  }

  .wheel-label {
    font-size: 10px;
  }

  .streak-grid {
    gap: 4px;
  }

  .streak-day {
    height: 30px;
    font-size: 10px;
  }
}

