:root {
  /* Theme Colors - Cyber Gold & Neon Palette */
  --bg: #050505;
  --text: #ffffff;
  --text-muted: #a1a1aa;

  --gold: #FFD700;
  --gold-dim: #B8860B;
  --neon-purple: #bc13fe;
  --neon-blue: #00f3ff;
  --neon-glow: 0 0 15px rgba(188, 19, 254, 0.6);

  --green: #4ade80;

  /* UI Elements */
  --glass: rgba(10, 10, 10, 0.7);
  --border: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(20, 20, 25, 0.6);

  /* Typography */
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Poppins', sans-serif;

  /* Dimensions */
  --top-height: 70px;
  --bottom-height: 70px;
  --radius: 20px;

  /* Safe Areas */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  padding-top: calc(var(--top-height) + var(--safe-top));
  padding-bottom: calc(var(--bottom-height) + 20px + var(--safe-bottom));
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* --- 3D Background --- */
#canvas-container {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Gradient overlay via CSS for better text contrast */
  background: radial-gradient(circle at center, #1a0b2e 0%, #000000 100%);
}

/* --- HEADER --- */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--top-height) + var(--safe-top));
  padding-top: var(--safe-top);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 14px;
  padding-right: 14px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255,215,0,0.5));
}

.brand-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 10px var(--neon-purple);
  letter-spacing: 1px;
}

.top-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid var(--gold);
  padding: 6px 12px;
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

.status-dot {
  width: 8px; height: 8px;
  background-color: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  margin-bottom: 24px;
  padding-top: 20px;
}

h1.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 4rem);
  line-height: 0.9;
  text-transform: uppercase;
  margin-bottom: 16px;
  /* Text Gradient Animation */
  background: linear-gradient(to right, #fff, var(--gold), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shineText 3s linear infinite;
  filter: drop-shadow(0 0 15px rgba(188, 19, 254, 0.5));
}

@keyframes shineText {
  to { background-position: 200% center; }
}

.hero-desc {
  font-size: 0.95rem;
  color: #ddd;
  margin-bottom: 24px;
  line-height: 1.6;
  text-shadow: 0 1px 2px black;
}

/* --- Buttons --- */
.cta-wrapper {
  display: flex; gap: 12px;
  margin-bottom: 32px;
}

.btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  height: 54px;
  border-radius: 30px; /* More rounded */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 1px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.95); }

.btn-primary {
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-dim));
  background-size: 200% auto;
  color: #000;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  animation: btnShine 3s linear infinite;
  border: none;
}

@keyframes btnShine {
  to { background-position: 200% center; }
}

.btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--neon-purple);
  color: var(--neon-purple);
  box-shadow: 0 0 10px rgba(188, 19, 254, 0.2);
}

/* --- JACKPOT DISPLAY (New Feature) --- */
.jackpot-display {
  background: rgba(0,0,0,0.6);
  border: 4px solid var(--gold);
  border-radius: 55px;
  padding: 15px 38px;
  margin-bottom: 20px;
  display: inline-block;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}
.jackpot-label {
  font-size: 0.7rem;
  color: var(--neon-blue);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.jackpot-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold);
}

/* --- Marquee --- */
.marquee-container {
  width: 100%;
  background: linear-gradient(90deg, rgba(188, 19, 254, 0.2), rgba(0, 243, 255, 0.2));
  border: 1px solid var(--neon-purple);
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 30px;
  backdrop-filter: blur(5px);
  border-radius: 10px;
}
.marquee-content {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  text-shadow: 0 0 5px var(--neon-purple);
  animation: scroll-left 20s linear infinite;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- Games Grid --- */
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
  text-shadow: 0 0 10px var(--neon-blue);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  background: var(--gold);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--gold);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding-bottom: 20px;
}

.game-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1.2; /* Maintained ratio */
  display: flex; flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: white;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(5px);
}

.card-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  z-index: 1;
}

.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,1) 10%, rgba(0,0,0,0.2) 60%, transparent 100%);
  z-index: 2;
}

.card-info {
  position: relative;
  z-index: 3;
  padding: 14px;
  margin-top: auto;
}

.card-provider {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--neon-blue);
  font-weight: 700;
  margin-bottom: 2px;
  display: block;
}

.card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.1;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px black;
}

.rtp-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--gold);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

.rtp-dot {
  width: 6px; height: 6px;
  background-color: #0f0;
  border-radius: 50%;
  box-shadow: 0 0 8px #0f0;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

@media (hover: hover) {
  .game-card:hover .card-img { transform: scale(1.15); }
  .game-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-purple);
    box-shadow: 0 10px 30px rgba(188, 19, 254, 0.3);
  }
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--bottom-height) + var(--safe-bottom));
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 215, 0, 0.3);
  display: flex; justify-content: space-around;
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}

.nav-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1;
  height: 100%;
  color: #666;
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 700;
  transition: all 0.3s;
  position: relative;
}

.nav-link svg {
  width: 24px; height: 24px;
  margin-bottom: 4px;
  fill: currentColor;
  transition: transform 0.3s;
}

.nav-link.active { color: var(--gold); text-shadow: 0 0 8px var(--gold); }
.nav-link.active svg { transform: translateY(-2px) scale(1.1); filter: drop-shadow(0 0 5px var(--gold)); }
.nav-link:active svg { transform: scale(0.9); }

/* --- Live Feed Widget (New) --- */
.live-feed {
  position: fixed;
  bottom: 90px;
  left: 10px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 260px;
  pointer-events: none;
}

.feed-item {
  background: rgba(0, 0, 0, 0.8);
  border-left: 3px solid var(--gold);
  padding: 8px 12px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  animation: slideInFeed 0.5s ease-out;
}

.winner-icon { color: var(--gold); }
.game-name { color: var(--neon-purple); font-weight: 700; }

@keyframes slideInFeed {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOutFeed {
  to { opacity: 0; transform: translateY(-10px); }
}

@media (min-width: 600px) {
  .live-feed { left: 20px; bottom: 100px; width: 300px; }
}

.info-banner {
  margin: 30px 0;
  background: linear-gradient(135deg, rgba(188,19,254,0.1), rgba(251,191,36,0.1));
  border: 1px dashed var(--gold);
  padding: 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  text-align: center;
  color: #eee;
}
