/**
 * CoinRush Jackpot - Rich Modern Theme
 * Features: orbs, particles, glowing effects, premium footer
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --bg-base: #0a0f0c;
  --bg-card: #0d1410;
  --bg-card-light: #151f1a;
  --bg-input: rgba(0, 0, 0, 0.4);
  
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-dim: rgba(255, 255, 255, 0.3);
  
  --green: #22c55e;
  --green-dark: #16a34a;
  --green-dim: rgba(34, 197, 94, 0.15);
  --green-glow: rgba(34, 197, 94, 0.4);
  
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  
  --gold: #ffd700;
  --gold-glow: rgba(255, 215, 0, 0.4);
  
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ============================================
   APP LAYOUT
   ============================================ */
.jackpot-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-base) 0%, #050807 100%);
  position: relative;
  overflow: hidden;
}

/* ============================================
   FLOATING ORBS BACKGROUND
   ============================================ */
.jp-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.jp-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float-orb 20s ease-in-out infinite;
}

.jp-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.3) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.jp-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
  top: 50%;
  right: -100px;
  animation-delay: -5s;
}

.jp-orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
  bottom: -100px;
  left: 30%;
  animation-delay: -10s;
}

.jp-orb-4 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.25) 0%, transparent 70%);
  top: 30%;
  left: 20%;
  animation-delay: -15s;
}

.jp-orb-5 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
  top: 60%;
  left: 60%;
  animation-delay: -8s;
}

.jp-orb-6 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  bottom: 20%;
  right: 20%;
  animation-delay: -12s;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 30px) scale(1.02); }
}

/* ============================================
   FLOATING PARTICLES
   ============================================ */
.jp-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.jp-particle {
  position: absolute;
  left: var(--x);
  bottom: -10px;
  width: var(--size);
  height: var(--size);
  background: rgba(34, 197, 94, 0.6);
  border-radius: 50%;
  animation: rise var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

@keyframes rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) scale(0.5);
    opacity: 0;
  }
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.app-main {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 20px;
  padding-top: 84px; /* 64px navbar + 20px spacing */
}

.app-layout {
  display: grid;
  grid-template-columns: 340px 1fr 320px;
  gap: 28px;
  max-width: 1650px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .app-layout {
    grid-template-columns: 320px 1fr;
  }
  .sidebar-right { display: none; }
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .sidebar-left { order: 2; }
  .main-content { order: 1; }
  
  .app-main {
    padding: 16px;
    padding-top: 80px;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ============================================
   PANEL (Card) STYLES
   ============================================ */
.panel {
  background: linear-gradient(165deg, rgba(16, 24, 20, 0.98) 0%, rgba(10, 15, 12, 0.99) 100%);
  border: 1px solid rgba(91, 255, 178, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 255, 178, 0.3), transparent);
  pointer-events: none;
}

.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.02) 0%, transparent 40%);
  pointer-events: none;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.panel-title .panel-icon {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.panel-title .panel-icon svg {
  width: 100%;
  height: 100%;
}

.panel-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

.balance-label {
  color: var(--text-muted);
}

.balance-value {
  color: var(--green);
  font-weight: 600;
}

.panel-badge {
  background: var(--green-dim);
  color: var(--green);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.panel-body {
  padding: 20px;
  position: relative;
}

/* ============================================
   BET PANEL
   ============================================ */
.bet-panel.locked .panel-body {
  opacity: 0.5;
  pointer-events: none;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 10;
  backdrop-filter: blur(4px);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.lock-icon {
  width: 24px;
  height: 24px;
  color: var(--green);
}

.lock-icon svg {
  width: 100%;
  height: 100%;
}

.error-message {
  background: var(--red-dim);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.bet-section-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.preset-btn:hover {
  border-color: var(--green);
  background: var(--green-dim);
}

.preset-btn.selected {
  border-color: var(--green);
  background: var(--green-dim);
  box-shadow: 0 0 12px var(--green-glow);
}

.preset-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.preset-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.bet-divider {
  text-align: center;
  margin: 16px 0;
  position: relative;
}

.bet-divider::before,
.bet-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: var(--border);
}

.bet-divider::before { left: 0; }
.bet-divider::after { right: 0; }

.bet-divider span {
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 0 12px;
  background: var(--bg-card);
}

.custom-input-row {
  margin-bottom: 16px;
}

.custom-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: border-color 0.2s;
}

.custom-input-wrapper:focus-within {
  border-color: var(--green);
}

.input-prefix,
.input-suffix {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.custom-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 10px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.custom-input::placeholder {
  color: var(--text-dim);
}

.bet-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.bet-stat {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
}

.deposit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px var(--green-glow);
}

.deposit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--green-glow);
}

.deposit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.deposit-btn.loading {
  pointer-events: none;
}

.deposit-icon {
  width: 18px;
  height: 18px;
}

.deposit-icon svg {
  width: 100%;
  height: 100%;
}

.btn-loading {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

.btn-loading svg {
  width: 100%;
  height: 100%;
}

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

/* ============================================
   PARTICIPANTS LIST
   ============================================ */
.participants-list {
  max-height: 400px;
  overflow-y: auto;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.empty-icon {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.empty-icon svg {
  width: 100%;
  height: 100%;
}

.participant-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.participant-row:hover {
  background: rgba(91, 255, 178, 0.03);
  margin: 0 -20px;
  padding: 14px 20px;
}

.participant-row:last-child {
  border-bottom: none;
}

.participant-row.current-user {
  background: rgba(91, 255, 178, 0.08);
  border: 1px solid rgba(91, 255, 178, 0.2);
  margin: 0 -20px;
  padding: 14px 20px;
  border-radius: 12px;
}

.participant-rank {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 24px;
}

.participant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.participant-info {
  flex: 1;
  min-width: 0;
}

.participant-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.participant-bet {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.participant-chance {
  font-weight: 700;
  font-size: 0.9rem;
}

/* ============================================
   HISTORY PANEL
   ============================================ */
.history-list {
  max-height: 250px;
  overflow-y: auto;
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.history-row:last-child {
  border-bottom: none;
}

.history-winner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-crown {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.history-crown svg {
  width: 100%;
  height: 100%;
}

.history-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.history-details {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
}

.history-amount {
  color: var(--green);
  font-weight: 600;
}

.history-chance {
  color: var(--text-muted);
}

/* ============================================
   JACKPOT BET PANEL - Premium Design
   ============================================ */
.jp-create-panel {
  background: linear-gradient(165deg, rgba(12, 18, 15, 0.99) 0%, rgba(8, 12, 10, 1) 100%);
  border: 1px solid rgba(91, 255, 178, 0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
}

.jp-create-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, rgba(91, 255, 178, 0.6) 50%, transparent 95%);
}

.jp-create-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: radial-gradient(ellipse at center top, rgba(91, 255, 178, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.jp-create-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 1;
}

.jp-create-panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.jp-create-panel__icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(91, 255, 178, 0.15) 0%, rgba(91, 255, 178, 0.05) 100%);
  border: 1px solid rgba(91, 255, 178, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5bffb2;
}

.jp-create-panel__icon svg {
  width: 16px;
  height: 16px;
}

.jp-create-panel__balance {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(91, 255, 178, 0.15);
  border-radius: 10px;
}

.jp-balance-value {
  color: #5bffb2;
  font-size: 15px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.jp-balance-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 500;
}

.jp-create-panel__content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.jp-panel-locked {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.jp-lock-icon {
  color: #5bffb2;
  width: 24px;
  height: 24px;
}

.jp-lock-icon svg {
  width: 100%;
  height: 100%;
}

.jp-lock-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.jp-create-panel__error {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  font-size: 12px;
  color: #fca5a5;
}

/* Amount Input */
.jp-amount-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.jp-amount-input {
  position: relative;
}

.jp-amount-input input {
  width: 100%;
  padding: 18px 20px;
  padding-right: 85px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jp-amount-input input:focus {
  border-color: rgba(91, 255, 178, 0.5);
  box-shadow: 
    0 0 0 4px rgba(91, 255, 178, 0.08),
    inset 0 0 20px rgba(91, 255, 178, 0.03);
  background: rgba(0, 0, 0, 0.6);
}

.jp-amount-input input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

/* Has value state */
.jp-amount-input.has-value input {
  border-color: rgba(91, 255, 178, 0.4);
  background: linear-gradient(135deg, rgba(91, 255, 178, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);
  box-shadow: 
    0 0 0 4px rgba(91, 255, 178, 0.06),
    inset 0 0 30px rgba(91, 255, 178, 0.04);
}

.jp-amount-suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.jp-amount-suffix img {
  width: 20px;
  height: 20px;
  opacity: 0.6;
}

.jp-amount-suffix span {
  color: rgba(255, 255, 255, 0.35);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.jp-amount-input.has-value .jp-amount-suffix span {
  color: rgba(91, 255, 178, 0.8);
}

/* Preset Buttons */
.jp-amount-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  gap: 10px;
}

.jp-preset-btn {
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.jp-preset-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(91, 255, 178, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.25s;
}

.jp-preset-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(91, 255, 178, 0.3);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.jp-preset-btn:hover:not(:disabled)::before {
  opacity: 1;
}

.jp-preset-btn:active:not(:disabled) {
  transform: scale(0.96) translateY(0);
}

.jp-preset-btn.active {
  background: linear-gradient(135deg, rgba(91, 255, 178, 0.18) 0%, rgba(91, 255, 178, 0.08) 100%);
  border-color: rgba(91, 255, 178, 0.5);
  color: #5bffb2;
  box-shadow: 
    0 0 20px rgba(91, 255, 178, 0.2),
    inset 0 0 15px rgba(91, 255, 178, 0.05);
}

.jp-preset-btn--max {
  background: linear-gradient(135deg, rgba(91, 255, 178, 0.15) 0%, rgba(91, 255, 178, 0.05) 100%);
  border-color: rgba(91, 255, 178, 0.4);
  color: #5bffb2;
  padding: 14px 18px;
  font-weight: 800;
}

.jp-preset-btn--max:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(91, 255, 178, 0.25) 0%, rgba(91, 255, 178, 0.1) 100%);
  border-color: rgba(91, 255, 178, 0.6);
  box-shadow: 
    0 4px 20px rgba(91, 255, 178, 0.25),
    inset 0 0 20px rgba(91, 255, 178, 0.05);
}

.jp-preset-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Stats Row */
.jp-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.jp-stat-box {
  background: linear-gradient(165deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.25) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.jp-stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.jp-stat-box:hover {
  border-color: rgba(91, 255, 178, 0.2);
  background: linear-gradient(165deg, rgba(91, 255, 178, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
  transform: translateY(-2px);
}

.jp-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 6px;
}

.jp-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #5bffb2;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s;
  text-shadow: 0 0 20px rgba(91, 255, 178, 0.3);
}

.jp-stat-value--chance {
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Login Button in Header */
.jp-login-btn {
  background: rgba(91, 255, 178, 0.1);
  border: 1px solid rgba(91, 255, 178, 0.3);
  color: #5bffb2;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.jp-login-btn:hover {
  background: rgba(91, 255, 178, 0.2);
  border-color: rgba(91, 255, 178, 0.5);
}

/* CTA Button */
.jp-create-panel__cta {
  margin-top: 2px;
}

.jp-cta-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 24px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.jp-cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.jp-cta-btn--primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  box-shadow: 
    0 6px 24px rgba(34, 197, 94, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.jp-cta-btn--primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 
    0 10px 35px rgba(34, 197, 94, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.jp-cta-btn--primary:active:not(:disabled) {
  transform: translateY(0);
}

.jp-cta-btn--login {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.jp-cta-btn--login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.jp-cta-btn--login:active {
  transform: translateY(0);
}

.jp-cta-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.jp-cta-btn.loading {
  pointer-events: none;
}

.jp-cta-icon {
  display: flex;
  align-items: center;
}

.jp-cta-icon svg {
  width: 16px;
  height: 16px;
}

.jp-cta-loading {
  width: 20px;
  height: 20px;
  animation: jp-spin 1s linear infinite;
}

.jp-cta-loading svg {
  width: 100%;
  height: 100%;
}

@keyframes jp-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   JACKPOT HISTORY PANEL - Premium Design
   ============================================ */
.jp-history-panel {
  background: linear-gradient(165deg, rgba(12, 18, 15, 0.99) 0%, rgba(8, 12, 10, 1) 100%);
  border: 1px solid rgba(91, 255, 178, 0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
}

.jp-history-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, rgba(255, 215, 0, 0.5) 50%, transparent 95%);
}

.jp-history-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: radial-gradient(ellipse at center top, rgba(255, 215, 0, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.jp-history-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 1;
}

.jp-history-panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.jp-history-panel__icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
}

.jp-history-panel__icon svg {
  width: 16px;
  height: 16px;
}

.jp-history-panel__count {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
  color: #ffd700;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(255, 215, 0, 0.25);
}

.jp-history-panel__content {
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.jp-history-panel__content::-webkit-scrollbar {
  width: 4px;
}

.jp-history-panel__content::-webkit-scrollbar-track {
  background: transparent;
}

.jp-history-panel__content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.jp-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 50px 20px;
  color: rgba(255, 255, 255, 0.35);
}

.jp-history-empty__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.25);
}

.jp-history-empty__icon svg {
  width: 24px;
  height: 24px;
}

.jp-history-empty__text {
  font-size: 14px;
  font-weight: 500;
}

.jp-history-list {
  display: flex;
  flex-direction: column;
}

.jp-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.jp-history-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #ffd700, rgba(255, 215, 0, 0.3));
  opacity: 0;
  transition: opacity 0.25s;
}

.jp-history-item:hover {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.06) 0%, transparent 100%);
}

.jp-history-item:hover::before {
  opacity: 1;
}

.jp-history-item:last-child {
  border-bottom: none;
}

.jp-history-item__winner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.jp-history-item__crown {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  flex-shrink: 0;
  transition: all 0.25s;
}

.jp-history-item:hover .jp-history-item__crown {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 215, 0, 0.1) 100%);
  transform: rotate(5deg) scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.jp-history-item__crown svg {
  width: 14px;
  height: 14px;
}

.jp-history-item__name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.jp-history-item__stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.jp-history-item__amount {
  font-size: 15px;
  font-weight: 700;
  color: #5bffb2;
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 0 15px rgba(91, 255, 178, 0.3);
}

.jp-history-item__chance {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  min-width: 55px;
  text-align: right;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

/* ============================================
   JACKPOT DISPLAY - Premium Redesign
   ============================================ */
.jackpot-display {
  position: relative;
  background: linear-gradient(165deg, rgba(16, 24, 20, 0.98) 0%, rgba(10, 15, 12, 0.99) 100%);
  border: 1px solid rgba(91, 255, 178, 0.15);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.jackpot-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(91, 255, 178, 0.5), transparent);
}

.jackpot-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.jackpot-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.12) 0%, transparent 60%);
}

.jackpot-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: 2px solid var(--green);
  border-radius: 50%;
  animation: pulse-ring 1.5s ease-out infinite;
}

.jackpot-urgent-pulse {
  position: absolute;
  inset: 0;
  background: rgba(239, 68, 68, 0.05);
  animation: urgent-flash 0.5s ease-in-out infinite;
}

@keyframes urgent-flash {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.jackpot-content {
  position: relative;
  z-index: 1;
}

/* ============================================
   MAIN JACKPOT (Non-winner state)
   ============================================ */
.jackpot-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 8px 0;
}

.jackpot-trophy-wrap {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(251, 191, 36, 0.05) 100%);
  border-radius: 16px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.jackpot-trophy-wrap .jackpot-trophy {
  width: 32px;
  height: 32px;
  color: var(--gold);
  filter: drop-shadow(0 0 8px var(--gold-glow));
}

.jackpot-trophy-wrap .jackpot-trophy svg {
  width: 100%;
  height: 100%;
}

.jackpot-main.spinning .jackpot-trophy-wrap {
  animation: trophy-pulse 0.6s ease-in-out infinite;
}

@keyframes trophy-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.jackpot-pot-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.jackpot-label-mini {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}

.jackpot-amount {
  font-size: 2.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green) 0%, #4ade80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ============================================
   STATUS SECTION
   ============================================ */
.jackpot-status-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Waiting state */
.status-waiting {
  display: flex;
  align-items: center;
  gap: 10px;
}

.waiting-indicator {
  width: 10px;
  height: 10px;
  position: relative;
}

.waiting-dot {
  position: absolute;
  inset: 0;
  background: var(--text-muted);
  border-radius: 50%;
  animation: waiting-pulse 2s ease-in-out infinite;
}

@keyframes waiting-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.status-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Spinning state */
.status-spinning {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinning-indicator {
  display: flex;
  gap: 4px;
}

.spin-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: spin-bounce 1.2s ease-in-out infinite;
}

.spin-dot:nth-child(2) { animation-delay: 0.2s; }
.spin-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes spin-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-6px); opacity: 1; }
}

.status-spinning .status-text {
  color: var(--green);
  font-weight: 600;
}

/* Countdown state */
.status-countdown {
  display: flex;
  align-items: center;
}

.countdown-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.countdown-ring {
  position: relative;
  width: 64px;
  height: 64px;
}

.countdown-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.countdown-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 4;
}

.countdown-ring .ring-progress {
  fill: none;
  stroke: var(--green);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}

.status-countdown.urgent .ring-progress {
  stroke: var(--red);
}

.countdown-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.status-countdown.urgent .countdown-number {
  color: var(--red);
  animation: urgent-number 0.5s ease-in-out infinite;
}

@keyframes urgent-number {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

.countdown-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Player count */
.player-count {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.player-count svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* ============================================
   WINNER DISPLAY - Simple Compact Inline
   ============================================ */
.winner-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
}

.winner-compact-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.winner-trophy-small {
  width: 36px;
  height: 36px;
  color: var(--gold);
  filter: drop-shadow(0 0 8px var(--gold-glow));
}

.winner-trophy-small svg {
  width: 100%;
  height: 100%;
}

.winner-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.winner-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  font-weight: 600;
}

.winner-name-compact {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.winner-compact-center {
  flex: 1;
  text-align: center;
}

.winner-amount-compact {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green) 0%, #4ade80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.winner-compact-right {
  display: flex;
  align-items: center;
}

.next-round-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  background: rgba(91, 255, 178, 0.1);
  border: 1px solid rgba(91, 255, 178, 0.2);
  border-radius: 12px;
  min-width: 60px;
}

.next-round-timer {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green);
}

.next-round-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .winner-compact {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  
  .winner-compact-center {
    order: -1;
    flex-basis: 100%;
  }
}

.next-round-banner .next-round-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.next-round-banner .next-round-time {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}

.next-round-progress-bar {
  width: 100%;
  max-width: 200px;
  height: 4px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.next-round-progress-fill {
  height: 100%;
  background: var(--green);
  transition: width 1s linear;
  box-shadow: 0 0 8px var(--green-glow);
}

.stat-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.stat-icon svg {
  width: 100%;
  height: 100%;
}

/* Next round countdown */
.next-round-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.next-round-content {
  text-align: center;
}

.next-round-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.next-round-countdown {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
  margin: 8px 0;
}

.next-round-progress {
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
  max-width: 200px;
  margin: 0 auto;
}

.next-round-bar {
  height: 100%;
  background: var(--green);
  transition: width 1s linear;
}

/* ============================================
   WHEEL - Infinite Scroll Design
   ============================================ */
.wheel-container {
  position: relative;
  background: linear-gradient(165deg, rgba(16, 24, 20, 0.98) 0%, rgba(10, 15, 12, 0.99) 100%);
  border: 1px solid rgba(91, 255, 178, 0.1);
  border-radius: 20px;
  padding: 50px 20px 30px;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.wheel-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(91, 255, 178, 0.4), transparent);
  z-index: 50;
  pointer-events: none;
}

.wheel-container.spinning {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(34, 197, 94, 0.15);
}

.wheel-container.revealed {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(34, 197, 94, 0.2);
}

/* Center Pointer - Arrow pointing down */
.wheel-pointer-wrapper {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-pointer {
  width: 36px;
  height: 45px;
  filter: drop-shadow(0 2px 8px rgba(34, 197, 94, 0.6));
}

.wheel-pointer svg {
  width: 100%;
  height: 100%;
}

.wheel-pointer-line {
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--green) 0%, transparent 100%);
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  height: 80px;
  opacity: 0.5;
}

/* Spinning pointer animation */
.wheel-container.spinning .wheel-pointer {
  animation: pointer-pulse 0.5s ease-in-out infinite;
}

@keyframes pointer-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Viewport */
.wheel-viewport {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  height: 130px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  /* Hardware acceleration for all browsers */
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-overflow-scrolling: touch;
}

/* Edge fades */
.wheel-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 15;
  pointer-events: none;
}

.wheel-fade-left {
  left: 0;
  background: linear-gradient(90deg, rgba(13, 20, 16, 0.98) 0%, transparent 100%);
}

.wheel-fade-right {
  right: 0;
  background: linear-gradient(-90deg, rgba(13, 20, 16, 0.98) 0%, transparent 100%);
}

/* The scrolling track */
.wheel-track {
  display: flex;
  height: 100%;
  will-change: transform;
  -webkit-will-change: transform;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000px;
  perspective: 1000px;
}

/* Ensure animation class works cross-browser */
.wheel-track.animating {
  -webkit-transition-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1);
  -moz-transition-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1);
  -ms-transition-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1);
  transition-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1);
}

/* Individual segment */
.wheel-segment {
  flex-shrink: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-right: 2px solid rgba(0, 0, 0, 0.4);
  transition: filter 0.3s ease;
}

.wheel-segment.empty {
  background: rgba(255, 255, 255, 0.02) !important;
}

.wheel-segment.winner {
  animation: winner-highlight 0.5s ease-out forwards;
  z-index: 5;
}

@keyframes winner-highlight {
  0% { 
    filter: brightness(1);
    transform: scale(1);
  }
  50% { 
    filter: brightness(1.5);
    transform: scale(1.05);
  }
  100% { 
    filter: brightness(1.3);
    transform: scale(1.02);
  }
}

/* Segment content */
.segment-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
}

.segment-content.empty {
  opacity: 0.3;
}

.segment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.segment-avatar.empty-avatar {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-dim);
  border: none;
}

.segment-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.segment-chance {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Shine overlay */
.segment-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

/* Empty state overlay */
.wheel-empty-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 25;
  border-radius: var(--radius-lg);
}

.wheel-empty-overlay .empty-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
}

/* Winner flash effect */
.wheel-winner-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: winner-flash 0.6s ease-out forwards;
  pointer-events: none;
  z-index: 20;
}

@keyframes winner-flash {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* Legacy support - remove old classes */
.wheel-center-line,
.wheel-top-bar,
.wheel-bottom-bar,
.wheel-pointer-glow {
  display: none;
}

/* ============================================
   TIMER/* ============================================
   TIMER
   ============================================ */
.timer {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timer-icon {
  width: 16px;
  height: 16px;
}

.timer-icon svg {
  width: 100%;
  height: 100%;
}

.timer-icon.spinning {
  animation: spin 1s linear infinite;
}

.timer-urgent {
  color: var(--red);
}

.timer-spinning {
  color: var(--green);
}

.timer-winner {
  color: var(--gold);
}

/* ============================================
   FAIRNESS DISPLAY
   ============================================ */
.fairness-compact {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.fairness-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 12px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.fairness-toggle:hover {
  background: var(--bg-input);
  color: var(--text);
}

.fairness-shield {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.fairness-shield svg {
  width: 100%;
  height: 100%;
}

.fairness-ticket-badge {
  background: var(--green-dim);
  color: var(--green);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.fairness-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.fairness-chevron svg {
  width: 100%;
  height: 100%;
}

.fairness-chevron.up {
  transform: rotate(180deg);
}

.fairness-details {
  margin-top: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.fairness-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.fairness-row:last-child {
  border-bottom: none;
}

.fairness-row-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.fairness-row-value {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fairness-row-value code {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.fairness-copy-sm {
  width: 16px;
  height: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

.fairness-copy-sm svg {
  width: 100%;
  height: 100%;
}

.fairness-copy-sm.copied {
  color: var(--green);
}

.fairness-ticket-num {
  font-weight: 700;
  color: var(--green);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: linear-gradient(165deg, var(--bg-card-light) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--red-dim);
  border-color: var(--red);
  color: var(--red);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.modal-icon {
  width: 24px;
  height: 24px;
  color: var(--green);
}

.modal-icon svg {
  width: 100%;
  height: 100%;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
}

.rules-section {
  margin-bottom: 24px;
}

.rules-section:last-child {
  margin-bottom: 0;
}

.rules-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.section-icon {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.section-icon svg {
  width: 100%;
  height: 100%;
}

.rules-list {
  list-style: none;
  padding-left: 26px;
}

.rules-list li {
  position: relative;
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.rules-list li::before {
  content: '•';
  position: absolute;
  left: -16px;
  color: var(--green);
}

.house-edge-display {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.house-edge-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
}

.house-edge-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.states-grid {
  display: grid;
  gap: 8px;
}

.state-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.state-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 80px;
  text-align: center;
}

.state-open { background: var(--text-dim); color: var(--text); }
.state-countdown { background: rgba(59, 130, 246, 0.3); color: #60a5fa; }
.state-spinning { background: var(--green-dim); color: var(--green); }
.state-reveal { background: rgba(255, 215, 0, 0.3); color: var(--gold); }

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.modal-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--green-glow);
}

/* ============================================
   PREMIUM FOOTER
   ============================================ */
.cr-premium-footer {
  background: linear-gradient(180deg, rgba(6, 10, 15, 0.88) 0%, rgba(10, 15, 20, 1) 100%);
  border-top: 1px solid rgba(91, 255, 178, 0.18);
  padding: 56px 40px 30px 40px;
  margin-top: 80px;
  position: relative;
  z-index: 1;
  box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.5);
}

.cr-footer-container {
  max-width: 1240px;
  margin: 0 auto;
}

.cr-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 52px;
}

@media (max-width: 1024px) {
  .cr-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 42px;
  }
}

@media (max-width: 600px) {
  .cr-footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .cr-premium-footer {
    padding: 40px 24px 24px;
  }
}

/* Brand Section */
.cr-footer-brand {
  padding-right: 28px;
}

.cr-footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
}

.cr-footer-logo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #5bffb2 0%, #4de69c 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 24px;
  color: #0a0f14;
  font-family: 'Sora', 'Inter', sans-serif;
  box-shadow: 0 8px 24px rgba(91, 255, 178, 0.4);
}

.cr-footer-logo-text {
  display: flex;
  flex-direction: column;
}

.cr-footer-logo-name {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  font-family: 'Sora', 'Inter', sans-serif;
  letter-spacing: -0.8px;
}

.cr-footer-logo-tag {
  font-size: 9.5px;
  color: rgba(91, 255, 178, 0.9);
  font-weight: 800;
  letter-spacing: 2px;
}

.cr-footer-description {
  color: rgba(255, 255, 255, 0.56);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 360px;
  font-weight: 450;
}

.cr-footer-socials {
  display: flex;
  gap: 13px;
  margin-top: 28px;
}

.cr-social-btn {
  width: 40px;
  height: 40px;
  background: rgba(91, 255, 178, 0.08);
  border: 1px solid rgba(91, 255, 178, 0.22);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  cursor: pointer;
  color: #5bffb2;
}

.cr-social-btn:hover {
  background: rgba(91, 255, 178, 0.2);
  border-color: rgba(91, 255, 178, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(91, 255, 178, 0.3);
}

.cr-social-btn svg {
  width: 17px;
  height: 17px;
}

/* Footer Sections */
.cr-footer-section {
  display: flex;
  flex-direction: column;
}

.cr-footer-section-title {
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 14px;
}

.cr-footer-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 44px;
  height: 2.5px;
  background: linear-gradient(90deg, #5bffb2 0%, rgba(91, 255, 178, 0.3) 70%, transparent 100%);
  border-radius: 2px;
}

.cr-footer-links {
  display: flex;
  flex-direction: column;
}

.cr-footer-link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14.5px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  position: relative;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.cr-footer-link:hover {
  color: #5bffb2;
  transform: translateX(5px);
}

.cr-footer-link::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, #5bffb2, #4de69c);
  border-radius: 2px;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cr-footer-link:hover::before {
  height: 100%;
}

.cr-footer-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 255, 178, 0.08);
  border: 1px solid rgba(91, 255, 178, 0.15);
  border-radius: 7px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #5bffb2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.3px;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}

.cr-footer-link:hover .cr-footer-icon {
  background: rgba(91, 255, 178, 0.18);
  border-color: rgba(91, 255, 178, 0.35);
  transform: scale(1.12) rotate(5deg);
  box-shadow: 0 4px 12px rgba(91, 255, 178, 0.25);
}

/* Footer Bottom */
.cr-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 54px;
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.cr-footer-copyright {
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  margin: 0;
  font-weight: 600;
}

.cr-footer-copyright-brand {
  color: rgba(91, 255, 178, 0.95);
  font-weight: 800;
}

.cr-footer-badges {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cr-footer-badge {
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

.cr-footer-badge--age {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 107, 107, 0.08));
  border: 1.5px solid rgba(255, 107, 107, 0.4);
  color: rgba(255, 120, 120, 1);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.cr-footer-badge--responsible {
  background: linear-gradient(135deg, rgba(91, 255, 178, 0.15), rgba(91, 255, 178, 0.08));
  border: 1.5px solid rgba(91, 255, 178, 0.4);
  color: rgba(91, 255, 178, 1);
  box-shadow: 0 2px 8px rgba(91, 255, 178, 0.2);
}

/* ============================================
   AUTH MODAL
   ============================================ */
.jp-auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.jp-auth-modal {
  position: relative;
  background: linear-gradient(165deg, rgba(21, 31, 26, 0.98) 0%, rgba(10, 15, 12, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

.jp-auth-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
}

.jp-auth-glow--1 {
  top: -100px;
  left: -100px;
  width: 200px;
  height: 200px;
  background: rgba(34, 197, 94, 0.15);
}

.jp-auth-glow--2 {
  bottom: -80px;
  right: -80px;
  width: 160px;
  height: 160px;
  background: rgba(59, 130, 246, 0.1);
}

.jp-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s;
}

.jp-auth-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.jp-auth-close svg {
  width: 16px;
  height: 16px;
}

.jp-auth-brand {
  text-align: center;
  margin-bottom: 24px;
}

.jp-auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.jp-auth-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.jp-auth-logo-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.jp-auth-logo-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}

.jp-auth-logo-subtitle {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.4);
}

.jp-auth-tabs {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}

.jp-auth-tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

.jp-auth-tab--active {
  color: #fff;
}

.jp-auth-tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.jp-auth-tab-indicator--right {
  transform: translateX(100%);
}

.jp-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.jp-auth-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.jp-auth-message svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.jp-auth-message--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.jp-auth-message--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.jp-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jp-auth-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.jp-auth-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.jp-auth-input:focus {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.jp-auth-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.jp-auth-input-wrapper {
  position: relative;
}

.jp-auth-input-wrapper .jp-auth-input {
  padding-right: 44px;
}

.jp-auth-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
}

.jp-auth-eye:hover {
  color: rgba(255, 255, 255, 0.7);
}

.jp-auth-eye svg {
  width: 18px;
  height: 18px;
}

.jp-auth-submit {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.25);
  margin-top: 8px;
}

.jp-auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

.jp-auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.jp-auth-spinner {
  display: inline-flex;
  animation: jp-spin 1s linear infinite;
}

.jp-auth-spinner svg {
  width: 20px;
  height: 20px;
}

.jp-auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.jp-auth-switch {
  background: transparent;
  border: none;
  color: #5bffb2;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.jp-auth-switch:hover {
  color: #fff;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(13, 20, 16, 0.95) 0%, rgba(21, 31, 26, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: toast-slide-in 0.3s ease-out;
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast-icon svg {
  width: 100%;
  height: 100%;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.3);
}

.toast-success .toast-icon {
  color: #22c55e;
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.3);
}

.toast-error .toast-icon {
  color: #ef4444;
}

.toast-info {
  border-color: rgba(59, 130, 246, 0.3);
}

.toast-info .toast-icon {
  color: #3b82f6;
}

.toast-win {
  border-color: rgba(255, 215, 0, 0.4);
  background: linear-gradient(135deg, rgba(30, 25, 10, 0.95) 0%, rgba(40, 35, 15, 0.95) 100%);
}

.toast-win .toast-icon {
  color: #ffd700;
}

/* ============================================
   WINNER MODAL - Subtle & Premium (Only for winner)
   ============================================ */
.winner-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.winner-modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.winner-modal {
  position: relative;
  text-align: center;
  padding: 32px 48px;
  background: linear-gradient(165deg, rgba(16, 24, 20, 0.98) 0%, rgba(10, 15, 12, 0.99) 100%);
  border: 1px solid rgba(91, 255, 178, 0.25);
  border-radius: 20px;
  box-shadow: 
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(91, 255, 178, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 360px;
  width: 90%;
}

.winner-modal.visible {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Top gradient line */
.winner-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  border-radius: 20px 20px 0 0;
}

/* Close button */
.winner-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.winner-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.winner-modal-close svg {
  width: 16px;
  height: 16px;
}

/* Trophy */
.winner-modal-trophy {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--gold);
  filter: drop-shadow(0 0 12px var(--gold-glow));
}

.winner-modal-trophy svg {
  width: 100%;
  height: 100%;
}

/* Title */
.winner-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 20px 0;
}

/* Amount */
.winner-modal-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
}

.winner-modal-amount .amount-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green) 0%, #4ade80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.winner-modal-amount .amount-currency {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Collect button */
.winner-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--green) 0%, #16a34a 100%);
  border: none;
  border-radius: 12px;
  color: #000;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(91, 255, 178, 0.3);
}

.winner-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 255, 178, 0.4);
}

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

/* ============================================
   SOUND TOGGLE BUTTON
   ============================================ */
.sound-toggle {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(13, 20, 16, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s ease;
  color: rgba(255, 255, 255, 0.6);
}

.sound-toggle:hover {
  background: rgba(21, 31, 26, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sound-toggle.muted {
  color: rgba(255, 255, 255, 0.3);
}

.sound-toggle svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   LIVE PLAYER COUNT BADGE
   ============================================ */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #22c55e;
}

.live-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ============================================
   COUNTDOWN TICK ANIMATION
   ============================================ */
.timer-urgent {
  animation: urgent-pulse 0.5s ease-in-out infinite;
}

@keyframes urgent-pulse {
  0%, 100% { 
    transform: scale(1);
    color: #ef4444;
  }
  50% { 
    transform: scale(1.05);
    color: #ff6b6b;
  }
}

/* ============================================
   TOOLTIP COMPONENT
   ============================================ */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
}

.tooltip-trigger {
  cursor: help;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s;
}

.tooltip-trigger:hover {
  color: rgba(255, 255, 255, 0.7);
}

.tooltip-trigger svg {
  width: 16px;
  height: 16px;
}

.tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.95);
}

.tooltip-wrapper:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-button {
  height: 44px;
  width: 100%;
}

/* ============================================
   MOBILE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
  .toast-container {
    top: auto;
    bottom: 20px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
  
  .winner-modal {
    padding: 24px 20px;
    max-width: calc(100vw - 40px);
  }
  
  .winner-modal-title {
    font-size: 1.25rem;
  }
  
  .winner-modal-amount .amount-value {
    font-size: 2rem;
  }
  
  .sound-toggle {
    bottom: 80px;
    right: 10px;
  }
}

/* ============================================
   CHAT SIDEBAR INTEGRATION
   ============================================ */
.sidebar-right .cr-chat-container {
  height: 600px;
  max-height: calc(100vh - 200px);
}

/* Make participants panel look good below wheel */
.main-content .participants-panel {
  margin-top: 0;
}

.main-content .participants-list {
  max-height: 300px;
}

/* Horizontal participants grid for below wheel */
.main-content .participant-row {
  display: inline-flex;
  width: calc(50% - 10px);
  margin-right: 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border-bottom: none;
  padding: 12px;
}

.main-content .participant-row:nth-child(2n) {
  margin-right: 0;
}

.main-content .participants-list {
  display: flex;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .main-content .participant-row {
    width: 100%;
    margin-right: 0;
  }
}
