:root {
  --bg: #07080d;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.04);
  --stroke: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.68);
  --gold: #f6d56a;
  --gold2: #d7b24f;
  --danger: #ff5d5d;
  --ok: #4ee6a1;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 20% 10%, rgba(246, 213, 106, 0.12), transparent 55%),
    radial-gradient(900px 520px at 90% 20%, rgba(123, 92, 255, 0.11), transparent 56%), var(--bg);
  overflow-x: hidden;
}

.title,
.subtitle {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bg-glow {
  position: fixed;
  inset: -30%;
  background: radial-gradient(circle at 30% 30%, rgba(246, 213, 106, 0.08), transparent 55%),
    radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.03), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

/* Announcement Banner */
.announcement-banner {
  background: linear-gradient(90deg, rgba(246, 213, 106, 0.22) 0%, rgba(123, 92, 255, 0.25) 100%);
  border-bottom: 1px solid rgba(246, 213, 106, 0.4);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  position: relative;
  z-index: 3;
  animation: slideDown 0.4s ease-out forwards;
}

.announcement-icon {
  font-size: 14px;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(7, 8, 13, 0.92), rgba(7, 8, 13, 0.6));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

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

.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #111;
  background: linear-gradient(135deg, var(--gold), #fff1b6);
  box-shadow: 0 10px 24px rgba(246, 213, 106, 0.22);
}

.title {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.2;
}

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

.stats {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Sound Toggle Button */
.soundToggleBtn {
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.soundToggleBtn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(246, 213, 106, 0.4);
  transform: translateY(-1px);
}

.soundToggleBtn:active {
  transform: scale(0.95);
}

.pill {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 100px;
  text-align: right;
}

.pillLabel {
  font-size: 11px;
  color: var(--muted);
}

.pillValue {
  font-weight: 800;
  margin-top: 2px;
}

.container {
  position: relative;
  z-index: 1;
  padding: 18px 14px 60px;
  max-width: 860px;
  margin: 0 auto;
}

.card {
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cardHeader {
  padding: 16px 16px 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cardTitle {
  font-weight: 800;
  font-size: 1.15rem;
}

.cardHint {
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 14px 16px;
}

@media (min-width: 520px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 18px 20px 20px;
  }
}

.boxBtn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 100%;
  outline: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.boxBtn:hover:not([disabled]) {
  transform: translateY(-4px) scale(1.02);
}

.boxBtn[disabled] {
  cursor: not-allowed;
  opacity: 0.75;
}

.box3d {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  perspective: 900px;
}

.boxCard {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  transform-style: preserve-3d;
  transition: transform 700ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.boxBtn.revealed .boxCard {
  transform: rotateY(180deg);
}

.face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  backface-visibility: hidden;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.front {
  background: radial-gradient(140px 140px at 30% 30%, rgba(246, 213, 106, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.frontInner {
  width: 76%;
  height: 76%;
  border-radius: 20px;
  border: 1px solid rgba(246, 213, 106, 0.4);
  background: radial-gradient(circle at 30% 30%, rgba(246, 213, 106, 0.18), transparent 55%);
  display: grid;
  place-items: center;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  position: relative;
}

.sparkle {
  position: absolute;
  inset: -30%;
  background: conic-gradient(from 90deg, transparent, rgba(246, 213, 106, 0.25), transparent);
  filter: blur(10px);
  animation: shimmer 2.6s linear infinite;
  opacity: 0.85;
}

@keyframes shimmer {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.mysteryIcon {
  position: relative;
  z-index: 1;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.back {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, rgba(246, 213, 106, 0.16), rgba(255, 255, 255, 0.04));
}

.result {
  text-align: center;
  padding: 14px;
}

.amount {
  font-size: 26px;
  font-weight: 900;
  color: var(--gold);
}

.tag {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.footerNote {
  padding: 12px 16px 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* Floating Live Recent Winners Social Proof Ticker */
.winners-ticker {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9;
  background: rgba(18, 18, 24, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(246, 213, 106, 0.28);
  border-radius: 9999px;
  padding: 8px 16px 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  max-width: calc(100vw - 40px);
  animation: tickerSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ticker-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
  flex-shrink: 0;
}

@keyframes pulseGreen {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes tickerSlideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ticker-content {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.9);
}

.ticker-highlight {
  font-weight: 700;
  color: var(--gold);
  margin-right: 4px;
}

/* Overlay & Modals */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
}

.hidden {
  display: none !important;
}

.loaderCard {
  width: min(420px, calc(100vw - 28px));
  border-radius: 18px;
  background: rgba(20, 20, 26, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--gold);
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loaderText {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.modalBackdrop {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  padding: 18px 14px;
}

.modal {
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  border-radius: 20px;
  background: rgba(18, 18, 24, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.modalTop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modalTitle {
  font-weight: 900;
  font-size: 1.15rem;
}

.iconBtn {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.iconBtn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.modalBody {
  padding: 18px;
}

.winAmount {
  font-size: 40px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.6px;
}

.winHint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.actionsRow {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  font-family: inherit;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--gold), #fff1b6);
  color: #111;
  border-color: rgba(246, 213, 106, 0.6);
  box-shadow: 0 4px 14px rgba(246, 213, 106, 0.25);
}

.btn.primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.03);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn.full {
  width: 100%;
}

.claimForm {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.95);
  outline: none;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  border-color: rgba(246, 213, 106, 0.6);
  box-shadow: 0 0 0 4px rgba(246, 213, 106, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.formNote {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  min-height: 16px;
}

.muted {
  color: var(--muted);
}

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

.ok {
  color: var(--ok);
}

/* Responsive */
@media (max-width: 480px) {
  .winners-ticker {
    left: 12px;
    bottom: 12px;
    padding: 6px 12px 6px 10px;
    font-size: 11px;
  }
  .topbar {
    padding: 12px 14px;
  }
}
