/* =====================================================
   FunArenaNigeria — Games CSS
   ===================================================== */

.game-page { background: var(--light-bg); }
.game-disclaimer-top {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: rgba(255,255,255,0.9);
  text-align: center; padding: 10px 24px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.3px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.game-disclaimer-top i { color: var(--accent-light); }

.game-main { min-height: calc(100vh - 80px); padding: 24px; }
.game-layout {
  max-width: 1300px; margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr 200px;
  gap: 24px; align-items: start;
}

/* ---- Sidebars ---- */
.game-sidebar, .game-sidebar-right {
  display: flex; flex-direction: column; gap: 14px;
}
.sidebar-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.sidebar-stat-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.sidebar-stat-icon i { font-size: 1.1rem; color: white; }
.win-icon { background: linear-gradient(135deg, #F5A623, #E8820C) !important; }
.spin-icon { background: linear-gradient(135deg, #1ABC9C, #16a085) !important; }
.streak-icon { background: linear-gradient(135deg, #E74C3C, #c0392b) !important; }
.sidebar-stat-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.sidebar-stat-value { font-size: 1.4rem; font-weight: 800; color: var(--text-dark); line-height: 1.2; }
.win-value { color: var(--accent-dark) !important; }
.sidebar-stat-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

.sidebar-paytable {
  background: white; border-radius: var(--radius-md);
  padding: 18px 16px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.sidebar-paytable h4 { font-size: 0.85rem; font-weight: 700; color: var(--text-dark); margin-bottom: 12px; text-align: center; }
.pay-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid var(--border-light);
  font-size: 0.8rem;
}
.pay-row:last-of-type { border-bottom: none; }
.pay-row span:first-child { font-size: 0.9rem; }
.pay-row span:last-child { font-weight: 700; color: var(--accent-dark); }
.pay-any span:first-child { font-size: 0.75rem; color: var(--text-muted); }
.paytable-note { font-size: 0.7rem; color: var(--text-muted); margin-top: 8px; text-align: center; }

/* ---- History ---- */
.history-header h3 {
  font-size: 0.85rem; font-weight: 700; color: var(--text-dark);
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.history-header h3 i { color: var(--primary); }
.spin-history { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; }
.history-item {
  background: white; border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  animation: slideInRight 0.3s ease;
}
.hist-symbols { font-size: 1rem; letter-spacing: 2px; }
.hist-win { font-weight: 700; font-size: 0.78rem; }
.hist-big { border-left: 3px solid var(--accent); }
.hist-big .hist-win { color: var(--accent-dark); }
.hist-small { border-left: 3px solid #27AE60; }
.hist-small .hist-win { color: #27AE60; }
.hist-miss .hist-win { color: var(--text-muted); }
.responsible-hint {
  background: #fff8f0; border: 1px solid #fde8c8;
  border-radius: var(--radius-sm); padding: 14px;
  font-size: 0.78rem; text-align: center;
}
.responsible-hint i { color: #e74c3c; margin-bottom: 6px; font-size: 1rem; }
.responsible-hint p { color: var(--text-muted); margin-bottom: 8px; }
.responsible-hint a { color: var(--primary); font-weight: 700; }

/* ---- Machine ---- */
.game-center { position: relative; }
.machine-wrap {
  background: linear-gradient(160deg, #1a0533 0%, #3d0f7a 50%, #1a0533 100%);
  border-radius: 28px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(90,24,154,0.45), 0 0 0 2px rgba(245,166,35,0.3);
  overflow: hidden;
  border: 2px solid rgba(245,166,35,0.4);
}

/* Machine Top Lights */
.machine-top {
  display: flex; align-items: center;
  padding: 16px 20px 0;
  gap: 12px;
}
.machine-lights { display: flex; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; }
.ml {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  animation: blink 1s ease infinite;
  box-shadow: 0 0 8px var(--accent);
}
.ml:nth-child(odd) { animation-delay: 0.5s; }
.ml1 { background: #ff4444; box-shadow: 0 0 8px #ff4444; }
.ml2 { background: #44ff44; box-shadow: 0 0 8px #44ff44; }
.ml3 { background: #4444ff; box-shadow: 0 0 8px #4444ff; }
.ml4 { background: #FFD700; box-shadow: 0 0 8px #FFD700; }
.ml5 { background: #ff44ff; box-shadow: 0 0 8px #ff44ff; }
.ml6 { background: #44ffff; box-shadow: 0 0 8px #44ffff; }
.ml7 { background: #ff8844; box-shadow: 0 0 8px #ff8844; }
.ml8 { background: #88ff44; box-shadow: 0 0 8px #88ff44; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.machine-title-area { flex: 1; text-align: center; }
.machine-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent-light); margin-bottom: 2px; text-shadow: 0 0 20px rgba(255,215,0,0.5); }
.machine-subtitle { font-size: 0.72rem; color: rgba(255,255,255,0.5); letter-spacing: 1px; }

/* Win Message */
.win-message {
  text-align: center; padding: 12px 24px;
  font-size: 1.05rem; font-weight: 700;
  min-height: 48px; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
  margin: 12px 20px 0;
  border-radius: var(--radius-sm);
}
.win-idle { color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.05); font-weight: 400; }
.win-spinning { color: var(--accent-light); background: rgba(245,166,35,0.1); animation: pulse 0.5s ease infinite; }
.win-big {
  color: var(--accent-light); font-size: 1.2rem;
  background: rgba(245,166,35,0.15);
  border: 1px solid rgba(245,166,35,0.4);
  animation: winPulse 0.4s ease 3;
}
.win-small { color: #4eff9a; background: rgba(78,255,154,0.08); }
.win-miss { color: rgba(255,255,255,0.4); background: transparent; }
@keyframes winPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.04)} }

/* Reels */
.reels-frame {
  margin: 16px 20px;
  background: #0d0627;
  border-radius: 16px;
  border: 2px solid rgba(245,166,35,0.4);
  padding: 8px;
  position: relative;
  overflow: hidden;
}
.reels-container {
  display: flex; align-items: center; gap: 0;
  height: 270px;
}
.reel-wrap {
  flex: 1; height: 270px;
  overflow: hidden; position: relative;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.6) 100%);
}
.reel {
  width: 100%; height: 270px;
  overflow: hidden; position: relative;
}
.reel-inner {
  position: absolute; top: 0; left: 0; right: 0;
  will-change: transform;
}
.reel-cell {
  height: 90px; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; line-height: 1;
  user-select: none;
}
.result-cell { background: rgba(245,166,35,0.05); }
.reel-divider { width: 4px; background: rgba(245,166,35,0.3); height: 200px; flex-shrink: 0; align-self: center; border-radius: 2px; }

/* Win line */
.win-line {
  position: absolute; top: 50%; left: 0; right: 0;
  height: 3px; background: transparent;
  transform: translateY(-50%);
  transition: background 0.3s ease;
  pointer-events: none;
}
.win-line-active {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 20px var(--accent);
  animation: winLineFlash 0.3s ease 4;
}
@keyframes winLineFlash { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* Bet Controls */
.bet-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; gap: 16px; flex-wrap: wrap;
}
.bet-group { display: flex; flex-direction: column; gap: 10px; }
.bet-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.bet-adjuster { display: flex; align-items: center; gap: 12px; }
.bet-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: white; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.bet-btn:hover { background: rgba(245,166,35,0.25); border-color: var(--accent); }
.bet-display {
  min-width: 80px; text-align: center;
  font-size: 1.2rem; font-weight: 800; color: var(--accent-light);
  background: rgba(245,166,35,0.1); border: 1px solid rgba(245,166,35,0.3);
  border-radius: var(--radius-sm); padding: 6px 14px;
}
.bet-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.bet-preset {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75); padding: 5px 12px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 600; transition: var(--transition);
}
.bet-preset:hover { background: rgba(245,166,35,0.2); border-color: var(--accent); color: var(--accent-light); }

.spin-group { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.btn-spin {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: none; color: white;
  width: 110px; height: 110px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 6px 24px rgba(245,166,35,0.5);
  transition: var(--transition);
  font-weight: 900;
}
.btn-spin:hover:not(:disabled) { transform: scale(1.06); box-shadow: 0 10px 36px rgba(245,166,35,0.65); }
.btn-spin:active:not(:disabled) { transform: scale(0.96); }
.btn-spin:disabled { opacity: 0.6; cursor: not-allowed; }
.spin-btn-icon { font-size: 1.5rem; }
.spin-btn-text { font-size: 0.9rem; letter-spacing: 1px; }

.btn-max-bet, .btn-auto-spin {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8); padding: 7px 18px;
  border-radius: 50px; font-size: 0.8rem; font-weight: 600;
  transition: var(--transition); width: 100%;
}
.btn-max-bet:hover { background: rgba(245,166,35,0.2); border-color: var(--accent); color: var(--accent-light); }
.btn-auto-spin:hover, .auto-active {
  background: rgba(228,40,40,0.25) !important;
  border-color: #ff4444 !important; color: #ff8888 !important;
}

/* Machine Bottom */
.machine-bottom-bar {
  background: rgba(0,0,0,0.4);
  display: flex; justify-content: center; gap: 32px;
  padding: 12px 20px;
}
.mb-item { font-size: 0.75rem; color: rgba(255,255,255,0.45); display: flex; align-items: center; gap: 6px; }
.mb-item i { color: var(--accent); opacity: 0.7; }

/* Celebration */
.win-celebration {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 10;
}
.confetti-piece {
  position: absolute; top: 0; border-radius: 3px;
  animation: confettiFall ease-out forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* =====================================================
   FORTUNE WHEEL GAME
   ===================================================== */
.wheel-page { background: var(--light-bg); }
.wheel-main { padding: 24px; min-height: calc(100vh - 80px); }
.wheel-layout {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: 240px 1fr;
  gap: 28px; align-items: start;
}

.wheel-game-area { display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* Wheel Canvas Wrap */
.wheel-canvas-wrap {
  position: relative; display: inline-block;
}
.wheel-canvas-container {
  position: relative; width: 380px; height: 380px;
}
#wheelCanvas { border-radius: 50%; display: block; }
.wheel-pointer {
  position: absolute; top: -16px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 30px solid var(--accent);
  filter: drop-shadow(0 4px 8px rgba(245,166,35,0.6));
  z-index: 10;
}
.wheel-outer-ring {
  position: absolute; inset: -12px;
  border-radius: 50%;
  border: 4px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--primary), var(--accent)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
}
.wheel-glow-ring {
  position: absolute; inset: -8px;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(245,166,35,0.4), 0 0 60px rgba(123,47,190,0.3);
  border: 2px solid rgba(245,166,35,0.2);
}

/* Wheel Stats */
.wheel-stats { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; width: 100%; }
.wheel-stat {
  background: white; border-radius: var(--radius-md);
  padding: 16px 20px; text-align: center; min-width: 110px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
  flex: 1;
}
.wheel-stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.wheel-stat-val { font-size: 1.3rem; font-weight: 800; color: var(--text-dark); }
.wheel-stat-val.highlight { color: var(--accent-dark); }

/* Spin Wheel Button */
.btn-spin-wheel {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none;
  padding: 18px 56px; border-radius: 50px;
  font-size: 1.15rem; font-weight: 800; letter-spacing: 1px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 28px rgba(123,47,190,0.45);
  transition: var(--transition);
}
.btn-spin-wheel:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(123,47,190,0.55); }
.btn-spin-wheel:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-spin-wheel i { font-size: 1.2rem; }

/* Wheel Result */
.wheel-result-msg {
  min-height: 52px; text-align: center;
  font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--radius-sm);
  transition: all 0.3s ease; width: 100%;
}
.wheel-result-msg.idle { color: var(--text-muted); background: var(--light-bg); font-weight: 400; }
.wheel-result-msg.spinning { color: var(--primary); background: var(--light-bg); animation: pulse 0.5s ease infinite; }
.wheel-result-msg.win { color: var(--accent-dark); background: #fff8e6; border: 1px solid rgba(245,166,35,0.3); animation: winPulse 0.4s ease 3; }
.wheel-result-msg.miss { color: var(--text-muted); background: var(--light-bg); }

/* Wheel Sidebar */
.wheel-sidebar { display: flex; flex-direction: column; gap: 14px; }
.segments-list { background: white; border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.segments-list h4 { font-size: 0.85rem; font-weight: 700; color: var(--text-dark); margin-bottom: 14px; }
.seg-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-light); }
.seg-item:last-child { border-bottom: none; }
.seg-color { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.seg-name { flex: 1; font-size: 0.85rem; color: var(--text-body); }
.seg-mult { font-size: 0.85rem; font-weight: 700; color: var(--accent-dark); }

/* Spin cost */
.spin-cost-display {
  background: white; border-radius: var(--radius-md);
  padding: 16px; text-align: center;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.spin-cost-display .label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.spin-cost-display .amount { font-size: 1.4rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.spin-cost-display .sub { font-size: 0.72rem; color: var(--text-muted); }

/* ===== RESPONSIVE GAMES ===== */
@media (max-width: 1100px) {
  .game-layout { grid-template-columns: 180px 1fr; }
  .game-sidebar-right { display: none; }
}
@media (max-width: 768px) {
  .game-layout { grid-template-columns: 1fr; }
  .game-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
  .sidebar-paytable { grid-column: 1 / -1; }
  .reels-container { height: 200px; }
  .reel-wrap, .reel { height: 200px; }
  .reel-cell { height: 66px; font-size: 2.2rem; }
  .btn-spin { width: 90px; height: 90px; }
  .bet-controls { flex-direction: column; align-items: center; }
  .spin-group { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .wheel-layout { grid-template-columns: 1fr; }
  .wheel-canvas-container { width: 300px; height: 300px; }
  .wheel-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
}
@media (max-width: 480px) {
  .game-sidebar { grid-template-columns: repeat(2, 1fr); }
  .reels-container { height: 160px; }
  .reel-wrap, .reel { height: 160px; }
  .reel-cell { height: 53px; font-size: 1.8rem; }
  .machine-top { flex-wrap: wrap; justify-content: center; }
  .machine-lights { justify-content: center; }
}
