:root {
  --bg-deep: #071018;
  --bg-hero: #0b1a28;
  --navy: #0e2438;
  --accent: #d4a017;
  --accent-2: #2ec4b6;
  --cyan: #3de7d4;
  --text: #f3f6f9;
  --muted: #9bb0c3;
  --chart-bg: #e8f0e6;
  --chart-row: #dce8d9;
  --chart-header: #1a5f9e;
  --ink: #12202c;
  --danger: #e85d5d;
  --ok: #2f9e6a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font-display: "Rajdhani", "Segoe UI", sans-serif;
  --font-ui: "DM Sans", "Segoe UI", sans-serif;
  --safe-x: max(0.75rem, env(safe-area-inset-left));
  --safe-r: max(0.75rem, env(safe-area-inset-right));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  overflow-y: auto; /* page scrolls here only — no nested containers */
  /* Hide scrollbar chrome (still scrollable) — stops double-bar look in IDE/webview */
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: #0a0806;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
  overflow: visible;
}

body.is-booting {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(40, 28, 10, 0.55), rgba(6, 5, 4, 0.96)),
    #0a0806;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.boot-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
  padding: 1.25rem;
}

.boot-loader-card img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 0 0 2px rgba(255, 215, 100, 0.55), 0 12px 30px rgba(0, 0, 0, 0.45);
}

.boot-loader-card p {
  margin: 0;
  color: #ffe8a3;
  font-family: "Rajdhani", "DM Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.boot-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 215, 100, 0.2);
  border-top-color: #ffd76a;
  animation: bootSpin 0.75s linear infinite;
}

@keyframes bootSpin {
  to { transform: rotate(360deg); }
}

.reel.spinning .reel-strip {
  will-change: transform;
}

.reel.spinning {
  filter: contrast(1.05);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(8, 6, 4, 0.5) 0%, rgba(12, 8, 5, 0.28) 45%, rgba(8, 6, 4, 0.62) 100%),
    radial-gradient(ellipse at 50% 70%, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.45)),
    url("../images/casino-floor-bg.jpg") center 38% / cover no-repeat;
  background-color: #0b0907;
  color: var(--text);
  overflow: visible;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  box-sizing: border-box;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.35)),
    radial-gradient(ellipse at 50% 55%, transparent 30%, rgba(0, 0, 0, 0.35) 100%);
  z-index: 0;
  pointer-events: none;
}

/* Soft edge only — next section starts after full first screen */
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56px;
  background: linear-gradient(180deg, transparent, rgba(8, 6, 4, 0.55));
  z-index: 0;
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem var(--safe-x) 0.4rem var(--safe-r);
}

.locale-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
}

.locale-dubai {
  justify-self: start;
}

.locale-india {
  justify-self: end;
}

.flag-dubai,
.flag-india {
  width: 48px;
  height: 32px;
  max-width: none;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.28);
  margin: 0;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
  justify-self: center;
}

.brand-logo {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 215, 100, 0.55);
}

.brand-text {
  min-width: 0;
  text-align: left;
}

.brand-text h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(0.95rem, 3.8vw, 1.58rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffe566;
  text-shadow:
    0 0 8px rgba(255, 210, 50, 0.9),
    0 0 18px rgba(255, 150, 20, 0.55),
    0 1px 0 #fff4c2,
    0 2px 0 #8a4a00,
    0 3px 10px rgba(0, 0, 0, 0.75);
}

.brand-text p {
  margin: 0.12rem 0 0;
  color: #ffe8b0;
  font-size: clamp(0.52rem, 1.9vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 80, 80, 0.85);
  background: linear-gradient(180deg, rgba(220, 30, 30, 0.95), rgba(140, 0, 0, 0.92));
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(255, 200, 200, 0.25),
    0 0 12px rgba(255, 40, 40, 0.65),
    0 0 22px rgba(255, 0, 0, 0.35);
  animation: liveGlow 1.2s ease-in-out infinite;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.operate-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(40, 180, 120, 0.9);
  background: linear-gradient(180deg, rgba(30, 170, 110, 0.95), rgba(10, 100, 65, 0.95));
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(180, 255, 220, 0.25),
    0 0 12px rgba(40, 200, 120, 0.55),
    0 0 20px rgba(20, 160, 90, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.live-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 6px #fff,
    0 0 12px #ff4d4d;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

@keyframes liveGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 200, 200, 0.25),
      0 0 10px rgba(255, 40, 40, 0.55),
      0 0 18px rgba(255, 0, 0, 0.3);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(255, 220, 220, 0.45),
      0 0 18px rgba(255, 60, 60, 0.9),
      0 0 30px rgba(255, 0, 0, 0.55);
    filter: brightness(1.15);
  }
}

.clock-india,
.clock-dubai {
  font-family: "Rajdhani", "DM Sans", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
  white-space: nowrap;
  margin: 0;
  text-align: center;
  color: #ffe8a3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

@media (min-width: 768px) {
  .flag-dubai,
  .flag-india {
    width: 56px;
    height: 36px;
  }
  .brand-logo {
    width: 50px;
    height: 50px;
  }
  .brand-text h1 {
    font-size: 1.62rem;
  }
  .live-pill,
  .operate-pill {
    font-size: 0.7rem;
    padding: 0.32rem 0.65rem;
  }
}

.hero-stage {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  max-width: 100%;
  padding: 0.35rem var(--safe-x) 0.85rem var(--safe-r);
  overflow: visible;
}

/* ===== Photo slot machine (dynamic numbers over blank reel windows) ===== */
.slot-machine--photo {
  --gold: #e6b422;
  width: min(420px, 92vw);
  max-width: 100%;
  position: relative;
  z-index: 2;
  animation: boardIn 0.85s ease both;
  filter: drop-shadow(0 24px 36px rgba(0, 0, 0, 0.7));
  background: transparent;
  border: 0;
}

.slot-machine--photo::after {
  display: none;
}

.slot-frame-img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

.slot-refresh {
  position: absolute;
  left: 87.35%;
  top: 12.15%;
  width: 11.55%;
  aspect-ratio: 1;
  z-index: 12;
  margin: 0;
  padding: 0;
  border: 2px solid #f6d56a;
  border-radius: 50%;
  cursor: pointer;
  color: #ffe566;
  background:
    radial-gradient(circle at 32% 26%, #ff8a8a 0%, #e0222e 46%, #9a0008 78%, #5a0004 100%);
  box-shadow:
    0 0 0 1px rgba(80, 0, 0, 0.45),
    0 3px 10px rgba(0, 0, 0, 0.55),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    inset 0 -3px 6px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.slot-refresh svg {
  width: 58%;
  height: 58%;
  display: block;
}

.slot-refresh:hover {
  filter: brightness(1.08);
}

.slot-refresh:active {
  transform: scale(0.94);
}

/* Exact white pane from frame: ~27.5–72.5% x, ~32.5–63.5% y */
.reel-overlay {
  position: absolute;
  left: 28.5%;
  top: 37.5%;
  width: 43%;
  height: 24.5%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 5%;
  z-index: 5;
  --reel-h: 100%;
  --cell-h: 100%;
}

.slot-machine--photo .reel {
  flex: 1 1 0;
  width: auto;
  max-width: none;
  height: 100% !important;
  min-height: 0;
  border-radius: 10px;
  border: 2px solid #c9a227;
  background: #fff;
  box-sizing: border-box !important;
  overflow: hidden;
  box-shadow:
    inset 0 8px 14px rgba(0, 0, 0, 0.12),
    inset 0 -8px 14px rgba(0, 0, 0, 0.08);
}

.slot-machine--photo .reel-cell {
  height: var(--cell-h, 100%);
  min-height: var(--cell-h, 100%);
  font-size: clamp(2.4rem, 12vw, 3.8rem);
}

.slot-footer-overlay {
  position: absolute;
  left: 14%;
  top: 79.8%;
  width: 72%;
  height: 15.5%;
  transform: none;
  margin: 0;
  text-align: center;
  z-index: 8;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.1rem;
  overflow: visible;
}

.slot-footer-overlay .slot-status {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.78rem, 3.2vw, 1.05rem);
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  line-height: 1.05;
  color: #f4fbff;
  -webkit-text-stroke: 1.15px #f0c53a;
  paint-order: stroke fill;
  text-shadow:
    0 0 10px rgba(80, 200, 255, 0.55),
    0 2px 4px rgba(0, 0, 0, 0.85);
  opacity: 1;
  animation: declaredFlash 1.15s ease-in-out infinite;
}

.slot-footer-overlay .slot-meta {
  margin: 0;
  font-family: "Rajdhani", "DM Sans", sans-serif;
  font-size: clamp(0.68rem, 2.8vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #ffffff;
  -webkit-text-stroke: 1px #e6b422;
  paint-order: stroke fill;
  text-shadow:
    0 0 8px rgba(90, 210, 255, 0.45),
    0 2px 5px rgba(0, 0, 0, 0.8);
  opacity: 1;
  animation: metaShine 2.2s ease-in-out infinite;
}

.slot-footer-overlay .slot-result-num {
  display: inline-block;
  margin: 0 0.12em;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.55em;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 0.9;
  vertical-align: -0.08em;
  color: #ff1a1a;
  -webkit-text-stroke: 1.1px #ffe566;
  paint-order: stroke fill;
  text-shadow:
    0 0 8px rgba(255, 40, 40, 0.9),
    0 0 16px rgba(255, 80, 20, 0.55),
    0 2px 3px rgba(0, 0, 0, 0.75);
}

@keyframes declaredFlash {
  0%, 100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.35);
    transform: scale(1.06);
  }
}

@keyframes metaShine {
  0%, 100% {
    filter: brightness(1) drop-shadow(0 0 4px rgba(80, 200, 255, 0.35));
  }
  50% {
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(120, 230, 255, 0.7));
  }
}

.slot-footer-overlay strong {
  display: inline-block;
  margin-top: 0.18rem;
  padding: 0.28rem 0.95rem 0.26rem;
  border-radius: 999px;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.78rem, 3.4vw, 1.12rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.15;
  color: #fff7c4;
  background: linear-gradient(180deg, #7a3d00 0%, #3a1600 48%, #140800 100%);
  border: 1.6px solid #f0c44a;
  box-shadow:
    0 0 0 1px rgba(255, 180, 40, 0.35),
    0 0 18px rgba(255, 170, 30, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 240, 180, 0.35);
  text-shadow:
    0 0 8px rgba(255, 200, 50, 0.9),
    0 2px 0 #6a3a00;
}

.slot-machine--photo.is-win .slot-footer-overlay strong {
  animation: jodiPop 1.1s ease-in-out infinite;
}

.slot-footer-overlay strong:empty {
  display: none;
}

@keyframes jodiPop {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
    box-shadow:
      0 0 0 1px rgba(255, 120, 40, 0.35),
      0 0 18px rgba(255, 160, 40, 0.4),
      0 6px 18px rgba(0, 0, 0, 0.45);
  }
  50% {
    transform: scale(1.08);
    filter: brightness(1.25);
    box-shadow:
      0 0 0 2px rgba(255, 220, 100, 0.7),
      0 0 32px rgba(255, 80, 40, 0.75),
      0 0 48px rgba(255, 200, 40, 0.45),
      0 8px 22px rgba(0, 0, 0, 0.5);
  }
}

.slot-machine--photo.is-spinning .reel {
  box-shadow: 0 0 16px rgba(255, 200, 60, 0.55);
}

@media (max-width: 480px) {
  .slot-machine--photo {
    width: min(360px, 94vw);
  }
  .reel-overlay {
    left: 28%;
    top: 37.2%;
    width: 44%;
    height: 25%;
    gap: 4.5%;
  }
}

@media (min-width: 768px) {
  .slot-machine--photo {
    width: min(460px, 90vw);
  }
  .reel-overlay {
    left: 29%;
    top: 37.8%;
    width: 42%;
    height: 24%;
  }
}

@keyframes boardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.slot-marquee {
  background:
    radial-gradient(ellipse at 50% 30%, #ff3b3b 0%, #8b0000 55%, #4a0000 100%);
  border: 3px solid var(--gold);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow:
    inset 0 0 30px rgba(255, 215, 0, 0.25),
    0 0 0 2px #6b4a10;
  text-align: center;
  padding: 0.7rem 0.75rem 0.55rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.slot-title {
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: center;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 900;
  font-size: clamp(1.55rem, 7.5vw, 2.5rem);
  letter-spacing: 0.14em;
  color: #ffe566;
  text-shadow:
    0 2px 0 #8a6a00,
    0 0 18px rgba(255, 200, 40, 0.65),
    0 4px 12px rgba(0, 0, 0, 0.45);
}

.slot-brand-line {
  margin: 0.15rem 0 0;
  width: 100%;
  text-align: center;
  font-size: clamp(0.58rem, 2.4vw, 0.72rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffd7a0;
  opacity: 0.9;
  padding: 0 0.25rem;
  word-break: break-word;
}

.slot-body {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 0.35rem;
  align-items: stretch;
  background: linear-gradient(180deg, #f0c14b, #c9921a 40%, #8a6410);
  border-left: 3px solid #f5d76e;
  border-right: 3px solid #f5d76e;
  padding: 0.5rem 0.4rem;
  box-shadow: inset 0 0 0 2px #6b4a10;
}

.slot-side {
  background: linear-gradient(180deg, #2a1808, #140c06);
  border: 2px solid #e0b23a;
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #ffd76a;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  padding: 0.3rem 0.1rem;
  box-shadow: inset 0 0 12px rgba(0,0,0,.45);
}

.slot-side span {
  display: block;
}

.slot-window {
  background: linear-gradient(180deg, #1a120c, #0c0806);
  border: 3px solid #5c3d12;
  border-radius: 12px;
  padding: 0.45rem 0.35rem 0.55rem;
  position: relative;
  min-width: 0;
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.75),
    0 0 0 2px #e6b422;
}

.slot-status {
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffcf5a;
  margin-bottom: 0.1rem;
}

.slot-meta {
  text-align: center;
  font-size: 0.68rem;
  color: #c9b48a;
  margin-bottom: 0.35rem;
  min-height: 1em;
  word-break: break-word;
}

.reels {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  --reel-h: 88px;
  --cell-h: 88px;
}

.reel {
  width: min(32vw, 110px);
  flex: 1 1 0;
  max-width: 118px;
  height: var(--reel-h);
  box-sizing: content-box;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 3px solid #c9a227;
  box-shadow:
    inset 0 10px 18px rgba(0, 0, 0, 0.18),
    inset 0 -10px 18px rgba(0, 0, 0, 0.12),
    0 0 0 1px #7a5a14;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.reel::before,
.reel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22%;
  z-index: 2;
  pointer-events: none;
}

.reel::before {
  top: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.28), transparent);
}

.reel::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.28), transparent);
}

.reel-strip {
  will-change: transform;
  transition: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.reel-cell {
  height: var(--cell-h);
  min-height: var(--cell-h);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.2rem, 10vw, 4.2rem);
  color: #d41919;
  text-shadow:
    2px 2px 0 #3a0000,
    0 0 1px #000;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7f7f7 45%, #ececec 100%);
  border-bottom: 1px solid #ddd;
  line-height: 1;
  padding: 0;
  margin: 0;
}

.reel-cell.reel-dash {
  color: #9aa3ad;
  text-shadow: none;
  font-size: clamp(2.4rem, 11vw, 4.4rem);
}

/* Do NOT scale cells — breaks mobile reel alignment */
.reel.locked {
  animation: reelWinFlash 0.55s ease;
}

@keyframes reelWinFlash {
  0% { box-shadow: inset 0 0 0 2px #ffd76a, 0 0 22px rgba(255, 200, 60, 0.75); }
  100% { box-shadow: inset 0 10px 18px rgba(0, 0, 0, 0.18), 0 0 0 1px #7a5a14; }
}

.slot-machine.is-win .slot-marquee {
  animation: marqueeFlash 0.9s ease;
}

@keyframes marqueeFlash {
  0%, 100% { filter: brightness(1); }
  40% { filter: brightness(1.25); }
}

.slot-lever {
  display: none;
  position: absolute;
  right: -34px;
  top: 18%;
  width: 40px;
  height: 130px;
  pointer-events: none;
  z-index: 6;
}

/* Entire handle (stick + ball) rotates together from the hinge */
.lever-pivot {
  position: absolute;
  left: 10px;
  top: 0;
  width: 28px;
  height: 110px;
  transform-origin: 14px 8px;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lever-pivot::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f5d76e, #a67c00);
  border: 2px solid #6b4a10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.lever-stick {
  position: absolute;
  left: 11px;
  top: 10px;
  width: 7px;
  height: 72px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0d060, #d4af37 45%, #8a6a12);
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.35);
}

.lever-knob {
  position: absolute;
  left: 0;
  top: 72px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff7a7a, #c41212 55%, #7a0000);
  border: 2px solid #f0c14b;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  /* never animate knob alone — only parent .lever-pivot moves */
  transition: none !important;
}

.slot-machine.is-spinning .lever-pivot {
  transform: rotate(52deg);
}

.slot-machine:not(.is-spinning) .lever-pivot {
  transform: rotate(0deg);
}

.slot-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: linear-gradient(180deg, #f0c14b, #b8860b);
  border: 3px solid #f5d76e;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  padding: 0.5rem 0.55rem 0.6rem;
  color: #3b2200;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.62rem, 2.8vw, 0.78rem);
  letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 2px #6b4a10;
  text-align: center;
}

.slot-footer strong {
  font-weight: 900;
}

.main {
  position: relative;
  z-index: 1;
  padding: 1.25rem var(--safe-x) 2.25rem var(--safe-r);
  margin-top: 0;
  width: 100%;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(8, 6, 4, 0.72) 0%, rgba(10, 7, 5, 0.55) 40%, rgba(8, 6, 4, 0.78) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(212, 160, 23, 0.18), transparent 55%),
    url("../images/casino-floor-bg.jpg") center 20% / cover no-repeat;
  background-color: #0a0806;
  background-attachment: scroll;
}

.main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.45)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 215, 100, 0.015) 2px,
      rgba(255, 215, 100, 0.015) 3px
    );
}

.main > * {
  position: relative;
  z-index: 1;
}

.panel {
  max-width: 1100px;
  margin: 0 auto 1.15rem;
  padding: 1rem 0.95rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 215, 100, 0.45);
  background:
    linear-gradient(145deg, rgba(28, 18, 8, 0.88), rgba(12, 10, 8, 0.92)),
    radial-gradient(ellipse at 50% 0%, rgba(212, 160, 23, 0.22), transparent 60%);
  box-shadow:
    0 0 0 1px rgba(122, 90, 20, 0.55),
    0 18px 42px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 230, 150, 0.22);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -30%;
  width: 60%;
  height: 80%;
  background: linear-gradient(120deg, transparent, rgba(255, 230, 150, 0.12), transparent);
  transform: rotate(18deg);
  animation: panelShine 5.5s ease-in-out infinite;
  pointer-events: none;
}

.today-panel,
.chart-panel {
  position: relative;
}

@keyframes panelShine {
  0%, 100% { transform: translateX(-20%) rotate(18deg); opacity: 0.35; }
  50% { transform: translateX(140%) rotate(18deg); opacity: 0.85; }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
  flex-wrap: wrap;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 215, 100, 0.28);
}

.section-head h2 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.15rem, 4.2vw, 1.55rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe9a8;
  text-shadow:
    0 0 12px rgba(255, 200, 80, 0.45),
    0 2px 0 rgba(80, 50, 0, 0.55);
}

.section-head p {
  margin: 0;
  color: #f0d78a;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.today-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(48, 32, 12, 0.95), rgba(18, 14, 10, 0.98));
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 14px;
  padding: 0.8rem 0.65rem;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 150, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.today-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 230, 150, 0.14), transparent 70%);
  transform: translateX(-120%);
  animation: cardGlint 4.8s ease-in-out infinite;
  pointer-events: none;
}

.today-card:nth-child(2n)::after { animation-delay: 0.8s; }
.today-card:nth-child(3n)::after { animation-delay: 1.6s; }

@keyframes cardGlint {
  0%, 70%, 100% { transform: translateX(-120%); }
  85% { transform: translateX(120%); }
}

.today-card.is-open {
  border-color: #ffd76a;
  box-shadow:
    0 0 0 1px rgba(255, 215, 100, 0.55),
    0 0 22px rgba(255, 190, 40, 0.35),
    inset 0 1px 0 rgba(255, 240, 180, 0.35);
}

.today-card.just-opened {
  animation: cellFlash 1s ease;
}

.today-slot {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7ec8ff;
  text-shadow: 0 0 8px rgba(80, 180, 255, 0.35);
}

.today-time {
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f0d78a;
  opacity: 0.9;
}

.today-number {
  margin: 0.3rem 0 0.15rem;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.65rem, 6.2vw, 2.2rem);
  font-weight: 900;
  color: #ff3b3b;
  line-height: 1;
  text-shadow:
    0 0 10px rgba(255, 60, 60, 0.45),
    0 2px 0 rgba(60, 0, 0, 0.5);
}

.today-state {
  font-size: 0.72rem;
  color: #f0d78a;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.today-card.is-start {
  border-color: rgba(255, 215, 100, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 150, 0.12),
    0 6px 14px rgba(0, 0, 0, 0.3);
}

.today-card.is-start .today-number {
  color: #ffd76a;
  font-size: clamp(1.55rem, 6vw, 2rem);
  letter-spacing: 0.14em;
  font-weight: 800;
  text-shadow: 0 0 14px rgba(255, 210, 80, 0.55);
  animation: starPulse 1.6s ease-in-out infinite;
}

.today-card.is-start .today-state {
  color: #8a6a12;
  visibility: hidden;
}

@keyframes starPulse {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0d78a;
  margin-bottom: 0.3rem;
}

.field select {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(255, 215, 100, 0.4);
  background: rgba(12, 10, 8, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffd76a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") right 12px center/12px no-repeat;
  border-radius: 12px;
  padding: 0.7rem 2rem 0.7rem 0.8rem;
  font: inherit;
  font-size: 16px; /* prevent iOS zoom */
  color: #ffe9a8;
  min-height: 44px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.field select option {
  background: #1a120a;
  color: #ffe9a8;
}

.chart-hint {
  display: none;
  font-size: 0.75rem;
  color: #d4b56a;
  margin: -0.35rem 0 0.55rem;
}

.chart-wrap {
  overflow-x: auto;
  overflow-y: clip;
  border-radius: 14px;
  border: 1px solid rgba(255, 215, 100, 0.4);
  background: rgba(8, 6, 4, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(122, 90, 20, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.35);
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  touch-action: pan-x pan-y;
}

.chart {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  font-size: 0.82rem;
  color: #f5e6c0;
}

.chart th,
.chart td {
  border-right: 1px solid rgba(201, 162, 39, 0.22);
  border-bottom: 1px solid rgba(201, 162, 39, 0.22);
  text-align: center;
  padding: 0.55rem 0.3rem;
  min-width: 0;
  word-break: break-word;
}

.chart thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg, #8a6418, #5a4010);
  color: #fff8e0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  font-size: 0.68rem;
  line-height: 1.25;
  padding: 0.55rem 0.25rem;
}

.chart th.corner {
  left: 0;
  z-index: 4;
  width: 3.1rem;
  min-width: 3.1rem;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.chart th.slot-col {
  width: auto;
}

.chart th.slot-col .slot-time-head {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 248, 224, 0.85);
  text-transform: none;
}

.chart tbody th.day-col {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 3.1rem;
  min-width: 3.1rem;
  background: linear-gradient(90deg, #2a1c0c, #1a120a);
  color: #7ec8ff;
  font-weight: 800;
  text-align: center;
  padding: 0.55rem 0.25rem;
  white-space: nowrap;
  font-size: 0.85rem;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.25);
}

.chart tbody th.day-col.today-row {
  color: #ffd76a;
  text-shadow: 0 0 8px rgba(255, 210, 80, 0.45);
}

.chart tbody tr:nth-child(even) td {
  background: rgba(36, 24, 12, 0.92);
}

.chart tbody tr:nth-child(odd) td {
  background: rgba(22, 16, 10, 0.92);
}

.chart tbody tr.is-today td {
  background: rgba(80, 55, 12, 0.55) !important;
}

.chart td {
  font-weight: 700;
  color: #ffe9a8;
}

.chart td.today-col {
  box-shadow: inset 0 0 0 1px rgba(255, 215, 100, 0.45);
}

.chart td.cell-start {
  color: #ffd76a;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px rgba(255, 210, 80, 0.45);
}

@keyframes cellFlash {
  0% { background: rgba(255, 210, 80, 0.55) !important; transform: scale(1.08); }
  100% { transform: scale(1); }
}

.footer {
  text-align: center;
  padding: 0.5rem var(--safe-x) calc(1.5rem + env(safe-area-inset-bottom)) var(--safe-r);
  color: #c9b07a;
  font-size: 0.82rem;
  background:
    linear-gradient(180deg, rgba(8, 6, 4, 0.9), #0a0806),
    url("../images/casino-floor-bg.jpg") center bottom / cover no-repeat;
}

.footer a {
  color: #ffd76a;
  font-weight: 600;
}

.maintenance {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  color: var(--text);
  text-align: center;
  padding: 2rem var(--safe-x);
}

/* ---- Breakpoints ---- */
@media (max-width: 480px) {
  .brand-text h1 {
    font-size: 0.88rem;
    letter-spacing: 0.025em;
  }

  .chart-hint {
    display: block;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .slot-body {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .slot-side {
    display: none;
  }

  .reels {
    --reel-h: 96px;
    --cell-h: 96px;
  }

  .panel {
    border-radius: 14px;
    padding: 0.75rem;
  }

  .chart th.corner,
  .chart tbody th.day-col {
    width: 2.6rem;
    min-width: 2.6rem;
  }

  .chart thead th.slot-col {
    font-size: 0.58rem;
    padding: 0.45rem 0.15rem;
  }

}

@media (min-width: 600px) {
  .today-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .today-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  .reels {
    --reel-h: 100px;
    --cell-h: 100px;
  }

  .slot-side {
    font-size: 0.62rem;
  }
}

@media (min-width: 768px) {
  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .live-pill {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  .site-header {
    min-height: 100vh;
    min-height: 100dvh;
    background-position: center 35%;
  }

  .slot-marquee {
    border-width: 4px;
    border-radius: 28px 28px 0 0;
    padding: 0.85rem 1rem 0.7rem;
  }

  .slot-body {
    grid-template-columns: 52px 1fr 52px;
    gap: 0.45rem;
    border-left-width: 4px;
    border-right-width: 4px;
    padding: 0.65rem 0.55rem;
  }

  .slot-side {
    font-size: 0.72rem;
    border-radius: 10px;
  }

  .slot-lever {
    display: block;
  }

  .slot-footer {
    border-width: 4px;
    border-radius: 0 0 22px 22px;
    font-size: 0.78rem;
  }

  .reels {
    --reel-h: 108px;
    --cell-h: 108px;
    gap: 0.55rem;
  }

  .panel {
    padding: 1.15rem;
  }

  .chart {
    font-size: 0.9rem;
  }

  .chart th,
  .chart td {
    padding: 0.6rem 0.4rem;
  }

  .chart th.corner,
  .chart tbody th.day-col {
    width: 3.4rem;
    min-width: 3.4rem;
  }
}

@media (min-width: 900px) {
  .filters {
    grid-template-columns: 220px 220px;
  }

  .panel {
    padding: 1.4rem;
  }

  .reels {
    --reel-h: 124px;
    --cell-h: 124px;
  }

  .reel {
    width: 130px;
    flex: 0 0 130px;
  }

  .slot-side {
    font-size: 0.8rem;
  }
}

@media (min-width: 1100px) {
  .main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
