/* ═══════════════════════════════════════
   FORGE CASINO — Game Lobby
   ═══════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #06060a;
  --bg2:      #0e0e1a;
  --bg3:      #141428;
  --red:      #e63946;
  --gold:     #ffd60a;
  --teal:     #06d6a0;
  --border:   rgba(255, 255, 255, 0.08);
  --text:     #e0e0ff;
  --dim:      rgba(255, 255, 255, 0.28);
  --font-d:   'Orbitron', 'Courier New', monospace;
  --font-m:   'Share Tech Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-m);
  min-height: 100vh;
}

/* ─── HEADER ─── */
.casino-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 110px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Back tile — looks like a main-page icon */
.back-tile {
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  background: #0b0b12;
  text-decoration: none;
  color: var(--dim);
  transition: color 0.15s, border-color 0.15s, filter 0.15s;
  font-family: var(--font-m);
  flex-shrink: 0;
}
.back-tile:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.35);
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.2));
}
.back-tile .b-icon { font-size: 1.4rem; }
.back-tile .b-label {
  font-size: 0.42rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Neon sign */
.header-center { text-align: center; }

.neon-sign {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-d);
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 3.8rem);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.neon-word {
  color: #fff;
  text-shadow:
    0 0 7px #fff,
    0 0 14px #fff,
    0 0 28px var(--red),
    0 0 56px var(--red),
    0 0 90px var(--red);
}

.neon-word.flicker {
  color: var(--red);
  animation: neon-flicker 4s infinite;
}

@keyframes neon-flicker {
  0%, 17%, 21%, 100% {
    text-shadow:
      0 0 7px #fff,
      0 0 14px #fff,
      0 0 28px var(--red),
      0 0 56px var(--red),
      0 0 90px var(--red);
    color: var(--red);
  }
  18%, 20% {
    text-shadow: none;
    color: rgba(230, 57, 70, 0.35);
  }
  51%, 55% {
    text-shadow:
      0 0 7px #fff,
      0 0 14px #fff,
      0 0 28px var(--red),
      0 0 56px var(--red);
    color: var(--red);
  }
  52%, 54% {
    text-shadow: none;
    color: rgba(230, 57, 70, 0.5);
  }
}

.header-sub {
  font-size: 0.55rem;
  letter-spacing: 0.5em;
  color: var(--dim);
  text-transform: uppercase;
}

/* Header right stat */
.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  text-align: center;
  flex-shrink: 0;
  background: rgba(230, 57, 70, 0.05);
}
.stat-num {
  font-family: var(--font-d);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--red);
  text-shadow: 0 0 12px var(--red);
  line-height: 1;
}
.stat-label {
  font-size: 0.38rem;
  letter-spacing: 0.15em;
  color: var(--dim);
  text-transform: uppercase;
  line-height: 1.4;
  margin-top: 2px;
}

/* ─── MAIN ─── */
.casino-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ─── SECTION ─── */
.game-section { margin-bottom: 4rem; }

.section-header { margin-bottom: 2rem; }

.section-title {
  font-family: var(--font-d);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.section-title .t-icon { font-size: 1.3em; }

.section-sub {
  font-size: 0.52rem;
  letter-spacing: 0.4em;
  color: var(--dim);
  text-transform: uppercase;
}

/* ─── GAME GRID ─── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

/* ─── GAME CARD ─── */
.game-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-7px);
  border-color: var(--gc, rgba(255,255,255,0.3));
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px var(--gc, transparent);
}

/* Colored accent bar at top */
.card-top-bar {
  height: 3px;
  background: var(--gc, rgba(255,255,255,0.2));
  flex-shrink: 0;
  transition: height 0.18s ease;
}
.game-card:hover .card-top-bar { height: 4px; }

/* ─── CARD THUMBNAIL ─── */
.card-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Subtle grid in thumbnail */
.card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

/* Big emoji thumbnail for table games */
.emoji-thumb {
  font-size: 4.5rem;
  position: relative;
  z-index: 1;
  animation: emoji-pulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 14px var(--gc, rgba(255,255,255,0.3)));
}

@keyframes emoji-pulse {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 10px var(--gc, rgba(255,255,255,0.2))); }
  50%       { transform: scale(1.06); filter: drop-shadow(0 0 24px var(--gc, rgba(255,255,255,0.5))); }
}

/* ─── SLOT PREVIEW REELS ─── */
.slot-preview {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Winning-line overlay */
.slot-preview::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, var(--gc, rgba(255,255,255,0.4)), transparent);
  pointer-events: none;
  opacity: 0.5;
}

.reel {
  width: 60px;
  height: 60px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.6);
  position: relative;
  flex-shrink: 0;
}

/* Top/bottom fade on reel */
.reel::before,
.reel::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 14px;
  z-index: 2;
  pointer-events: none;
}
.reel::before { top: 0;    background: linear-gradient(to bottom, rgba(20,20,40,0.95), transparent); }
.reel::after  { bottom: 0; background: linear-gradient(to top,   rgba(20,20,40,0.95), transparent); }

.reel-inner {
  display: flex;
  flex-direction: column;
  animation: reel-spin var(--spd, 2s) linear infinite;
}

/* Speed up reels on card hover */
.game-card:hover .reel-inner {
  animation-duration: calc(var(--spd, 2s) * 0.35);
}

.rs {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
}

@keyframes reel-spin {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* ─── CARD BODY ─── */
.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.card-name {
  font-family: var(--font-d);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #fff;
}

.card-desc {
  font-size: 0.52rem;
  line-height: 1.6;
  color: var(--dim);
  letter-spacing: 0.04em;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  font-size: 0.32rem;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}

/* ─── PLAY BUTTON ─── */
.play-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 0.6rem 1rem;
  font-family: var(--font-d);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: filter 0.15s, box-shadow 0.15s;
  margin-top: auto;
  cursor: pointer;
  user-select: none;
}

.play-btn.live {
  background: var(--gc, var(--red));
  color: #fff;
  border: none;
}
.play-btn.live:hover {
  filter: brightness(1.2);
  box-shadow: 0 0 20px var(--gc, var(--red));
}

.play-btn.disabled {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── FOOTER ─── */
.casino-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
}
.footer-left {
  font-size: 0.48rem;
  letter-spacing: 0.2em;
  color: var(--dim);
}
.footer-left a {
  color: var(--dim);
  text-decoration: none;
}
.footer-left a:hover { color: #fff; }

.footer-right {
  font-size: 0.45rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.15);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .casino-header { height: auto; padding: 1rem; flex-wrap: wrap; gap: 1rem; }
  .stat-chip { display: none; }
  .neon-sign { font-size: 1.8rem; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .card-thumb { height: 130px; }
  .reel { width: 46px; height: 46px; }
  .rs  { width: 46px; height: 46px; font-size: 1.3rem; }
  .slot-preview { gap: 5px; padding: 8px; }
}
