@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
  --navy: #071325;
  --navy-2: #0b0d42;
  --gold: #ffc94a;
  --gold-2: #ffd66f;
  --crimson: #e31348;
  --crimson-dark: #a80731;
  --ink: #f8f9ff;
  --muted: rgba(255, 255, 255, 0.7);
  --line: rgba(255, 255, 255, 0.13);
  --card: rgba(14, 16, 69, 0.78);
  --soft: rgba(255, 255, 255, 0.08);
  --green: #12a66a;
  --red: #d94848;
  --blue: #3d7cff;
  --pink: #e84c88;
  --purple: #7c5cff;
  --orange: #f47b3d;
  --light-text: #15172f;
  font-family: Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% -8%, rgba(227, 19, 72, 0.2), transparent 36rem),
    radial-gradient(ellipse at 92% 8%, rgba(82, 73, 190, 0.2), transparent 40rem),
    linear-gradient(145deg, #04051d 0%, #090b36 52%, #111146 100%);
  padding: clamp(0.65rem, 3vw, 2.5rem);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.22;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 0.5px, transparent 0.5px);
  background-size: 16px 16px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(11, 13, 58, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.banner-container {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.2rem);
  margin: 10px 10px 0;
  padding: clamp(1.15rem, 4vw, 3.2rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 39%, rgba(255, 215, 0, 0.36), transparent 13.5rem),
    radial-gradient(circle at 58% 82%, rgba(227, 19, 72, 0.34), transparent 18rem),
    radial-gradient(circle at 16% 12%, rgba(144, 50, 255, 0.26), transparent 19rem),
    linear-gradient(105deg, rgba(8, 4, 31, 0.82) 0 42%, rgba(10, 10, 64, 0.56) 58%, rgba(65, 15, 73, 0.62) 100%),
    url("https://ik.imagekit.io/vortexseo/score8/photo_2026-05-12_18-45-27%20(2).jpg?updatedAt=1778593892730") center / cover no-repeat;
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 18px;
  aspect-ratio: 5 / 2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.28);
}

.banner-container::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 18%, rgba(255, 255, 255, 0.1) 18.2%, transparent 18.8% 100%),
    linear-gradient(90deg, rgba(4, 5, 24, 0.16), transparent 55%),
    linear-gradient(180deg, transparent 55%, rgba(3, 4, 25, 0.28));
}

.banner-container::before {
  position: absolute;
  right: clamp(1rem, 6vw, 5rem);
  bottom: -18%;
  width: clamp(11rem, 34vw, 28rem);
  aspect-ratio: 1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(255, 215, 0, 0.22), transparent 55%),
    radial-gradient(circle, rgba(227, 19, 72, 0.22), transparent 72%);
  border-radius: 50%;
  filter: blur(5px);
}

.banner-copy {
  position: relative;
  z-index: 1;
  color: white;
}

.banner-copy p {
  width: fit-content;
  margin: 0 0 0.75rem;
  padding: 0.38rem 0.72rem;
  color: var(--gold-2);
  font-size: clamp(0.62rem, 1.6vw, 0.78rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 201, 74, 0.1);
  border: 1px solid rgba(255, 201, 74, 0.34);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(255, 201, 74, 0.12);
}

.banner-copy h1 {
  max-width: 36rem;
  margin: 0;
  font-size: clamp(1.7rem, 5.4vw, 4.35rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow:
    0 4px 0 rgba(7, 9, 45, 0.45),
    0 14px 32px rgba(0, 0, 0, 0.42);
}

.banner-copy span {
  display: block;
  max-width: 31rem;
  margin-top: 0.9rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(0.82rem, 2vw, 1.04rem);
  line-height: 1.55;
}

.banner-art {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100%;
  place-items: center;
}

.banner-wheel-frame {
  position: relative;
  display: grid;
  width: min(27vw, 18rem);
  min-width: 13rem;
  aspect-ratio: 1;
  place-items: center;
}

.banner-wheel-frame::before {
  position: absolute;
  inset: -13%;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle, rgba(255, 215, 0, 0.38), transparent 54%),
    radial-gradient(circle, rgba(227, 19, 72, 0.3), transparent 72%);
  border-radius: 50%;
  filter: blur(3px);
}

.banner-lucky-wheel {
  width: 100%;
  min-width: 0;
  border-width: clamp(0.45rem, 1vw, 0.68rem);
  box-shadow:
    0 26px 58px rgba(0, 0, 0, 0.38),
    inset 0 0 0 0.2rem #7b2a08,
    inset 0 0 0 0.42rem #ffd65f;
  transform: rotate(-8deg);
}

.banner-lucky-wheel::after {
  inset: 40%;
}

.banner-lucky-wheel .wheel-labels span {
  width: min(4.4rem, 26cqw);
}

.banner-lucky-wheel .wheel-labels strong {
  font-size: clamp(0.78rem, 7.4cqw, 1.65rem);
}

.banner-lucky-wheel .wheel-labels small {
  max-width: min(3.5rem, 22cqw);
  font-size: clamp(0.34rem, 2.8cqw, 0.6rem);
}

.banner-wheel-pointer {
  top: -0.8rem;
  width: 2rem;
  height: 2rem;
}

.topbar {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 3vw, 2.35rem) 0;
  color: white;
  background: transparent;
}

.local-toolbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  flex: 0 0 auto;
  width: 7.5rem;
  max-width: 34vw;
  filter: drop-shadow(0 9px 24px rgba(0, 0, 0, 0.24));
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand small {
  max-width: 54vw;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  text-overflow: ellipsis;
}

.nav-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 999px;
}

.nav-tabs a {
  padding: 0.62rem 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 999px;
}

.nav-tabs a.active {
  color: white;
  background: linear-gradient(180deg, #ff315c 0%, var(--crimson) 58%, var(--crimson-dark) 100%);
  box-shadow: 0 12px 28px rgba(214, 12, 62, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.35rem) 2.35rem;
}

.home-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: clamp(1.2rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
}

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.05rem;
  padding: 0.8rem 1.5rem;
  color: white;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
}

.btn-primary {
  background: linear-gradient(180deg, #ff315c 0%, var(--crimson) 58%, var(--crimson-dark) 100%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 28px rgba(214, 12, 62, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.btn-primary:hover,
.btn-outline:hover {
  transform: translateY(-2px);
}

.home-title {
  margin: 0 auto 2rem;
  text-align: center;
}

.home-title img {
  display: block;
  max-width: 180px;
  max-height: 54px;
  margin: 0 auto 0.25rem;
  filter: drop-shadow(0 9px 24px rgba(0, 0, 0, 0.24));
}

.home-title h1 {
  margin: 1rem 0 0;
  color: white;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.home-title p:last-child {
  max-width: 34rem;
  margin: 0.7rem auto 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
}

.home-event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  justify-content: center;
}

.event-card-link {
  display: block;
  min-width: 0;
}

.home-event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 225px;
  height: 100%;
  padding: clamp(1.25rem, 3vw, 1.7rem);
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 100% 0%, rgba(112, 101, 221, 0.2), transparent 13rem),
    linear-gradient(145deg, rgba(23, 27, 101, 0.96), rgba(20, 18, 78, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-event-card::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(120deg, transparent 28%, rgba(255, 255, 255, 0.12) 45%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
}

.home-event-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(227, 19, 72, 0.08);
}

.home-event-card:hover::after {
  transform: translateX(130%);
}

.event-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 0.9rem;
  place-items: center;
  color: white;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(145deg, #fa315b, #cf0b3b);
  border-radius: 19px;
  box-shadow: 0 14px 30px rgba(214, 12, 62, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.home-event-card h2 {
  margin: 0 0 0.35rem;
  color: white;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
}

.home-event-card p {
  max-width: 16rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.85rem;
  line-height: 1.55;
}

.hero-band {
  display: none;
  gap: 1.25rem;
  padding: clamp(1.3rem, 4vw, 2.4rem) 0 1.5rem;
  color: white;
  text-align: center;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0.7rem auto 0.55rem;
  font-size: clamp(1.75rem, 5vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-copy p:last-child {
  max-width: 36rem;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.96rem;
  line-height: 1.6;
}

.eyebrow {
  width: fit-content;
  margin: 0 auto;
  padding: 0.38rem 0.72rem;
  color: var(--gold-2);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 201, 74, 0.08);
  border: 1px solid rgba(255, 201, 74, 0.35);
  border-radius: 999px;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.status-strip span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.8rem;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.game-page.active {
  display: block;
}

.game-page {
  margin: -0.25rem calc(clamp(1rem, 3vw, 2.35rem) * -1) -2.35rem;
}

body[data-current-view="spin"],
body[data-current-view="box"],
body[data-current-view="timer"] {
  padding: 0;
  min-height: 100dvh;
  overflow-x: hidden;
}

body[data-current-view="spin"] .app-shell,
body[data-current-view="box"] .app-shell,
body[data-current-view="timer"] .app-shell {
  width: 100%;
  min-height: 100vh;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-current-view="spin"] .banner-container,
body[data-current-view="box"] .banner-container,
body[data-current-view="timer"] .banner-container,
body[data-current-view="admin"] .banner-container {
  display: none;
}

body[data-current-view="admin"] main {
  padding-top: clamp(1rem, 3vw, 2.35rem);
}

body[data-current-view="spin"] main,
body[data-current-view="box"] main,
body[data-current-view="timer"] main {
  width: 100%;
  padding: 0;
}

body[data-current-view="spin"] .game-page,
body[data-current-view="box"] .game-page,
body[data-current-view="timer"] .game-page {
  margin: 0;
}

.lucky-spin-wrapper {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: clamp(0.65rem, 2.2vw, 2.2rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 215, 0, 0.18), transparent 18rem),
    radial-gradient(circle at 78% 22%, rgba(227, 19, 72, 0.28), transparent 24rem),
    linear-gradient(rgba(5, 5, 25, 0.36), rgba(5, 5, 25, 0.56)),
    url("https://ik.imagekit.io/vortexseo/score8/photo_2026-05-12_18-45-27.jpg?updatedAt=1778593889735") center / cover no-repeat;
}

.lucky-spin-card {
  width: min(calc(100vw - 1.3rem), 1000px);
  max-height: calc(100dvh - 1.3rem);
  padding: clamp(0.9rem, 2.6vw, 3rem);
  overflow: auto;
  text-align: center;
  background:
    linear-gradient(rgba(12, 8, 42, 0.42), rgba(12, 8, 42, 0.58)),
    url("https://ik.imagekit.io/vortexseo/score8/photo_2026-05-12_18-45-27%20(2).jpg?updatedAt=1778593892730") center / cover no-repeat;
  border: 2px solid #ffd700;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.lucky-spin-card-inner {
  display: grid;
  min-width: 0;
  gap: clamp(0.65rem, 1.5vw, 1rem);
  align-items: center;
}

.spin-header-area img {
  max-height: 50px;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.28));
}

.spin-header-area h2 {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.spin-header-area p {
  margin: 0;
  color: #fff;
  font-size: 1rem;
}

.spin-wheel-container {
  position: relative;
  width: min(64vw, 42dvh, 390px);
  min-width: 210px;
  aspect-ratio: 1;
  margin: 0.45rem auto;
}

.spin-wheel-pointer {
  position: absolute;
  top: -0.95rem;
  left: 50%;
  z-index: 10;
  width: 2.2rem;
  height: 2.2rem;
  transform: translateX(-50%);
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.32));
}

.spin-wheel-pointer::before,
.spin-wheel-pointer::after {
  position: absolute;
  left: 50%;
  content: "";
}

.spin-wheel-pointer::before {
  top: 0;
  width: 1.82rem;
  height: 1.82rem;
  background: linear-gradient(135deg, #ff3b69 0%, #e31348 56%, #a50028 100%);
  border: 0.22rem solid #ffd700;
  border-radius: 50% 50% 50% 0;
  transform: translateX(-50%) rotate(-45deg);
}

.spin-wheel-pointer::after {
  top: 0.42rem;
  width: 0.55rem;
  height: 0.55rem;
  background: #ffd700;
  border-radius: 50%;
  transform: translateX(-50%);
}

.spin-page-wheel {
  width: 100%;
  max-width: none;
  border-width: 0.75rem;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34), inset 0 0 0 2px rgba(7, 19, 37, 0.18);
}

.spin-page-wheel::before {
  position: absolute;
  inset: 0.45rem;
  z-index: 2;
  content: "";
  pointer-events: none;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 1%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 79% 9%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 97% 35%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 97% 65%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 79% 91%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 50% 99%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 21% 91%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 3% 65%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 3% 35%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 21% 9%, #ffe899 0 1.2%, transparent 1.35%);
}

.spin-page-wheel::after {
  z-index: 3;
}

.spin-page-wheel .wheel-labels {
  z-index: 2;
}

.box-page-wrapper {
  background:
    radial-gradient(circle at 31% 26%, rgba(255, 215, 0, 0.26), transparent 18rem),
    radial-gradient(circle at 70% 20%, rgba(227, 19, 72, 0.3), transparent 24rem),
    radial-gradient(circle at 52% 85%, rgba(255, 178, 0, 0.22), transparent 22rem),
    linear-gradient(rgba(5, 5, 25, 0.34), rgba(5, 5, 25, 0.58)),
    url("https://ik.imagekit.io/vortexseo/score8/photo_2026-05-12_18-45-27.jpg?updatedAt=1778593889735") center / cover no-repeat;
}

.box-page-card {
  background:
    radial-gradient(circle at 31% 55%, rgba(255, 215, 0, 0.16), transparent 17rem),
    radial-gradient(circle at 67% 18%, rgba(227, 19, 72, 0.18), transparent 16rem),
    linear-gradient(rgba(12, 8, 42, 0.4), rgba(12, 8, 42, 0.68)),
    url("https://ik.imagekit.io/vortexseo/score8/photo_2026-05-12_18-45-27%20(2).jpg?updatedAt=1778593892730") center / cover no-repeat;
}

.box-page-stage {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: clamp(0.7rem, 2vw, 1.15rem);
  min-width: 0;
  padding: clamp(1.6rem, 3vw, 2.4rem) clamp(0.35rem, 1vw, 0.75rem) clamp(0.9rem, 2vw, 1.35rem);
}

.box-page-stage::before {
  position: absolute;
  right: 4%;
  bottom: 0;
  left: 4%;
  height: 28%;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255, 215, 0, 0.34), transparent 66%),
    linear-gradient(180deg, rgba(255, 215, 0, 0.22), rgba(139, 55, 9, 0.28));
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 50%;
  filter: blur(0.2px);
  transform: perspective(360px) rotateX(62deg);
}

.box-page-stage::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 237, 158, 0.9) 0 0.18rem, transparent 0.22rem),
    radial-gradient(circle at 82% 22%, rgba(255, 237, 158, 0.8) 0 0.16rem, transparent 0.2rem),
    radial-gradient(circle at 71% 76%, rgba(255, 237, 158, 0.75) 0 0.14rem, transparent 0.18rem),
    radial-gradient(circle at 28% 78%, rgba(255, 237, 158, 0.7) 0 0.13rem, transparent 0.17rem);
  opacity: 0.78;
}

.box-page-chest {
  position: relative;
  container-type: inline-size;
  display: grid;
  width: min(22vw, 25dvh, 9.6rem);
  min-width: 5.6rem;
  aspect-ratio: 0.82;
  place-items: center;
  padding: 0.75rem 0.48rem 0.55rem;
  color: white;
  background:
    linear-gradient(180deg, #ffd96a 0 22%, #ffbd39 22% 34%, #78320c 34% 50%, #e39a33 50% 100%);
  border: 0;
  border-bottom: 0.65rem solid #5e2609;
  border-radius: 12px 12px 9px 9px;
  box-shadow:
    inset 0 0.2rem 0 rgba(255, 255, 255, 0.36),
    inset 0 -0.42rem 0 rgba(110, 48, 13, 0.32),
    0 23px 38px rgba(0, 0, 0, 0.36);
  transform: translateY(0);
  transition: transform 0.35s ease, filter 0.35s ease, opacity 0.35s ease;
}

.box-page-chest.featured {
  transform: translateY(-0.55rem) scale(1.08);
}

.box-page-chest::before {
  position: absolute;
  inset: 27% -3% auto;
  z-index: 1;
  height: 27%;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 11%, rgba(255, 221, 95, 0.9) 11% 17%, transparent 17% 83%, rgba(255, 221, 95, 0.9) 83% 89%, transparent 89% 100%),
    linear-gradient(180deg, #7b3511, #4f1f05);
  border-radius: 4px;
  box-shadow: 0 0.18rem 0 rgba(255, 229, 118, 0.32);
  transition: transform 0.42s ease;
}

.box-page-chest::after {
  position: absolute;
  top: 35%;
  left: 50%;
  z-index: 2;
  width: 1.15rem;
  height: 1.55rem;
  content: "";
  background: linear-gradient(180deg, #fff09f, #ffd43f);
  border-radius: 5px;
  box-shadow: 0 0 0 0.15rem rgba(92, 39, 6, 0.36);
  transform: translateX(-50%);
}

.box-page-chest span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}

.box-page-chest span::before {
  position: absolute;
  inset: -42% auto auto -12%;
  width: 48%;
  height: 170%;
  content: "";
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(17deg);
}

.box-page-chest strong,
.box-page-chest small {
  position: relative;
  z-index: 2;
  max-width: 100%;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.48);
}

.box-page-chest strong {
  margin-top: 1.7rem;
  color: #ffd700;
  font-size: clamp(1rem, 4cqw, 1.65rem);
  font-weight: 900;
}

.box-page-chest small {
  color: #fff;
  font-size: clamp(0.46rem, 1.8cqw, 0.68rem);
  font-weight: 800;
  line-height: 1.08;
}

.box-page-chest:disabled {
  cursor: default;
}

.box-page-chest:not(:disabled):hover {
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.42));
  transform: translateY(-0.45rem);
}

.box-page-chest.featured:not(:disabled):hover {
  transform: translateY(-0.85rem) scale(1.08);
}

.box-page-chest.open {
  animation: chestPop 0.62s ease both;
}

.box-page-chest.open::before {
  transform: translateY(-1.45rem) rotate(-7deg);
  transform-origin: left center;
}

.box-page-chest.selected {
  filter: drop-shadow(0 0 26px rgba(255, 215, 0, 0.68));
}

.box-page-chest.dimmed {
  opacity: 0.64;
}

.timer-page-wrapper {
  background:
    radial-gradient(circle at 31% 25%, rgba(255, 215, 0, 0.22), transparent 18rem),
    radial-gradient(circle at 73% 28%, rgba(227, 19, 72, 0.28), transparent 22rem),
    radial-gradient(circle at 52% 76%, rgba(54, 125, 255, 0.22), transparent 20rem),
    linear-gradient(rgba(5, 5, 25, 0.34), rgba(5, 5, 25, 0.6)),
    url("https://ik.imagekit.io/vortexseo/score8/photo_2026-05-12_18-45-27.jpg?updatedAt=1778593889735") center / cover no-repeat;
}

.timer-page-card {
  background:
    radial-gradient(circle at 31% 50%, rgba(255, 215, 0, 0.14), transparent 17rem),
    radial-gradient(circle at 67% 20%, rgba(227, 19, 72, 0.18), transparent 16rem),
    linear-gradient(rgba(12, 8, 42, 0.42), rgba(12, 8, 42, 0.68)),
    url("https://ik.imagekit.io/vortexseo/score8/photo_2026-05-12_18-45-27%20(2).jpg?updatedAt=1778593892730") center / cover no-repeat;
}

.timer-page-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(0.75rem, 1.7vw, 1.1rem);
  min-width: 0;
  padding: clamp(0.65rem, 1.8vw, 1.1rem) 0;
}

.timer-page-stage::before {
  position: absolute;
  inset: 6% 10% 10%;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(255, 215, 0, 0.28), transparent 55%),
    radial-gradient(circle, rgba(227, 19, 72, 0.22), transparent 72%);
  border-radius: 50%;
  filter: blur(7px);
}

.timer-page-face {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(31vw, 42dvh, 18rem);
  min-width: 13rem;
  aspect-ratio: 1;
  place-items: center;
  color: #ffc94a;
  font-size: clamp(3.3rem, 9vw, 6.2rem);
  font-weight: 900;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 50% 42%, #152947 0 55%, #071325 56% 100%);
  border: clamp(0.48rem, 1vw, 0.75rem) solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.34),
    inset 0 0 0 0.24rem rgba(255, 201, 74, 0.22),
    inset 0 -1rem 2.5rem rgba(0, 0, 0, 0.28);
  text-shadow: 0 7px 20px rgba(255, 201, 74, 0.28);
}

.timer-page-face::before {
  position: absolute;
  inset: 8%;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.timer-page-face::after {
  position: absolute;
  top: 13%;
  left: 50%;
  width: 0.55rem;
  height: 0.55rem;
  content: "";
  background: #ffc94a;
  border-radius: 50%;
  box-shadow:
    0 0 0 0.22rem rgba(255, 201, 74, 0.2),
    0 0 24px rgba(255, 201, 74, 0.72);
  transform: translateX(-50%);
}

.timer-page-face.locked {
  animation: timerLock 0.65s ease both;
}

.timer-play-button {
  position: relative;
  z-index: 1;
  min-width: min(72vw, 14rem);
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ff315c, #b90022);
  border: 2px solid #ffd700;
  border-radius: 999px;
  box-shadow: 0 18px 34px rgba(227, 19, 72, 0.28);
}

.timer-play-button:disabled {
  opacity: 0.48;
  cursor: default;
  filter: grayscale(0.2);
}

.spin-form {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.spin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

#spin .spin-fields {
  grid-template-columns: 1fr;
}

.spin-fields label {
  position: relative;
  display: block;
}

.spin-fields label span {
  position: absolute;
  top: 0.34rem;
  left: 0.85rem;
  z-index: 1;
  color: #666;
  font-size: 0.68rem;
  font-weight: 700;
}

.spin-fields input {
  height: 3.15rem;
  padding-top: 1.25rem;
  color: #333;
  background: #fff;
  border: 0;
  border-radius: 8px;
}

.spin-fields input:focus {
  box-shadow: 0 0 0 2px #ffd700;
}

.btn-spin {
  width: 100%;
  min-height: 3.35rem;
  margin-top: 0.5rem;
  padding: 0.8rem;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(180deg, #b30000 0%, #800000 100%);
  border: 2px solid #ffd700;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.btn-spin:hover {
  color: #ffd700;
  background: linear-gradient(180deg, #d40000 0%, #a00000 100%);
  transform: scale(1.02);
}

.btn-spin.compact {
  width: auto;
  min-height: 2.65rem;
  margin-top: 0;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.uat-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 1.85rem;
  padding: 0.3rem 0.65rem;
  color: #25000a;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffe073, #ffc629);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(255, 198, 41, 0.22);
}

.uat-helper-panel,
.uat-result-panel {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.uat-helper-panel {
  padding: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
}

.uat-helper-panel strong,
.uat-history strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #ffd45a;
  font-size: 0.85rem;
}

.uat-helper-panel p {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.uat-result-card,
.uat-history {
  padding: 0.95rem;
  color: white;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 49, 92, 0.22), transparent 9rem),
    rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 215, 0, 0.42);
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.uat-result-card h3 {
  margin: 0.65rem 0 0.75rem;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.05;
}

.uat-result-card p {
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  line-height: 1.45;
}

.uat-result-grid {
  display: grid;
  grid-template-columns: minmax(6.5rem, 0.72fr) 1fr;
  gap: 0.42rem 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.uat-result-grid span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
}

.uat-result-grid strong {
  color: white;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.uat-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.uat-history {
  margin-top: 0.75rem;
  border-color: rgba(255, 255, 255, 0.18);
}

.uat-history-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  color: rgba(255, 255, 255, 0.86);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.uat-history-row small {
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
}

.spin-back-area {
  margin-top: 0.5rem;
  text-align: center;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
}

.btn-back:hover {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
  border-color: #ffd700;
}

@media (min-width: 992px) {
  .lucky-spin-card-inner {
    grid-template-columns: minmax(250px, 0.95fr) minmax(320px, 1fr);
    grid-template-areas:
      "wheel header"
      "wheel form"
      "wheel result"
      "wheel helper"
      "wheel back";
    column-gap: clamp(2rem, 5vw, 4rem);
    row-gap: clamp(0.65rem, 1.8vw, 1rem);
    text-align: left;
  }

  .spin-wheel-container {
    grid-area: wheel;
    width: min(31vw, 48dvh, 390px);
    margin: 0;
  }

  .spin-header-area {
    grid-area: header;
    text-align: left;
  }

  .spin-form {
    grid-area: form;
    max-width: none;
    margin: 0;
  }

  .uat-result-panel {
    grid-area: result;
    max-width: none;
    margin: 0;
  }

  .uat-helper-panel {
    grid-area: helper;
    max-width: none;
    margin: 0;
  }

  .spin-back-area {
    grid-area: back;
    text-align: left;
  }

  .box-page-card-inner {
    grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1fr);
    grid-template-areas:
      "boxes header"
      "boxes form"
      "boxes back";
  }

  .box-page-stage {
    grid-area: boxes;
  }

  .timer-page-card-inner {
    grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1fr);
    grid-template-areas:
      "timer header"
      "timer form"
      "timer back";
  }

  .timer-page-stage {
    grid-area: timer;
  }
}

.two-column {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(320px, 1.14fr);
  gap: 1rem;
}

.panel {
  padding: clamp(1rem, 2.8vw, 1.4rem);
  background:
    radial-gradient(circle at 100% 0%, rgba(98, 89, 205, 0.16), transparent 12rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(14, 16, 69, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading h2,
.mini-preview h3,
.sample-codes h3 {
  margin: 0.25rem 0 0;
  color: white;
  font-size: 1.45rem;
  line-height: 1.1;
}

.page-heading {
  margin: 1rem 0;
}

.stack,
.form-grid {
  display: grid;
  gap: 0.85rem;
}

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

label {
  display: grid;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.78rem 0.85rem;
  color: var(--light-text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  outline: 0;
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(244, 191, 69, 0.22);
}

.primary-btn,
.secondary-btn,
.icon-btn,
.admin-tab {
  min-height: 2.75rem;
  padding: 0.78rem 1rem;
  color: white;
  font-weight: 900;
  background: linear-gradient(180deg, #ff315c 0%, var(--crimson) 58%, var(--crimson-dark) 100%);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(214, 12, 62, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.secondary-btn {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  box-shadow: none;
}

.danger {
  color: var(--red);
}

.message {
  display: none;
  margin-top: 0.9rem;
  padding: 0.85rem;
  border-radius: 8px;
}

.message.show {
  display: block;
}

.message.success {
  color: #075338;
  background: #dcf8ec;
}

.message.error {
  color: #7a1f1f;
  background: #ffe5e5;
}

.sample-codes {
  margin-top: 1.2rem;
}

.code-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.code-pill {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.7rem;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.code-pill strong,
.code-pill small {
  display: block;
}

.code-pill small {
  color: var(--muted);
}

.game-stage {
  display: grid;
  min-height: 430px;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
    rgba(8, 10, 48, 0.45);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
}

.big-icon {
  display: grid;
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1rem;
  place-items: center;
  color: white;
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(145deg, #fa315b, #cf0b3b);
  border-radius: 19px;
}

.wheel-wrap {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.wheel-pointer {
  width: 0;
  height: 0;
  border-right: 1rem solid transparent;
  border-left: 1rem solid transparent;
  border-top: 1.8rem solid #f0225d;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.24));
}

.wheel {
  position: relative;
  container-type: inline-size;
  width: min(78vw, 18rem);
  aspect-ratio: 1;
  overflow: hidden;
  background: conic-gradient(from -18deg,
    #e8145a 0deg 36deg,
    #551a9b 36deg 72deg,
    #e8145a 72deg 108deg,
    #551a9b 108deg 144deg,
    #e8145a 144deg 180deg,
    #551a9b 180deg 216deg,
    #e8145a 216deg 252deg,
    #551a9b 252deg 288deg,
    #e8145a 288deg 324deg,
    #551a9b 324deg 360deg
  );
  border: 0.42rem solid #f7bd27;
  border-radius: 50%;
  box-shadow:
    0 20px 50px rgba(7, 19, 37, 0.22),
    inset 0 0 0 0.25rem #7b2a08,
    inset 0 0 0 0.46rem #ffd65f;
  transition: transform 3s cubic-bezier(0.13, 0.85, 0.16, 1);
}

.spin-page-wheel {
  width: 100%;
  max-width: none;
}

.wheel::before {
  position: absolute;
  inset: 0.45rem;
  z-index: 2;
  content: "";
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 1%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 79% 9%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 97% 35%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 97% 65%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 79% 91%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 50% 99%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 21% 91%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 3% 65%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 3% 35%, #ffe899 0 1.2%, transparent 1.35%),
    radial-gradient(circle at 21% 9%, #ffe899 0 1.2%, transparent 1.35%);
}

.wheel::after {
  position: absolute;
  inset: 42%;
  z-index: 4;
  content: "8";
  display: grid;
  place-items: center;
  color: #6b3304;
  font-size: 0;
  font-weight: 900;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75), transparent 18%),
    conic-gradient(#fff1a6, #d78605, #ffd45b, #9f5200, #fff1a6);
  border: 0.12rem solid #ffd65f;
  border-radius: 50%;
  box-shadow: 0 0 0 0.12rem rgba(84, 37, 3, 0.45), 0 5px 12px rgba(0, 0, 0, 0.24);
}

.wheel-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wheel-labels span {
  position: absolute;
  top: calc(50% + var(--label-y));
  left: calc(50% + var(--label-x));
  z-index: 3;
  display: grid;
  width: min(5rem, 27cqw);
  justify-items: center;
  gap: 0.05rem;
  color: white;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -50%) rotate(var(--label-rotate));
  transform-origin: center;
}

.wheel-labels strong {
  display: block;
  font-size: clamp(0.72rem, 7cqw, 2rem);
  letter-spacing: 0;
  line-height: 0.9;
}

.wheel-labels small {
  display: block;
  max-width: min(4.2rem, 22cqw);
  font-size: clamp(0.38rem, 2.8cqw, 0.72rem);
  font-weight: 800;
  line-height: 1.02;
}

.box-game {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.box-row {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}

.treasure-box {
  position: relative;
  width: 5.4rem;
  aspect-ratio: 1;
  background: linear-gradient(180deg, #ffcf61, #b86822);
  border: 0;
  border-bottom: 0.5rem solid #7a3f16;
  border-radius: 8px;
  box-shadow: 0 12px 22px rgba(79, 44, 13, 0.2);
  transform: translateY(0);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.treasure-box::before {
  position: absolute;
  inset: 12% 0 auto;
  height: 25%;
  content: "";
  background: #7a3f16;
}

.treasure-box span {
  position: absolute;
  inset: 18% auto auto 50%;
  width: 1rem;
  height: 1.4rem;
  background: var(--gold-2);
  border-radius: 4px;
  transform: translateX(-50%);
}

.treasure-box.open {
  transform: translateY(-0.8rem) rotate(-3deg);
  filter: drop-shadow(0 0 16px rgba(244, 191, 69, 0.55));
}

.timer-game {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.timer-face {
  display: grid;
  width: min(72vw, 16rem);
  aspect-ratio: 1;
  place-items: center;
  color: var(--gold);
  font-size: clamp(3rem, 16vw, 5.6rem);
  font-weight: 900;
  background: radial-gradient(circle, #172945, #071325);
  border: 0.5rem solid white;
  border-radius: 50%;
  box-shadow: 0 22px 44px rgba(7, 19, 37, 0.22);
}

.prize-reveal {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  padding: 1rem;
  text-align: center;
  animation: popIn 0.45s ease both;
}

.prize-icon {
  display: grid;
  width: 5rem;
  height: 5rem;
  place-items: center;
  font-size: 2.7rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.prize-reveal h3 {
  margin: 0;
  font-size: 1.7rem;
}

.prize-reveal p {
  margin: 0;
  color: var(--muted);
}

.result-summary {
  margin-top: 0.85rem;
}

.result-card {
  padding: 0.9rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mini-preview {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.mini-preview::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(120deg, transparent 28%, rgba(255, 255, 255, 0.12) 45%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
}

.mini-preview {
  position: relative;
  overflow: hidden;
}

.mini-preview:hover::after {
  transform: translateX(130%);
}

.mini-preview p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.45;
}

.preview-boxes .treasure-box {
  width: 4.2rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.admin-hero {
  position: relative;
  margin: 0 0 1rem;
  padding: clamp(1.1rem, 2.6vw, 1.6rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 201, 74, 0.22), transparent 14rem),
    radial-gradient(circle at 18% 10%, rgba(227, 19, 72, 0.24), transparent 15rem),
    linear-gradient(135deg, rgba(11, 13, 66, 0.94), rgba(22, 21, 89, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
}

.admin-hero h1 {
  max-width: 45rem;
  margin: 0.2rem 0 0.45rem;
  color: #fff;
  font-size: clamp(1.65rem, 4vw, 2.65rem);
  line-height: 1.02;
}

.admin-hero span {
  display: block;
  max-width: 45rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

.admin-sidebar {
  align-self: start;
  position: sticky;
  top: 5.8rem;
  display: grid;
  gap: 0.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(11, 13, 58, 0.9);
  border-radius: 14px;
}

.admin-sidebar h2 {
  margin: 0 0 0.5rem;
  color: white;
  font-size: 1.28rem;
}

.admin-tab {
  justify-content: flex-start;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.admin-tab.active {
  color: #10163a;
  background: linear-gradient(180deg, #ffe485, #ffc94a);
  border-color: rgba(255, 255, 255, 0.4);
}

.admin-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.admin-content {
  min-width: 0;
}

.admin-view {
  display: none;
}

.admin-view.active {
  display: grid;
  gap: 1rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.metric {
  min-height: 7rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 201, 74, 0.13), transparent 7rem),
    rgba(255, 255, 255, 0.075);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.metric span {
  display: block;
  color: #fff;
  font-size: 2.2rem;
  font-weight: 900;
}

.metric small {
  color: var(--muted);
  font-weight: 800;
}

.records {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.records.wide {
  grid-template-columns: 1fr;
}

.record {
  display: grid;
  gap: 0.72rem;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.045)),
    rgba(9, 10, 46, 0.74);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.admin-record {
  min-height: 8.2rem;
}

.record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.record h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
}

.record p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.record-meta span {
  min-height: 1.75rem;
  padding: 0.35rem 0.55rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.prize-thumb {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: rgba(255, 255, 255, 0.11);
  border-radius: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.75rem;
  padding: 0.22rem 0.5rem;
  color: #243047;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
  background: #edf2ff;
  border-radius: 999px;
}

.status.active,
.status.unused {
  color: #0f5132;
  background: #d7f7e5;
}

.status.paused,
.status.inactive {
  color: #5d4700;
  background: #fff1b8;
}

.status.claimed {
  color: #075338;
  background: #dcf8ec;
}

.status.expired,
.status.disabled {
  color: #7a1f1f;
  background: #ffe5e5;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.icon-btn {
  min-height: 2.2rem;
  padding: 0.45rem 0.65rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.table-like {
  display: grid;
  gap: 0.5rem;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.6rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.table-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#admin .panel {
  border-radius: 12px;
}

#admin .form-grid {
  align-items: end;
  gap: 0.7rem;
}

#admin label {
  gap: 0.34rem;
  font-size: 0.76rem;
}

#admin input,
#admin select {
  min-height: 2.55rem;
  border-radius: 9px;
}

#admin .primary-btn {
  min-height: 2.55rem;
  border-radius: 9px;
}

#admin .danger {
  margin-top: 0.45rem;
  color: #ffd7d7;
  background: rgba(217, 72, 72, 0.13);
  border-color: rgba(217, 72, 72, 0.38);
}

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

@keyframes chestPop {
  0% {
    transform: translateY(0) scale(1);
  }
  46% {
    transform: translateY(-0.85rem) scale(1.05);
  }
  100% {
    transform: translateY(-0.35rem) scale(1.02);
  }
}

@keyframes timerLock {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 0.35rem rgba(255, 215, 0, 0.2),
      0 28px 56px rgba(0, 0, 0, 0.34),
      inset 0 0 0 0.24rem rgba(255, 201, 74, 0.28);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 860px) {
  body {
    padding: 0.65rem;
  }

  .app-shell {
    border-radius: 16px;
  }

  .banner-container {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    margin: 6px 6px 0;
    padding: 1rem;
    border-radius: 13px;
    aspect-ratio: auto;
    min-height: 23rem;
    text-align: center;
  }

  .banner-copy p {
    margin-inline: auto;
  }

  .banner-copy h1,
  .banner-copy span {
    margin-inline: auto;
  }

  .banner-wheel-frame {
    width: min(58vw, 13.5rem);
    min-width: 10.5rem;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 1rem 1rem 0;
  }

  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    border-radius: 12px;
  }

  .nav-tabs a {
    text-align: center;
    border-radius: 7px;
  }

  .home-event-grid {
    grid-template-columns: 1fr;
  }

  .home-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    padding-top: 1.15rem;
    margin-bottom: 1.35rem;
  }

  .home-actions .btn-primary,
  .home-actions .btn-outline {
    width: 100%;
    min-width: 0;
    padding: 0.66rem 0.75rem;
  }

  .home-title {
    margin-bottom: 1.35rem;
  }

  .home-title img {
    max-height: 45px;
  }

  .home-title h1 {
    font-size: 1.55rem;
  }

  .home-event-card {
    min-height: 128px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.9rem;
    padding: 1rem;
    text-align: left;
    border-radius: 16px;
  }

  .event-icon {
    width: 54px;
    min-width: 54px;
    height: 54px;
    margin: 0;
    font-size: 2rem;
    border-radius: 16px;
  }

  .home-event-card h2 {
    margin: 0 0 0.22rem;
    font-size: 1rem;
  }

  .home-event-card p {
    font-size: 0.78rem;
  }

  .hero-band,
  .two-column,
  .game-grid,
  .admin-layout,
  .metric-grid,
  .records {
    grid-template-columns: 1fr;
  }

  .status-strip {
    min-width: 0;
  }

  .admin-sidebar {
    position: static;
    gap: 0.38rem;
  }

  .admin-tab {
    min-height: 2.35rem;
    padding: 0.55rem 0.7rem;
  }

  .admin-hero {
    padding: 1rem;
  }

  .admin-hero h1 {
    font-size: 1.55rem;
  }

  .admin-record {
    min-height: 0;
  }

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

  .game-stage {
    min-height: 360px;
  }

  main {
    padding: 0 1rem 1rem;
  }
}

@media (max-width: 700px) {
  body[data-current-view="spin"] .app-shell {
    min-height: 100dvh;
  }

  .lucky-spin-wrapper {
    align-items: stretch;
    padding: 0.55rem;
  }

  .lucky-spin-card {
    width: calc(100vw - 1.1rem);
    max-height: calc(100dvh - 1.1rem);
    padding: 0.9rem;
    border-radius: 16px;
  }

  .lucky-spin-card-inner {
    gap: 0.55rem;
  }

  .spin-header-area img {
    max-height: 42px;
    margin-bottom: 0.2rem;
  }

  .spin-header-area h2 {
    margin-bottom: 0.2rem;
    font-size: 2rem;
  }

  .spin-header-area p {
    max-width: 20rem;
    margin-inline: auto;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .spin-wheel-container {
    width: min(78vw, 34dvh, 315px);
    min-width: 180px;
    margin-block: 0.25rem;
  }

  .spin-page-wheel {
    border-width: 0.5rem;
  }

  .spin-wheel-pointer {
    top: -0.74rem;
    width: 1.75rem;
    height: 1.75rem;
  }

  .spin-wheel-pointer::before {
    width: 1.42rem;
    height: 1.42rem;
    border-width: 0.18rem;
  }

  .spin-wheel-pointer::after {
    top: 0.32rem;
    width: 0.42rem;
    height: 0.42rem;
  }

  .spin-form {
    max-width: 100%;
  }

  .spin-fields {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .spin-fields input {
    height: 2.85rem;
  }

  .btn-spin {
    min-height: 3rem;
    margin-top: 0.45rem;
    font-size: 1rem;
  }

  .spin-back-area {
    margin-top: 0.35rem;
  }

  .btn-back {
    min-height: 2.45rem;
    font-size: 0.82rem;
  }

  .box-page-stage {
    gap: 0.55rem;
    padding: 1.15rem 0.2rem 0.75rem;
  }

  .box-page-chest {
    width: min(27vw, 17dvh, 6.25rem);
    min-width: 4rem;
  }

  .box-page-chest.featured {
    transform: translateY(-0.2rem) scale(1.04);
  }

  .timer-page-stage {
    gap: 0.65rem;
    padding-block: 0.45rem;
  }

  .timer-page-face {
    width: min(68vw, 29dvh, 15rem);
    min-width: 11.5rem;
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .timer-play-button {
    min-height: 2.8rem;
    min-width: min(68vw, 12.5rem);
    font-size: 0.92rem;
  }
}

@media (max-height: 760px) {
  .lucky-spin-wrapper {
    padding-block: 0.45rem;
  }

  .lucky-spin-card {
    padding-block: 0.75rem;
  }

  .spin-header-area img {
    max-height: 40px;
  }

  .spin-header-area h2 {
    font-size: 1.9rem;
  }

  .spin-wheel-container {
    width: min(62vw, 34dvh, 330px);
  }

  .spin-fields input {
    height: 2.75rem;
  }

  .btn-spin {
    min-height: 2.9rem;
  }

  .btn-back {
    min-height: 2.35rem;
  }

  .box-page-stage {
    padding-block: 1rem 0.55rem;
  }

  .box-page-chest {
    width: min(18vw, 19dvh, 7rem);
  }

  .timer-page-face {
    width: min(27vw, 32dvh, 14.5rem);
    min-width: 10.5rem;
    font-size: clamp(2.8rem, 8vw, 4.8rem);
  }

  .timer-play-button {
    min-height: 2.65rem;
  }
}

@media (max-width: 440px) {
  main {
    padding-inline: 0.75rem;
  }

  .brand small {
    max-width: 68vw;
  }

  .nav-tabs a {
    padding-inline: 0.35rem;
    font-size: 0.82rem;
  }

  .box-row {
    gap: 0.45rem;
  }

  .treasure-box {
    width: 4.4rem;
  }

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

  .home-event-card {
    gap: 0.72rem;
  }

  .event-icon {
    width: 48px;
    min-width: 48px;
    height: 48px;
    font-size: 1.65rem;
  }

  .home-event-card h2 {
    font-size: 0.93rem;
  }

  .home-event-card p {
    font-size: 0.72rem;
  }
}
