/* ============================================
   GG Media Hub - Slot Machine MVP
   Futuristic Neon Tech Design System
   ============================================ */

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

/* --- CSS Variables --- */
:root {
  --cyan: #00f0ff;
  --cyan-dim: rgba(0, 240, 255, 0.4);
  --cyan-glow: rgba(0, 240, 255, 0.6);
  --purple: #b44dff;
  --purple-dim: rgba(180, 77, 255, 0.4);
  --purple-glow: rgba(157, 78, 221, 0.6);
  --green-main: #00ff88;
  --green-glow: rgba(0, 255, 136, 0.5);
  --gold-light: #FFD700;
  --gold-main: #DAA520;
  --gold-dark: #B8860B;
  --gold-shine: #FFF8DC;
  --red-light: #FF4444;
  --bg-deep: #0a0a1a;
  --bg-dark: #0d0f1e;
  --bg-card: #111122;
  --bg-surface: #161630;
  --bg-metallic: linear-gradient(180deg, #1a1a2e 0%, #16162a 50%, #0f0f20 100%);
  --border-neon: 1px solid rgba(0, 240, 255, 0.3);
  --shadow-cyan: 0 0 20px rgba(0, 240, 255, 0.35);
  --shadow-purple: 0 0 20px rgba(180, 77, 255, 0.3);
  --font-main: 'Rajdhani', sans-serif;
  --font-display: 'Orbitron', sans-serif;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background: var(--bg-deep);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  color: #e0e0f0;
}

/* Animated grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridScroll 20s linear infinite;
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, var(--bg-deep) 100%);
  z-index: 0;
  pointer-events: none;
}

@keyframes gridScroll {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

/* --- Background Particles --- */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: floatParticle linear infinite;
  opacity: 0;
}

.particle--gold {
  background: radial-gradient(circle, var(--cyan), transparent);
}

.particle--pink {
  background: radial-gradient(circle, var(--purple), transparent);
}

.particle--red {
  background: radial-gradient(circle, var(--green-main), transparent);
}

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-20vh) rotate(720deg);
    opacity: 0;
  }
}

/* --- Main Game Container --- */
.game-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  position: relative;
  padding: 40px 10px;
  margin: auto 0;
}

/* --- Header Media (video container, replaces dragon-header) --- */
.dragon-header,
.header-media {
  width: 100%;
  position: relative;
  z-index: 10;
  margin-bottom: -60px; /* pull slot machine up to blend */
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.dragon-header img,
.header-media img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 21px;
}

.header-media video,
.dragon-header video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7) saturate(0.8);
  transition: filter 0.5s ease, opacity 0.5s ease;
}

/* Gradient fade at the bottom to blend into the slot frame */
.header-media::after,
.dragon-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, var(--bg-deep) 0%, rgba(10, 10, 26, 0.8) 30%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* --- Machine Wrapper (combines video and slot) --- */
.machine-wrapper {
  width: 100%;
  position: relative;
  background: var(--bg-metallic);
  border-radius: 16px;
  border: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow:
    0 0 30px rgba(0, 240, 255, 0.15),
    0 10px 40px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

/* Animated rotating neon border gradient */
.machine-wrapper::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    var(--cyan) 0%,
    var(--purple) 25%,
    var(--green-main) 50%,
    var(--cyan) 75%,
    var(--purple) 100%
  );
  z-index: -1;
  opacity: 0.6;
  animation: rotateBorder 4s linear infinite;
  filter: blur(3px);
}

.machine-wrapper.playing {
  box-shadow: 0 0 30px var(--cyan-dim);
}

.machine-wrapper.active {
  border: 2px solid var(--cyan);
  box-shadow:
    inset 0 0 40px rgba(0, 240, 255, 0.3),
    0 0 40px rgba(0, 240, 255, 0.3);
  animation: headerPulse 1.5s ease-in-out infinite alternate;
}

/* Playing state: video is brighter and glows */
.header-media.playing video,
.dragon-header.playing video {
  filter: brightness(1.1) saturate(1.3);
}

/* Active state: intense glow during spins */
.header-media.active,
.dragon-header.active {
  filter: drop-shadow(0 0 25px var(--cyan-glow));
}

.header-media.active video,
.dragon-header.active video {
  filter: brightness(1.3) saturate(1.5) contrast(1.1);
}

@keyframes headerPulse {
  0% { box-shadow: inset 0 0 40px rgba(0, 240, 255, 0.2), 0 0 30px rgba(0, 240, 255, 0.2); }
  100% { box-shadow: inset 0 0 60px rgba(0, 240, 255, 0.4), 0 0 50px rgba(0, 240, 255, 0.4); }
}

/* --- Slot Machine Frame --- */
.slot-frame {
  width: 100%;
  border-radius: 0 0 16px 16px; /* only round bottom corners since it's merged */
  padding: 6px;
  position: relative;
  z-index: 20; /* Overlap the video header */
  margin-top: 49px;
  margin-bottom: -42px;
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotateBorder {
  to { --border-angle: 360deg; }
}

/* Fallback for browsers that don't support @property */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .slot-frame::before {
    background: linear-gradient(135deg, var(--cyan), var(--purple), var(--green-main), var(--cyan));
    background-size: 300% 300%;
    animation: gradientShift 4s ease infinite;
  }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.slot-frame-inner {
  background: linear-gradient(180deg, #12122a 0%, #181838 20%, #14142c 50%, #181838 80%, #12122a 100%);
  border-radius: 12px;
  padding: 8px;
  position: relative;
  border: 1px solid rgba(0, 240, 255, 0.1);
}

/* --- Ornamental Side Pillars (Tech indicators) --- */
.slot-body {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  border-radius: 12px;
  z-index: 1; /* Ensure symbols render above background */
}

.slot-body::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 140%;
  background: var(--slot-bg, transparent) center/100% 100% no-repeat;
  z-index: -1;
  pointer-events: none;
}

.pillar {
  width: 32px;
  min-width: 32px;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0;
  position: relative;
  box-shadow: none;
  border: none;
}

.pillar-number {
  color: var(--cyan);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-shadow: 0 0 8px var(--cyan-glow), 0 0 2px rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 1;
  line-height: 1;
}

/* --- Reels Container --- */
.reels-container {
  flex: 1;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 0;
  box-shadow: none;
  position: relative;
  /* Removed border because the image already has glowing borders */
}

/* Scanline overlay on reels */
.reels-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 240, 255, 0.02) 2px,
    rgba(0, 240, 255, 0.02) 4px
  );
  z-index: 5;
  pointer-events: none;
  border-radius: 10px;
}

/* --- Individual Reel --- */
.reel {
  position: relative;
  overflow: hidden;
  height: 330px;
  background: transparent;
}

.reel-strip {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.reel-strip.spinning {
  transition: none;
}

/* --- Symbol Cell --- */
.symbol-cell {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  position: relative;
  background: transparent;
}

.symbol-cell img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Winning symbol highlight - neon electric effect */
.symbol-cell.winning img {
  transform: scale(1.1);
  filter:
    drop-shadow(0 0 15px var(--cyan-glow))
    drop-shadow(0 0 30px rgba(0, 240, 255, 0.3));
  animation: winPulse 0.6s ease-in-out infinite alternate;
}

.symbol-cell.winning::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.symbol-cell.winning::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2px solid var(--cyan);
  border-radius: 8px;
  animation: winBorder 1s ease-in-out infinite;
  pointer-events: none;
}

@keyframes winPulse {
  from { transform: scale(1.05); }
  to { transform: scale(1.15); }
}

@keyframes winBorder {
  0%, 100% {
    box-shadow: 0 0 5px var(--cyan), inset 0 0 5px rgba(0, 240, 255, 0.15);
    border-color: var(--cyan);
  }
  50% {
    box-shadow: 0 0 25px var(--cyan), inset 0 0 15px rgba(0, 240, 255, 0.25);
    border-color: var(--purple);
  }
}

/* --- Spin Button Area --- */
.spin-area {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0 10px;
  position: relative;
  z-index: 30;
}

/* Metallic bar behind spin button removed */

.spin-btn {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--cyan);
  background: radial-gradient(circle at 35% 35%, #1a3a5c, #0d1f3a, #081428);
  cursor: pointer;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 25px rgba(0, 240, 255, 0.4),
    0 0 50px rgba(0, 240, 255, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(0, 240, 255, 0.15),
    inset 0 -3px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  -webkit-user-select: none;
  user-select: none;
  animation: btnPulse 3s ease-in-out infinite;
}

/* Custom Image Spin Button Modifier */
.spin-btn.has-image {
  width: auto;
  min-width: 200px;
  height: 70px;
  border-radius: 12px;
  border: none;
  background-color: transparent;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none; /* Removed the previous glow */
  animation: none;
  overflow: hidden; /* Required to contain the shine effect */
}

/* The shine effect */
.spin-btn.has-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: shine 3s infinite;
  pointer-events: none; /* So it doesn't block clicks */
}

.spin-btn.has-image svg {
  display: none; /* Hide default icon */
}

.spin-btn.has-image:hover {
  transform: scale(1.03);
  box-shadow: none;
  background-color: transparent;
}

.spin-btn.has-image:active {
  transform: scale(0.97);
}

.spin-btn.has-image:disabled {
  opacity: 0.6;
  box-shadow: none;
}
.spin-btn.has-image:disabled::after {
  display: none; /* Stop shining if disabled */
}

@keyframes shine {
  0% {
    left: -150%;
  }
  20% {
    left: 200%; /* Move fast across */
  }
  100% {
    left: 200%; /* Wait before next shine */
  }
}

@keyframes btnPulse {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(0, 240, 255, 0.3),
      0 0 40px rgba(0, 240, 255, 0.1),
      0 6px 20px rgba(0, 0, 0, 0.5),
      inset 0 2px 4px rgba(0, 240, 255, 0.1),
      inset 0 -3px 6px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 30px rgba(0, 240, 255, 0.5),
      0 0 60px rgba(0, 240, 255, 0.2),
      0 6px 20px rgba(0, 0, 0, 0.5),
      inset 0 2px 4px rgba(0, 240, 255, 0.2),
      inset 0 -3px 6px rgba(0, 0, 0, 0.3);
  }
}

.spin-btn:hover {
  transform: scale(1.08);
  border-color: #fff;
  box-shadow:
    0 0 40px rgba(0, 240, 255, 0.7),
    0 0 80px rgba(0, 240, 255, 0.3),
    0 6px 25px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(0, 240, 255, 0.3);
  animation: none;
}

.spin-btn:active {
  transform: scale(0.95);
  box-shadow:
    0 0 15px rgba(0, 240, 255, 0.3),
    0 2px 10px rgba(0, 0, 0, 0.5),
    inset 0 3px 8px rgba(0, 0, 0, 0.4);
  animation: none;
}

.spin-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  animation: none;
  border-color: rgba(0, 240, 255, 0.2);
}

/* Spinning state - rotating icon */
.spin-btn.spinning .spin-icon {
  animation: spinIcon 0.8s linear infinite;
}

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

/* Spin icon */
.spin-icon {
  width: 44px;
  height: 44px;
  position: relative;
  transition: transform 0.15s ease;
}

.spin-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px var(--cyan-glow)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Tech ornaments on the bar sides */
.spin-ornament {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  z-index: 1;
}

.spin-ornament--left {
  left: 12%;
}

.spin-ornament--right {
  right: 12%;
}

.spin-ornament svg {
  width: 100%;
  height: 100%;
  fill: var(--cyan);
  opacity: 0.5;
  filter: drop-shadow(0 0 6px var(--cyan-dim));
}

/* --- Prize Modal Overlay --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 20, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: linear-gradient(145deg, #0d0d2b, #161640, #0d0d2b);
  border: 2px solid rgba(0, 240, 255, 0.4);
  border-radius: 24px;
  padding: 40px 30px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.7) translateY(30px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 0 60px rgba(0, 240, 255, 0.2),
    0 0 120px rgba(180, 77, 255, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

/* Holographic shimmer overlay */
.modal::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(0, 240, 255, 0.04),
    transparent,
    rgba(180, 77, 255, 0.06),
    transparent,
    rgba(0, 255, 136, 0.04),
    transparent
  );
  animation: modalShimmer 6s linear infinite;
  pointer-events: none;
}

/* Scanline overlay on modal */
.modal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 240, 255, 0.015) 3px,
    rgba(0, 240, 255, 0.015) 6px
  );
  pointer-events: none;
  border-radius: 24px;
  z-index: 0;
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 8px;
  text-shadow: 0 0 20px var(--cyan-glow);
  position: relative;
  z-index: 1;
}

.modal-prize-icon {
  font-size: 4rem;
  margin: 16px 0;
  animation: prizeFloat 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes prizeFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.05); }
}

.modal-prize-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.modal-prize-desc {
  font-size: 1rem;
  color: rgba(200, 200, 230, 0.7);
  margin-bottom: 28px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.modal-btn {
  background: linear-gradient(135deg, var(--cyan), #0099cc, #006699);
  border: none;
  border-radius: 30px;
  padding: 14px 40px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.3), 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.5), 0 6px 25px rgba(0, 0, 0, 0.5);
}

.modal-btn:active {
  transform: translateY(0);
}

/* --- Celebration Confetti Canvas --- */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* --- Win Line Flash --- */
.win-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), #fff, var(--cyan), transparent);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 10px var(--cyan-glow), 0 0 20px rgba(0, 240, 255, 0.2);
}

.win-line.active {
  animation: winLineFlash 0.8s ease-in-out 3;
}

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

.win-line--row0 { top: 55px; }
.win-line--row1 { top: 165px; }
.win-line--row2 { top: 275px; }

/* --- Loading Screen --- */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.6s ease;
}

/* Scanline overlay on loading */
.loading-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 240, 255, 0.02) 2px,
    rgba(0, 240, 255, 0.02) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(0, 240, 255, 0.1);
  border-top-color: var(--cyan);
  border-right-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2), inset 0 0 20px rgba(180, 77, 255, 0.1);
  position: relative;
  z-index: 2;
}

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

.loading-text {
  font-family: var(--font-display);
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 15px var(--cyan-glow);
  position: relative;
  z-index: 2;
}

/* --- Player Registration Screen --- */
.register-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

/* Animated grid on register screen */
.register-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.register-card {
  background: rgba(14, 14, 40, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 24px;
  padding: 40px 30px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow:
    0 0 60px rgba(0, 240, 255, 0.1),
    0 0 100px rgba(180, 77, 255, 0.05),
    0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

/* Scanline overlay on register card */
.register-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 240, 255, 0.01) 3px,
    rgba(0, 240, 255, 0.01) 6px
  );
  pointer-events: none;
  border-radius: 24px;
  z-index: 0;
}

.register-logo {
  font-size: 4rem;
  margin-bottom: 8px;
  animation: prizeFloat 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.register-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 8px;
  text-shadow: 0 0 25px var(--cyan-glow);
  position: relative;
  z-index: 1;
}

.register-subtitle {
  color: rgba(200, 200, 230, 0.6);
  font-size: 0.95rem;
  margin-bottom: 28px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
  position: relative;
  z-index: 1;
}

.form-group label {
  display: block;
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.03);
  color: #e0e0f0;
  font-family: var(--font-main);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.form-group input::placeholder {
  color: rgba(200, 200, 230, 0.25);
}

.form-group input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15), inset 0 0 10px rgba(0, 240, 255, 0.05);
  background: rgba(0, 240, 255, 0.05);
}

.register-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), #0099cc);
  color: #0a0a1a;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3), 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  z-index: 1;
}

.register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 45px rgba(0, 240, 255, 0.5), 0 6px 30px rgba(0, 0, 0, 0.5);
}

.register-btn:active {
  transform: translateY(0);
}

.register-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.register-error {
  color: #ff4466;
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 20px;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 10px rgba(255, 68, 102, 0.3);
}

/* --- Responsive --- */
@media (max-width: 440px) {
  .game-container {
    padding: 6px;
  }

  .reel {
    height: 280px;
  }

  .symbol-cell {
    height: 93px;
  }

  .spin-btn {
    width: 76px;
    height: 76px;
  }

  .spin-icon {
    width: 36px;
    height: 36px;
  }

  .pillar {
    width: 26px;
    min-width: 26px;
  }

  .pillar-number {
    font-size: 10px;
  }
}

@media (max-height: 700px) {
  .dragon-header,
  .header-media {
    margin-bottom: -50px;
  }

  .reel {
    height: 240px;
  }

  .symbol-cell {
    height: 80px;
  }

  .spin-btn {
    width: 70px;
    height: 70px;
  }
}

@media (min-width: 768px) {
  .game-container {
    max-width: 460px;
  }

  .reel {
    height: 370px;
  }

  .symbol-cell {
    height: 123px;
  }

  .spin-btn {
    width: 100px;
    height: 100px;
  }

  .spin-icon {
    width: 50px;
    height: 50px;
  }
}
