/* =====================================================
   STAKING DUEL ARENA - STYLES
   Dark fantasy theme with combat animations
   ===================================================== */

:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-hover: #1a1a25;
  --accent-gold: #ffd700;
  --accent-red: #ff4444;
  --accent-green: #44ff88;
  --accent-blue: #4488ff;
  --accent-purple: #aa44ff;
  --text-primary: #ffffff;
  --text-secondary: #888899;
  --border-color: #2a2a3a;
  --health-green: #44ff88;
  --health-yellow: #ffcc00;
  --health-red: #ff4444;
}

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

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: block;
}

/* ===== LOGIN SCREEN ===== */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a0f 70%);
}

.logo {
  text-align: center;
  margin-bottom: 40px;
}

.logo-icon {
  font-size: 80px;
  animation: pulse 2s ease-in-out infinite;
}

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

.logo h1 {
  font-family: 'Cinzel', serif;
  font-size: 48px;
  color: var(--accent-gold);
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  margin-top: 10px;
}

.tagline {
  color: var(--text-secondary);
  font-size: 18px;
  margin-top: 10px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 350px;
}

.login-form input {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 15px 20px;
  font-size: 16px;
  border-radius: 8px;
  text-align: center;
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.login-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.8;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #cc9900);
  color: #000;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.features {
  display: flex;
  gap: 30px;
  margin-top: 50px;
  flex-wrap: wrap;
  justify-content: center;
}

.feature {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 10px 20px;
  background: var(--bg-card);
  border-radius: 20px;
}

/* ===== GAME SCREEN ===== */
#gameScreen {
  display: none;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto auto 1fr auto;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

#gameScreen.active {
  display: grid;
}

.game-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 65px;
  background: linear-gradient(180deg, rgba(15, 15, 25, 0.98) 0%, rgba(10, 10, 18, 0.98) 100%);
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  backdrop-filter: blur(10px);
  position: relative;
}

/* Decorative gold line at bottom */
.game-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  padding: 8px 16px 8px 8px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: all 0.3s ease;
}

.player-card:hover {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.player-avatar-small {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.player-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.player-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.player-level-badge {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 13px;
  background: rgba(255, 215, 0, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.player-xp-bar {
  width: 120px;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 2px;
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
  border-radius: 2px;
  transition: width 0.5s ease-out;
  width: 0%;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.player-record {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.record-divider {
  color: var(--text-secondary);
  opacity: 0.5;
}

.xp-text {
  color: var(--text-secondary);
  font-size: 10px;
  opacity: 0.7;
}

.wins { color: #22c55e; font-weight: 600; }
.losses { color: #ef4444; font-weight: 600; }

.streak-badge {
  display: none;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
}

.streak-badge.visible {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.streak-badge.hot {
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
  color: white;
}

/* Center Logo */
.logo-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.logo-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.logo-text {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.logo-tagline {
  font-size: 9px;
  color: rgba(255, 215, 0, 0.5);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Header Buttons */
.header-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-header {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-header:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.1);
  transform: translateY(-2px);
}

.sound-toggle.muted {
  color: #666;
  border-color: rgba(255, 255, 255, 0.05);
}

.sound-toggle.muted:hover {
  color: #888;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-wallet-main {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b8860b 100%);
  border: none;
  color: #000;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.2);
}

.btn-wallet-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.btn-wallet-main.connected {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.2);
  color: #ffffff;
}

.btn-wallet-main.connected:hover {
  box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
}

/* Old classes for compatibility */
.btn-settings {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.btn-settings:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* Settings Panel */
.settings-panel {
  position: fixed;
  top: 60px;
  right: 120px;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.settings-panel.hidden {
  display: none;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

.settings-header h3 {
  color: var(--accent-gold);
}

.settings-content {
  padding: 20px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 15px;
}

.settings-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-gold);
}

.settings-toggle span {
  font-size: 14px;
}

.settings-info {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px;
  background: var(--bg-hover);
  border-radius: 6px;
}

.settings-info span {
  color: var(--accent-green);
  font-weight: 700;
}

.logo-mini {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--accent-gold);
}

.btn-wallet {
  background: var(--bg-hover);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-wallet:hover {
  background: var(--accent-gold);
  color: #000;
}

/* Wallet Panel */
.wallet-panel {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  display: none; /* Hidden by default */
}

.wallet-panel.visible {
  display: block;
}

.wallet-panel.hidden {
  display: none;
}

.wallet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

.wallet-header h3 {
  color: var(--accent-gold);
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.wallet-tokens {
  padding: 15px;
  max-height: 400px;
  overflow-y: auto;
}

.wallet-token {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bg-hover);
}

.wallet-token-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-token-icon {
  font-size: 24px;
}

.wallet-token-symbol {
  font-weight: 700;
}

.wallet-token-name {
  font-size: 12px;
  color: var(--text-secondary);
}

.wallet-token-balance {
  text-align: right;
}

.wallet-token-amount {
  font-weight: 700;
}

.wallet-token-usd {
  font-size: 12px;
  color: var(--accent-green);
}

/* Wallet Balance Section */
.wallet-balance-section {
  padding: 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  border-bottom: 1px solid var(--border-color);
}

.balance-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.balance-info {
  cursor: help;
  opacity: 0.6;
}

.balance-amount {
  text-align: center;
  margin-bottom: 15px;
}

.balance-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-green);
}

.balance-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.breakdown-item span:first-child {
  color: var(--text-secondary);
}

.breakdown-item span:last-child {
  color: var(--text-primary);
}

.btn-withdraw {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-withdraw:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
}

.btn-withdraw:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #666;
}

.withdraw-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.wallet-tokens-section {
  padding: 15px;
}

.tokens-header {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

/* Wallet Connection Section */
.wallet-connection-section {
  padding: 15px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.connection-status-panel {
  margin-bottom: 12px;
}

.connection-status-panel .not-connected {
  color: var(--text-secondary);
  font-size: 13px;
}

.connection-status-panel .connected {
  color: var(--accent-green);
  font-size: 13px;
}

.btn-connect-wallet {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-connect-wallet:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.wallet-types-hint {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
  opacity: 0.7;
}

/* Hide tokens section when not connected */
.wallet-panel:not(.wallet-connected) .wallet-tokens-section {
  display: none;
}

/* Show connected state in wallet */
.wallet-panel.wallet-connected .wallet-connection-section {
  display: none;
}

/* Navigation */
.game-nav {
  grid-column: 1;
  display: flex;
  gap: 5px;
  padding: 10px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 20px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-tab.active {
  background: var(--accent-gold);
  color: #000;
}

/* Main Content */
.game-main {
  padding: 20px;
  overflow-y: auto;
  min-height: 0; /* Allow flex/grid shrinking */
  display: flex;
  flex-direction: column;
}

.game-main > .tab-content.active {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.tab-content {
  display: none;
  height: 100%;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Items Grid */
.items-section h2, .stake-section h2 {
  font-size: 18px;
  color: var(--accent-gold);
  margin-bottom: 15px;
}

.item-count {
  color: var(--text-secondary);
  font-weight: normal;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.items-grid.mini {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.item-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.item-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-3px);
}

.item-card.selected {
  border-color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.item-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
}

.item-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 5px;
}

.item-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.item-rarity {
  font-size: 10px;
  text-transform: uppercase;
  margin-top: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.item-rarity.legendary { background: var(--accent-gold); color: #000; }
.item-rarity.epic { background: var(--accent-purple); color: #fff; }
.item-rarity.rare { background: var(--accent-blue); color: #fff; }

/* Stake Section */
.stake-section {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.stake-config {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.stake-config label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.stake-config select, .stake-config input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 6px;
  font-size: 16px;
}

.stake-config select:focus, .stake-config input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.stake-value {
  display: flex;
  align-items: flex-end;
}

.usd-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-green);
}

.stake-info {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 20px;
}

.btn-create {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-red), #cc0000);
  color: #fff;
  border: none;
  padding: 15px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-create:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 68, 68, 0.4);
}

/* ===== LOBBY - IMPROVED LAYOUT ===== */
.lobby-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  height: 100%;
}

.lobby-main {
  display: flex;
  flex-direction: column;
}

.lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.lobby-header h2 {
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-controls label {
  color: var(--text-secondary);
  font-size: 13px;
}

.sort-controls select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
}

/* Challenges Grid */
.challenges-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.empty-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.empty-hint {
  font-size: 14px;
  opacity: 0.7;
}

/* Challenge Card - Improved */
.challenge-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(30,30,40,1) 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.challenge-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.challenge-card.own {
  border-color: var(--accent-blue);
  border-width: 2px;
}

.challenge-main {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  gap: 15px;
  position: relative;
  z-index: 1;
}

.challenge-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.challenge-info {
  flex: 1;
}

.challenge-player {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.challenge-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}

.challenge-level {
  color: var(--accent-purple);
  font-size: 14px;
  font-weight: 600;
}

.challenge-flag {
  font-size: 16px;
}

.challenge-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: var(--text-secondary);
}

.challenge-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.challenge-stake {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.challenge-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-gold);
}

.challenge-usd {
  font-size: 14px;
  color: var(--accent-green);
  font-weight: 600;
}

.challenge-actions {
  padding: 12px 20px;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
}

.btn-accept-challenge {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-green) 0%, #2d8a2d 100%);
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-accept-challenge:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-cancel-challenge {
  background: transparent;
  color: #888;
  border: 1px solid #444;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel-challenge:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
  background: rgba(239, 68, 68, 0.1);
}

/* ===== LOBBY SIDEBAR ===== */
.lobby-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 14px;
}

.sidebar-icon {
  font-size: 16px;
}

.twitter-link {
  margin-left: auto;
  color: var(--accent-blue);
  font-size: 12px;
  text-decoration: none;
}

/* Server Status */
.status-grid {
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
}

.status-dot.online {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.status-dot.warning {
  background: var(--accent-gold);
}

.status-label {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 11px;
}

.status-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background: rgba(0,0,0,0.2);
  font-size: 11px;
  color: var(--text-secondary);
  font-family: 'Courier New', monospace;
}

/* Events */
.events-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-item {
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  border-left: 3px solid var(--accent-purple);
}

.event-item.featured {
  border-left-color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(0,0,0,0.2) 100%);
}

.event-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.event-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.event-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.event-time {
  font-size: 11px;
  color: var(--accent-blue);
}

/* News */
.news-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
}

.news-item {
  display: flex;
  gap: 10px;
}

.news-avatar {
  width: 32px;
  height: 32px;
  background: var(--bg-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.news-content {
  flex: 1;
}

.news-text {
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.news-time {
  font-size: 10px;
  color: var(--text-secondary);
}

/* Live Stats */
.live-stats {
  display: flex;
  padding: 15px;
  justify-content: space-around;
}

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

.live-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
}

.live-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Responsive Lobby */
@media (max-width: 900px) {
  .lobby-layout {
    grid-template-columns: 1fr;
  }
  
  .lobby-sidebar {
    display: none;
  }
}

/* Old styles kept for compatibility */
.duels-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.duel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.duel-card:hover {
  border-color: var(--accent-gold);
  background: var(--bg-hover);
}

.duel-card.own {
  border-color: var(--accent-blue);
}

.duel-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.duel-challenger {
  font-weight: 700;
  font-size: 16px;
}

.duel-stake-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.duel-amount {
  font-weight: 700;
  color: var(--accent-gold);
}

.duel-usd {
  color: var(--accent-green);
  font-size: 14px;
}

.duel-actions {
  display: flex;
  gap: 10px;
}

.btn-accept {
  background: var(--accent-green);
  color: #000;
  border: none;
  padding: 10px 20px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
}

.btn-accept:hover {
  filter: brightness(1.1);
}

.btn-cancel {
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
}

/* Active Duels */
.active-duel-card {
  background: var(--bg-card);
  border: 2px solid var(--accent-red);
  border-radius: 10px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s;
  animation: battleGlow 1.5s ease-in-out infinite;
}

@keyframes battleGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 68, 68, 0.3); }
  50% { box-shadow: 0 0 20px rgba(255, 68, 68, 0.6); }
}

.active-duel-card:hover {
  transform: scale(1.02);
}

.active-duel-fighters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-size: 16px;
  font-weight: 700;
}

.active-duel-vs {
  color: var(--accent-red);
  animation: pulse 1s ease-in-out infinite;
}

.active-duel-info {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Leaderboard Page */
.leaderboard-page {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.leaderboard-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.leaderboard-header-row h2 {
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  margin: 0;
}

.leaderboard-toggle {
  display: flex;
  gap: 5px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 8px;
}

.lb-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.lb-toggle-btn:hover {
  color: var(--text-primary);
}

.lb-toggle-btn.active {
  background: var(--accent-purple);
  color: white;
}

/* Season Banner */
.season-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.season-banner.hidden {
  display: none;
}

.season-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-purple);
}

.season-timer {
  display: flex;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

.season-timer span:last-child {
  color: var(--accent-gold);
  font-weight: 700;
}

.season-prizes {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Leaderboard */
.leaderboard {
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
}

.leaderboard-header, .leaderboard-row {
  display: grid;
  grid-template-columns: 40px 1fr 50px 70px 60px 80px;
  padding: 12px 15px;
  gap: 10px;
}

.leaderboard-header {
  background: var(--bg-hover);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 13px;
}

.leaderboard-row {
  border-bottom: 1px solid var(--border-color);
}

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

.leaderboard-row .rank {
  color: var(--accent-gold);
  font-weight: 700;
}

.leaderboard-row .level { color: var(--accent-blue); font-weight: 700; }
.leaderboard-row .wl { color: var(--text-secondary); }
.leaderboard-row .winrate { color: var(--accent-green); }
.leaderboard-row .staked { color: var(--accent-gold); font-size: 12px; }
.leaderboard-row .highlight { color: var(--accent-gold); font-weight: 700; }

/* Chat Panel */
.chat-panel {
  grid-column: 2;
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  min-height: 0; /* Allow flex shrinking */
  overflow: hidden;
}

.chat-header {
  padding: 15px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  color: var(--accent-gold);
  flex-shrink: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  min-height: 0; /* Allow flex shrinking */
}

.chat-message {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.chat-message .sender {
  color: var(--accent-blue);
  font-weight: 600;
}

.chat-message .sender-level {
  color: var(--accent-purple);
  font-size: 11px;
}

.chat-message.system {
  color: var(--accent-gold);
  font-style: italic;
}

.chat-message.system .sender {
  color: var(--accent-gold);
}

/* System/Security Warning Messages */
.chat-message.system-message {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-left: 3px solid var(--accent-gold);
  padding: 8px 12px;
  margin: 10px 0;
  border-radius: 0 8px 8px 0;
  animation: systemMessagePulse 0.5s ease-out;
}

@keyframes systemMessagePulse {
  0% { background-color: rgba(255, 215, 0, 0.3); }
  100% { background-color: transparent; }
}

.chat-message.system-message .system-icon {
  margin-right: 6px;
}

.chat-message.system-message .system-sender {
  color: var(--accent-gold);
  font-weight: 700;
  margin-right: 6px;
}

.chat-message.system-message .system-text {
  color: #ffd700;
  font-weight: 500;
}

/* XP Gain Popup */
/* XP popup - see unified definition below */

@keyframes xpPopup {
  0% { opacity: 0; transform: translateY(20px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* Level Up Animation */
.level-up-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--accent-gold), #ffaa00);
  color: #000;
  padding: 20px 40px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
  animation: levelUp 3s ease-out forwards;
  z-index: 1001;
  text-align: center;
}

@keyframes levelUp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  30% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.chat-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.chat-input input {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 6px 0 0 6px;
  font-size: 16px; /* Prevents iOS zoom on focus */
}

.chat-input button {
  background: var(--accent-gold);
  color: #000;
  border: none;
  padding: 10px 15px;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  font-weight: 700;
}

/* ===== DUEL SCREEN ===== */
#duelScreen {
  background: linear-gradient(180deg, #1a0a0a 0%, #0a0a0f 50%, #0a0a1a 100%);
  padding: 20px;
  position: relative;
}

/* Battle Stats Overlay */
.battle-stats-overlay {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(20,20,30,0.8) 100%);
  border-radius: 8px;
  margin-bottom: 10px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.1);
}

.stats-left, .stats-right {
  display: flex;
  gap: 25px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  color: #555;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.stat-value {
  color: var(--accent-green);
  font-weight: 700;
  font-size: 13px;
}

.stat-value.block-num {
  color: var(--accent-purple);
}

.stats-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.session-hash {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hash-label {
  color: #555;
  font-size: 9px;
  letter-spacing: 1px;
}

.hash-value {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 3px;
  font-family: 'Courier New', monospace;
}

/* Fighter Flag & Timezone */
.fighter-flag {
  font-size: 36px;
  margin-bottom: 5px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.fighter-tz {
  font-size: 10px;
  color: #666;
  margin-bottom: 8px;
  font-family: 'Courier New', monospace;
  background: rgba(0,0,0,0.3);
  padding: 2px 8px;
  border-radius: 4px;
}

.duel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(0,0,0,0.5);
  border-radius: 10px;
  margin-bottom: 20px;
}

.round-info {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  color: var(--accent-gold);
}

.duel-stake {
  font-size: 20px;
  color: var(--accent-green);
  font-weight: 700;
}

.duel-arena {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 150px 1fr;
  gap: 20px;
  align-items: center;
}

.fighter {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: rgba(0,0,0,0.3);
  border-radius: 15px;
  border: 2px solid var(--border-color);
}

.fighter.challenger {
  border-color: var(--accent-blue);
}

.fighter.opponent {
  border-color: var(--accent-red);
}

.fighter-name {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
}

.fighter.challenger .fighter-name { color: var(--accent-blue); }
.fighter.opponent .fighter-name { color: var(--accent-red); }

.fighter-avatar {
  width: 120px;
  height: 150px;
  background: var(--bg-card);
  border-radius: 10px;
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fighter-sprite {
  font-size: 80px;
  transition: transform 0.1s;
}

.fighter-sprite.attacking {
  animation: attack 0.3s ease-out;
}

.fighter-sprite.hit {
  animation: hit 0.3s ease-out;
}

@keyframes attack {
  0% { transform: translateX(0); }
  50% { transform: translateX(30px); }
  100% { transform: translateX(0); }
}

@keyframes hit {
  0% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  50% { transform: translateX(10px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

.challenger-sprite::after { content: '🧙'; }
.opponent-sprite::after { content: '🧛'; }

.fighter-items {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 15px;
}

.item-badge {
  font-size: 20px;
  padding: 5px;
  background: var(--bg-hover);
  border-radius: 5px;
}

.health-bar-container {
  width: 100%;
  margin-bottom: 10px;
}

.health-bar {
  height: 25px;
  background: var(--bg-dark);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border-color);
}

.health-fill {
  height: 100%;
  width: 100%;
  transition: width 0.5s ease-out, background 0.3s;
  border-radius: 10px;
}

.challenger-health {
  background: linear-gradient(90deg, var(--accent-blue), #66aaff);
}

.opponent-health {
  background: linear-gradient(90deg, var(--accent-red), #ff6666);
}

.health-fill.low {
  background: linear-gradient(90deg, var(--health-red), #ff6666) !important;
  animation: healthPulse 0.5s ease-in-out infinite;
}

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

.health-text {
  display: block;
  text-align: center;
  font-size: 14px;
  margin-top: 5px;
  color: var(--text-secondary);
}

.fighter-stake {
  color: var(--accent-gold);
  font-weight: 700;
  margin-bottom: 10px;
}

.combat-log {
  width: 100%;
  height: 150px;
  overflow-y: auto;
  background: rgba(0,0,0,0.5);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
}

.log-entry {
  margin-bottom: 5px;
  padding: 3px 0;
}

.log-entry.crit { color: var(--accent-gold); font-weight: 700; }
.log-entry.miss { color: var(--text-secondary); font-style: italic; }
.log-entry.heal { color: var(--accent-green); }
.log-entry.damage { color: var(--accent-red); }

.vs-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.vs-icon {
  font-size: 60px;
  animation: vsPulse 1s ease-in-out infinite;
}

@keyframes vsPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.2) rotate(5deg); }
}

.vs-effects {
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Combat Actions */
.combat-actions {
  background: rgba(0,0,0,0.7);
  border: 2px solid var(--accent-gold);
  border-radius: 10px;
  padding: 10px;
  margin-top: 15px;
  width: 140px;
}

.combat-actions.hidden {
  display: none;
}

.actions-label {
  font-size: 10px;
  color: var(--accent-gold);
  text-align: center;
  margin-bottom: 8px;
  font-weight: 700;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 2px solid;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  transition: all 0.15s;
  position: relative;
}

.action-btn:last-of-type {
  margin-bottom: 0;
}

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

.action-btn.power {
  background: linear-gradient(180deg, #882200 0%, #551100 100%);
  border-color: #aa3300;
  color: #ffaa00;
}

.action-btn.power:hover:not(:disabled) {
  background: linear-gradient(180deg, #aa3300 0%, #882200 100%);
  transform: scale(1.05);
}

.action-btn.power.active {
  box-shadow: 0 0 15px #ff6600;
  animation: actionGlow 0.5s ease-out;
}

.action-btn.defend {
  background: linear-gradient(180deg, #003388 0%, #002255 100%);
  border-color: #0055aa;
  color: #66aaff;
}

.action-btn.defend:hover:not(:disabled) {
  background: linear-gradient(180deg, #0055aa 0%, #003388 100%);
  transform: scale(1.05);
}

.action-btn.defend.active {
  box-shadow: 0 0 15px #0088ff;
  animation: actionGlow 0.5s ease-out;
}

.action-btn.dodge {
  background: linear-gradient(180deg, #886600 0%, #553300 100%);
  border-color: #aa8800;
  color: #ffdd00;
}

.action-btn.dodge:hover:not(:disabled) {
  background: linear-gradient(180deg, #aa8800 0%, #886600 100%);
  transform: scale(1.05);
}

.action-btn.dodge.active {
  box-shadow: 0 0 15px #ffcc00;
  animation: actionGlow 0.5s ease-out;
}

@keyframes actionGlow {
  0% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.action-icon {
  font-size: 16px;
}

.action-name {
  flex: 1;
  font-weight: 600;
}

.action-uses {
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.action-hint {
  font-size: 9px;
  color: #888;
  text-align: center;
  margin-top: 6px;
}

.effect-text {
  font-size: 18px;
  font-weight: 700;
  animation: effectPop 0.5s ease-out;
  margin: 5px 0;
}

@keyframes effectPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* Fighter Level */
.fighter-level {
  color: var(--accent-purple);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* In-Duel Chat - Bottom Position */
.duel-chat-bottom {
  width: 100%;
  max-width: 800px;
  margin: 20px auto 0;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.duel-chat-messages {
  height: 80px;
  overflow-y: auto;
  padding: 10px 15px;
  font-size: 13px;
}

.duel-chat-msg {
  margin-bottom: 4px;
  word-wrap: break-word;
}

.duel-chat-msg .sender {
  color: var(--accent-gold);
  font-weight: 600;
}

.duel-chat-msg .text {
  color: #ccc;
}

.duel-chat-input {
  display: flex;
  border-top: 1px solid var(--border-color);
}

.duel-chat-input input {
  flex: 1;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  padding: 10px 15px;
  font-size: 16px; /* Prevents iOS zoom on focus */
}

.duel-chat-input input:focus {
  outline: none;
  background: rgba(0,0,0,0.7);
}

.duel-chat-input button {
  background: var(--accent-gold);
  border: none;
  color: #000;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.duel-chat-input button:hover {
  background: #ffdd44;
}

/* ===== MODALS ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 15px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.result-blocks {
  display: block;
  font-size: 14px;
  color: var(--accent-purple);
  margin-top: 10px;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.modal-content h2 {
  text-align: center;
  color: var(--accent-gold);
  margin-bottom: 20px;
}

.challenger-info {
  text-align: center;
  padding: 15px;
  background: var(--bg-hover);
  border-radius: 10px;
  margin-bottom: 20px;
}

.challenger-info .challenger-name {
  font-size: 20px;
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
}

.challenger-info .challenger-stake {
  color: var(--text-secondary);
}

.usd-badge {
  color: var(--accent-green);
  font-weight: 700;
}

.accept-divider {
  text-align: center;
  color: var(--text-secondary);
  margin: 20px 0;
  position: relative;
}

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

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

.modal-items-section h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.modal-items-section .item-count {
  text-align: center;
  margin-top: 10px;
  color: var(--text-secondary);
}

.modal-stake-section {
  margin-top: 20px;
}

.modal-stake-section .stake-config {
  display: flex;
  gap: 10px;
}

.modal-stake-section select, .modal-stake-section input {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 6px;
}

.modal-stake-section .stake-value {
  text-align: center;
  font-size: 18px;
  color: var(--accent-green);
  margin: 10px 0;
}

.modal-stake-section .stake-balance {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.value-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 15px;
  align-items: center;
  margin: 25px 0;
  padding: 15px;
  background: var(--bg-hover);
  border-radius: 10px;
}

.value-side {
  text-align: center;
}

.value-side .label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.value-side .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-green);
}

.value-vs {
  font-size: 20px;
  color: var(--text-secondary);
}

.modal-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}

.modal-actions .btn-accept {
  background: var(--accent-green);
  color: #000;
}

.modal-actions .btn-cancel {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* Result Modal */
.result-content {
  text-align: center;
}

.result-content.win {
  border-color: var(--accent-gold);
}

.result-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.result-content h2 {
  font-family: 'Cinzel', serif;
  font-size: 36px;
}

.result-content.win h2 {
  color: var(--accent-gold);
}

.result-message {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.result-pot {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
}

.result-content.win .result-pot {
  color: var(--accent-green);
}

.result-content:not(.win) .result-pot {
  color: var(--accent-red);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  #gameScreen.active {
    grid-template-columns: 1fr;
  }
  
  .chat-panel {
    display: none;
  }
  
  .duel-arena {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .vs-container {
    order: -1;
  }
  
  .fighter {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* =====================================================
   RUNESCAPE CLASSIC STYLE - DUEL SCREENS
   ===================================================== */

/* RS Header */
.rs-header {
  background: linear-gradient(180deg, #5a4a3a 0%, #3d3428 100%);
  border: 2px solid #2a2318;
  border-bottom: 2px solid #8b7355;
  color: #ffcc00;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 15px;
  text-align: center;
  text-shadow: 1px 1px 2px #000;
  position: relative;
}

/* RS Duel Modal */
.rs-duel-modal {
  background: #3d3428;
  border: 3px solid #5a4a3a;
  border-radius: 0;
  padding: 0;
  max-width: 600px;
  box-shadow: 0 0 20px rgba(0,0,0,0.8), inset 0 0 10px rgba(0,0,0,0.3);
}

.rs-duel-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px;
  padding: 10px;
}

/* RS Stakes Column */
.rs-stakes-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rs-stake-box {
  background: #2a2318;
  border: 2px solid #5a4a3a;
  padding: 10px;
}

.rs-stake-box.your-stake {
  border-color: #8b7355;
}

.rs-stake-label {
  color: #ff9900;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 1px 1px 1px #000;
}

.rs-stake-display {
  background: #1a1510;
  border: 1px inset #5a4a3a;
  padding: 10px;
  min-height: 50px;
}

.rs-stake-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffcc00;
  font-size: 16px;
  font-weight: 700;
}

.rs-token-icon {
  font-size: 24px;
}

.rs-stake-value {
  color: #00ff00;
  font-size: 12px;
  margin-top: 5px;
}

.items-required {
  color: #ef4444;
  font-size: 11px;
}

.items-valid .items-required {
  color: #22c55e;
}

.items-valid .items-required::before {
  content: '✓ ';
}

.rs-min-stake {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 4px;
  color: #ffd700;
  font-size: 12px;
  text-align: center;
}

.rs-select, .rs-input {
  background: #1a1510;
  border: 2px inset #5a4a3a;
  color: #ffcc00;
  padding: 8px;
  font-size: 16px; /* Prevents iOS zoom on focus */
  font-family: inherit;
}

.rs-select {
  width: 80px;
  flex-shrink: 0;
}

.rs-input {
  flex: 1;
  min-width: 80px;
}

.rs-select:focus, .rs-input:focus {
  outline: none;
  border-color: #ffcc00;
}

.rs-stake-meta {
  display: flex;
  justify-content: space-between;
  color: #aaa;
  font-size: 11px;
  margin-top: 5px;
}

.rs-usd-value {
  color: #00ff00;
  font-size: 14px;
  font-weight: 700;
}

/* RS Duel Options */
.rs-duel-options {
  background: #2a2318;
  border: 2px solid #5a4a3a;
  padding: 10px;
}

.rs-options-label {
  color: #ff9900;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 1px 1px 1px #000;
}

.rs-checkbox {
  display: block;
  color: #ccc;
  font-size: 12px;
  margin: 4px 0;
  cursor: default;
}

.rs-checkbox input {
  margin-right: 5px;
  accent-color: #ffcc00;
}

/* RS Inventory */
.rs-inventory-column {
  background: #2a2318;
  border: 2px solid #5a4a3a;
  padding: 10px;
}

.rs-inventory-label {
  color: #ff9900;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 1px 1px 1px #000;
}

.rs-inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #1a1510;
  border: 2px inset #5a4a3a;
  padding: 5px;
}

.rs-inventory-grid .item-card {
  background: #2a2318;
  border: 1px solid #3d3428;
  border-radius: 0;
  padding: 8px 4px;
  min-height: 70px;
}

.rs-inventory-grid .item-card:hover {
  background: #3d3428;
  border-color: #ffcc00;
  transform: none;
}

.rs-inventory-grid .item-card.selected {
  background: #4a3d2a;
  border: 2px solid #ffcc00;
  box-shadow: inset 0 0 10px rgba(255, 204, 0, 0.3);
}

.rs-inventory-grid .item-icon {
  font-size: 28px;
}

.rs-inventory-grid .item-name {
  font-size: 10px;
  color: #ffcc00;
}

.rs-inventory-grid .item-desc {
  display: none;
}

.rs-inventory-grid .item-rarity {
  display: none;
}

.rs-selected-count {
  color: #aaa;
  font-size: 11px;
  text-align: right;
  margin-top: 5px;
}

/* RS Value Compare */
.rs-value-compare {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 10px;
  background: #2a2318;
  border-top: 2px solid #5a4a3a;
}

.rs-compare-side {
  text-align: center;
}

.rs-compare-label {
  display: block;
  color: #aaa;
  font-size: 11px;
}

.rs-compare-value {
  color: #00ff00;
  font-size: 18px;
  font-weight: 700;
}

.rs-compare-vs {
  font-size: 24px;
}

/* RS Actions */
.rs-actions {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #3d3428;
  border-top: 2px solid #5a4a3a;
}

.rs-btn {
  flex: 1;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  border: 2px outset;
  cursor: pointer;
  text-shadow: 1px 1px 1px #000;
  transition: all 0.1s;
}

.rs-btn:active {
  border-style: inset;
}

.rs-btn-accept {
  background: linear-gradient(180deg, #228822 0%, #115511 100%);
  border-color: #33aa33 #115511 #115511 #33aa33;
  color: #fff;
}

.rs-btn-accept:hover {
  background: linear-gradient(180deg, #33aa33 0%, #228822 100%);
}

.rs-btn-decline {
  background: linear-gradient(180deg, #882222 0%, #551111 100%);
  border-color: #aa3333 #551111 #551111 #aa3333;
  color: #fff;
}

.rs-btn-decline:hover {
  background: linear-gradient(180deg, #aa3333 0%, #882222 100%);
}

/* RS Challenge Container */
.rs-challenge-container {
  background: #3d3428;
  border: 3px solid #5a4a3a;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.rs-challenge-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 10px;
  padding: 10px;
}

.rs-stake-setup {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rs-token-row, .rs-amount-row {
  margin-bottom: 5px;
}

.rs-token-row .rs-select {
  width: 100%;
}

.rs-btn-challenge {
  background: linear-gradient(180deg, #884400 0%, #552200 100%);
  border-color: #aa5500 #552200 #552200 #aa5500;
  color: #ffcc00;
  padding: 15px;
  font-size: 16px;
}

.rs-btn-challenge:hover {
  background: linear-gradient(180deg, #aa5500 0%, #884400 100%);
}

/* Multi-Token Stakes */
.rs-added-stakes {
  background: #1a1510;
  border: 2px inset #5a4a3a;
  padding: 8px;
  margin-bottom: 10px;
  min-height: 40px;
  max-height: 100px;
  overflow-y: auto;
}

.rs-no-stakes {
  color: #666;
  font-size: 12px;
  text-align: center;
  padding: 8px;
}

.rs-stake-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: #2a2318;
  border-radius: 4px;
  margin-bottom: 4px;
}

.rs-stake-item:last-child {
  margin-bottom: 0;
}

.rs-stake-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffcc00;
  font-size: 13px;
}

.rs-stake-item-usd {
  color: #00ff00;
  font-size: 11px;
}

.rs-stake-item-remove {
  background: #551111;
  border: none;
  color: #ff6666;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.rs-stake-item-remove:hover {
  background: #882222;
}

.rs-stake-total {
  text-align: right;
  color: #00ff00;
  font-size: 14px;
  font-weight: 700;
  padding: 5px 0;
  border-top: 1px solid #5a4a3a;
  margin-bottom: 10px;
}

.rs-add-stake {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  background: #1a1510;
  border: 2px solid #5a4a3a;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}

.rs-add-stake .rs-select {
  width: 85px;
  min-width: 85px;
  flex: 0 0 85px;
  border: none;
  border-right: 2px solid #5a4a3a;
  background: #252015;
  padding: 10px 8px;
  color: #ffcc00;
}

.rs-add-stake .rs-input {
  flex: 1;
  min-width: 80px;
  border: none;
  background: #1a1510;
  padding: 10px;
  color: #ffcc00;
}

.rs-btn-add {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-left: 2px solid #5a4a3a;
  color: #fff;
  width: 45px;
  min-width: 45px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.rs-btn-add:hover {
  background: linear-gradient(180deg, #2dd36f 0%, #1db954 100%);
}

.rs-rules-info {
  background: #2a2318;
  border: 2px solid #5a4a3a;
  padding: 10px;
}

.rs-rules-title {
  color: #ff9900;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.rs-rule {
  color: #00ff00;
  font-size: 11px;
  margin: 3px 0;
}

/* Responsive RS */
@media (max-width: 600px) {
  .rs-duel-grid, .rs-challenge-grid {
    grid-template-columns: 1fr;
  }
  
  .rs-inventory-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =====================================================
   HOME PAGE INFO PANELS
   ===================================================== */

.challenge-page-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-info-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.home-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.home-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 13px;
}

.panel-icon {
  font-size: 16px;
}

/* Tournament Panel */
.tournament-preview {
  padding: 15px;
}

.tournament-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px;
}

.coming-icon {
  font-size: 28px;
  margin-bottom: 5px;
}

.coming-text {
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 13px;
}

.coming-sub {
  color: var(--text-secondary);
  font-size: 11px;
  margin-top: 3px;
}

/* Balance & Withdraw Row */
.balance-withdraw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  margin-bottom: 6px;
}

.platform-balance-mini {
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance-label {
  color: var(--text-secondary);
  font-size: 12px;
}

.balance-value {
  color: var(--accent-green);
  font-weight: 700;
  font-size: 14px;
}

.btn-withdraw-mini {
  padding: 5px 12px;
  background: var(--accent-green);
  border: none;
  border-radius: 5px;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-withdraw-mini:hover:not(:disabled) {
  background: #16a34a;
}

.btn-withdraw-mini:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}

/* Quick Stats Panel */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 15px;
}

.quick-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.quick-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
}

.quick-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Activity Panel */
.activity-list {
  padding: 10px;
  max-height: 150px;
  overflow-y: auto;
}

.activity-empty {
  text-align: center;
  padding: 20px 10px;
  color: var(--text-secondary);
  font-size: 12px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: rgba(0,0,0,0.2);
}

.activity-item.win {
  border-left: 3px solid var(--accent-green);
}

.activity-item.loss {
  border-left: 3px solid var(--accent-red);
}

.activity-icon {
  font-size: 16px;
}

.activity-text {
  flex: 1;
  font-size: 12px;
}

.activity-time {
  font-size: 10px;
  color: var(--text-secondary);
}

/* Hot Challenges Panel */
.hot-challenges-list {
  padding: 10px;
  max-height: 150px;
  overflow-y: auto;
}

.hot-empty {
  text-align: center;
  padding: 20px 10px;
  color: var(--text-secondary);
  font-size: 12px;
}

.hot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.hot-item:hover {
  background: rgba(255,215,0,0.1);
}

.hot-player {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.hot-amount {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
}

/* Live Panel */
.live-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.live-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
}

.live-dot.pulse {
  animation: pulse 2s infinite;
}

.live-dot.fight {
  background: var(--accent-red);
}

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

/* Responsive Home Panels */
@media (max-width: 1000px) {
  .home-info-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .home-info-row {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   STATISTICS PAGE
   ===================================================== */

.stats-page {
  max-width: 1000px;
  margin: 0 auto;
}

.stats-page h2 {
  text-align: center;
  color: var(--accent-gold);
  margin-bottom: 25px;
  font-family: 'Cinzel', serif;
}

/* Hero Stats */
.stats-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.stat-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 25px 20px;
  text-align: center;
  transition: all 0.3s;
}

.stat-hero-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stat-hero-card.wins-card {
  border-color: var(--accent-green);
  background: linear-gradient(135deg, rgba(76,175,80,0.1) 0%, var(--bg-card) 100%);
}

.stat-hero-card.losses-card {
  border-color: var(--accent-red);
  background: linear-gradient(135deg, rgba(244,67,54,0.1) 0%, var(--bg-card) 100%);
}

.stat-hero-card.duels-card {
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, rgba(33,150,243,0.1) 0%, var(--bg-card) 100%);
}

.stat-hero-card.rate-card {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, var(--bg-card) 100%);
}

.hero-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.hero-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.hero-label {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Detailed Stats */
.stats-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.stats-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.stats-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 15px;
}

.stats-list {
  padding: 15px 20px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.stat-row.highlight {
  background: rgba(255,215,0,0.1);
  margin: 10px -20px -15px;
  padding: 15px 20px;
  border-radius: 0 0 12px 12px;
}

.stat-name {
  color: var(--text-secondary);
  font-size: 14px;
}

.stat-value {
  font-weight: 700;
  font-size: 15px;
}

.stat-value.gold { color: var(--accent-gold); }
.stat-value.green { color: var(--accent-green); }
.stat-value.red { color: var(--accent-red); }
.stat-value.purple { color: var(--accent-purple); }
.stat-value.blue { color: var(--accent-blue); }

/* Achievements */
.achievements-section {
  grid-column: 1 / -1;
}

.achievements-grid {
  display: flex;
  gap: 15px;
  padding: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.achievement {
  width: 60px;
  height: 60px;
  background: rgba(0,0,0,0.3);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  filter: grayscale(100%);
  transition: all 0.3s;
  cursor: pointer;
}

.achievement:hover {
  transform: scale(1.1);
}

.achievement.unlocked {
  opacity: 1;
  filter: none;
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(255,215,0,0.2) 0%, rgba(0,0,0,0.3) 100%);
  box-shadow: 0 0 15px rgba(255,215,0,0.3);
}

.achievement-icon {
  font-size: 28px;
}

.achievements-progress {
  text-align: center;
  padding: 15px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
}

/* Stats Footer with Export Link */
.stats-footer {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

.export-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.export-link:hover {
  color: var(--accent-purple);
  text-decoration: underline;
}

/* Responsive Stats */
@media (max-width: 800px) {
  .stats-hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .stats-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   WELCOME BANNER
   ===================================================== */

.welcome-banner {
  background: linear-gradient(135deg, rgba(139,92,246,0.15) 0%, rgba(59,130,246,0.15) 100%);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-bottom: 10px;
}

.welcome-content {
  flex: 1;
}

.welcome-text h2 {
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  font-size: 22px;
  margin-bottom: 8px;
}

.welcome-text p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.welcome-steps {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--accent-purple);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.welcome-stats {
  display: flex;
  gap: 25px;
}

.platform-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 20px;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  min-width: 100px;
}

.platform-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-gold);
}

.platform-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* =====================================================
   INVITE/REFERRAL PAGE
   ===================================================== */

.invite-page {
  max-width: 800px;
  margin: 0 auto;
}

.invite-hero {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(139,92,246,0.1) 100%);
  border-radius: 20px;
  margin-bottom: 25px;
}

.invite-hero-icon {
  font-size: 60px;
  margin-bottom: 15px;
}

.invite-hero h2 {
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  font-size: 28px;
  margin-bottom: 10px;
}

.invite-hero p {
  color: var(--text-secondary);
  font-size: 16px;
}

.invite-hero strong {
  color: var(--accent-green);
}

.invite-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 20px;
}

.invite-section .section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 15px;
}

/* Referral Code */
.referral-code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 25px 20px;
}

.referral-code {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 4px;
  font-family: 'Courier New', monospace;
}

.btn-copy {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.referral-link-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
}

.referral-link {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 13px;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  gap: 15px;
  padding: 20px;
}

.share-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.share-btn.twitter {
  background: linear-gradient(135deg, #1da1f2 0%, #0d8ecf 100%);
  color: #fff;
}

.share-btn.telegram {
  background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
  color: #fff;
}

.share-btn.discord {
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  color: #fff;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* Earnings Grid */
.earnings-grid {
  display: flex;
  justify-content: space-around;
  padding: 25px;
}

.earning-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.earning-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
}

.earning-value.green {
  color: var(--accent-green);
}

.earning-value.gold {
  color: var(--accent-gold);
}

.earning-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Referral Withdraw Box */
.referral-withdraw-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  margin: 15px 20px;
}

.withdraw-balance {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.withdraw-label {
  color: var(--text-secondary);
  font-size: 13px;
}

.withdraw-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-green);
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.btn-withdraw-referral {
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent-green), #16a34a);
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-withdraw-referral:hover:not(:disabled) {
  background: linear-gradient(135deg, #16a34a, #15803d);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-withdraw-referral:disabled {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: not-allowed;
  box-shadow: none;
}

/* Trust Box */
.referral-trust-box {
  padding: 20px;
  background: rgba(139, 92, 246, 0.05);
  border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.trust-title {
  color: var(--accent-purple);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trust-list li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.trust-list li strong {
  color: var(--text-primary);
}

/* How It Works */
.how-steps {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.how-step {
  display: flex;
  align-items: center;
  gap: 15px;
}

.how-step-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.how-step-text {
  font-size: 14px;
}

.how-step-text strong {
  color: var(--accent-gold);
}

.fee-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 20px;
  background: rgba(0,0,0,0.2);
  font-size: 13px;
}

.fee-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fee-label {
  color: var(--text-secondary);
}

.fee-value {
  color: var(--text-primary);
  font-weight: 600;
}

.fee-value.highlight {
  color: var(--accent-green);
  font-size: 15px;
}

.fee-example {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  margin-top: 5px;
}

/* Top Referrers */
.referrers-list {
  padding: 15px;
}

.referrer-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
}

.referrer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  margin-bottom: 10px;
}

.referrer-rank {
  font-weight: 700;
  color: var(--accent-gold);
  margin-right: 15px;
}

.referrer-name {
  flex: 1;
}

.referrer-count {
  color: var(--text-secondary);
  font-size: 13px;
  margin-right: 15px;
}

.referrer-earnings {
  color: var(--accent-green);
  font-weight: 700;
}

/* =====================================================
   FOOTER
   ===================================================== */

.game-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 25px;
  background: linear-gradient(180deg, rgba(20,20,30,1) 0%, rgba(10,10,15,1) 100%);
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-secondary);
}

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

.footer-time {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--text-primary);
}

.footer-date {
  font-size: 11px;
}

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

.footer-fees {
  font-size: 11px;
  opacity: 0.7;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
}

.status-indicator.online {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.solana-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.solana-icon {
  color: var(--accent-purple);
}

.footer-ping {
  font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 800px) {
  .welcome-banner {
    flex-direction: column;
    text-align: center;
  }
  
  .welcome-steps {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .share-buttons {
    flex-direction: column;
  }
  
  .game-footer {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }
}

/* =====================================================
   AVATAR SETTINGS
   ===================================================== */

.settings-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.settings-section-title {
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent-gold);
  font-size: 14px;
}

.avatar-settings {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.current-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid var(--accent-gold);
}

.current-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  font-size: 32px;
}

.avatar-controls {
  display: flex;
  gap: 10px;
}

.btn-small {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.btn-small:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.btn-small.btn-danger:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

.avatar-hint {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Header avatar with image */
.player-avatar-small {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
}

.player-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =====================================================
   STATS TOGGLE
   ===================================================== */

.stats-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.stats-header-row h2 {
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  margin: 0;
}

.stats-toggle-wrapper {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.stats-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.stats-toggle-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.stats-toggle-btn.active {
  background: var(--accent-purple);
  color: #fff;
}

/* Server stats info banner */
.server-stats-banner {
  background: linear-gradient(135deg, rgba(139,92,246,0.2) 0%, rgba(59,130,246,0.2) 100%);
  border: 1px solid var(--accent-purple);
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 20px;
  display: none;
}

.server-stats-banner.visible {
  display: block;
}

.server-stats-banner-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.server-banner-stat {
  text-align: center;
}

.server-banner-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-gold);
}

.server-banner-label {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Activity pot display */
.activity-pot {
  color: var(--accent-gold);
  font-weight: 600;
  margin-left: 5px;
}

/* Activity item improved styling */
.activity-item strong {
  color: var(--text-primary);
}

.activity-item.win .activity-icon {
  color: var(--accent-green);
}

.activity-item.loss .activity-icon {
  color: var(--accent-red);
}

/* =====================================================
   WALLET CONNECTION
   ===================================================== */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  min-width: 400px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  animation: slideUp 0.3s ease;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.3);
}

.modal-header h3 {
  margin: 0;
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 25px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

/* Chain Selector */
.chain-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.chain-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--border-color);
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  position: relative;
}

.chain-btn:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.chain-btn.active {
  border-color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.1);
  color: var(--accent-gold);
}

.chain-btn .chain-icon {
  font-size: 32px;
}

.chain-btn .coming-soon {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  background: var(--accent-purple);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
}

/* Wallet Options */
.wallet-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-options.hidden {
  display: none;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
  font-size: 16px;
}

.wallet-option:hover {
  background: var(--bg-hover);
  border-color: var(--accent-purple);
  transform: translateX(5px);
}

.wallet-option img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.coming-soon-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-secondary);
}

.btn-phantom-open {
  display: block;
  background: linear-gradient(135deg, #AB9FF2 0%, #7B68EE 100%);
  color: #fff;
  padding: 15px 25px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  margin-top: 15px;
  transition: all 0.2s;
}

.btn-phantom-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(171, 159, 242, 0.4);
}

.coming-soon-message span:first-child {
  font-size: 48px;
}

/* Connected Wallet Button */
.btn-wallet-main.connected {
  background: linear-gradient(135deg, var(--accent-green) 0%, #2d9048 100%);
  border-color: var(--accent-green);
}

.btn-wallet-main .chain-icon {
  margin-right: 5px;
}

/* Wallet Panel */
.wallet-panel {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 350px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  z-index: 1000;
  display: none;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.wallet-panel.visible {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.wallet-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.3);
}

.wallet-address {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--accent-gold);
}

.wallet-panel-body {
  max-height: 400px;
  overflow-y: auto;
}

.wallet-token-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.wallet-token-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.token-info {
  display: flex;
  flex-direction: column;
}

.token-symbol {
  font-weight: 700;
  color: var(--text-primary);
}

.token-balance {
  font-size: 12px;
  color: var(--text-secondary);
}

.token-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.token-price {
  font-size: 11px;
  color: var(--text-secondary);
}

.token-usd {
  font-weight: 700;
  color: var(--accent-gold);
}

.btn-stake-token {
  background: var(--accent-purple);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-stake-token:hover {
  background: var(--accent-blue);
  transform: scale(1.05);
}

.wallet-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-secondary);
}

.wallet-panel-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
}

.btn-disconnect {
  background: rgba(255, 82, 82, 0.2);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  width: 100%;
}

.btn-disconnect:hover {
  background: var(--accent-red);
  color: #fff;
}

/* Stake Modal */
.stake-modal {
  min-width: 350px;
}

.stake-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  margin-bottom: 20px;
}

.stake-usd {
  color: var(--accent-gold);
}

.stake-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.stake-input-group input {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 18px;
}

.stake-input-group input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.btn-max {
  background: var(--accent-purple);
  border: none;
  color: #fff;
  padding: 12px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.stake-presets {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.stake-presets button {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.stake-presets button:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.stake-value {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
  padding: 20px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 10px;
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-confirm {
  background: linear-gradient(135deg, var(--accent-green) 0%, #2d9048 100%);
  border: none;
  color: #fff;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-confirm:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
}

/* Real token indicator */
.stake-real-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  background: var(--accent-green);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */

.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-radius: 12px;
  min-width: 300px;
  max-width: 500px;
  animation: toastSlideIn 0.3s ease;
  pointer-events: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

@keyframes toastSlideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast-fade-out {
  animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastFadeOut {
  to {
    transform: translateY(-20px);
    opacity: 0;
  }
}

.toast-error {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.95) 0%, rgba(183, 28, 28, 0.95) 100%);
  border: 1px solid #f44336;
}

.toast-success {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.95) 0%, rgba(46, 125, 50, 0.95) 100%);
  border: 1px solid #4caf50;
}

.toast-info {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.95) 0%, rgba(21, 101, 192, 0.95) 100%);
  border: 1px solid #2196f3;
}

.toast-icon {
  font-size: 20px;
}

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

.toast-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* =====================================================
   WALLET MODAL IMPROVEMENTS
   ===================================================== */

.chain-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
}

.chain-badge {
  background: linear-gradient(135deg, #9945FF 0%, #14F195 100%);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 16px;
}

.chain-note {
  color: var(--text-secondary);
  font-size: 13px;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
  width: 100%;
  margin-bottom: 12px;
}

.wallet-option.detected {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
}

.wallet-option.not-detected {
  opacity: 0.6;
}

.wallet-option:hover {
  background: var(--bg-hover);
  border-color: var(--accent-purple);
  transform: translateX(5px);
}

.wallet-option.detected:hover {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
}

.wallet-option-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}

.wallet-icon {
  font-size: 28px;
  width: 40px;
  text-align: center;
}

.wallet-name {
  font-size: 16px;
  font-weight: 600;
}

.wallet-status {
  font-size: 12px;
  color: var(--text-secondary);
}

.wallet-option.detected .wallet-status {
  color: #22c55e;
}

.wallet-status.detected {
  color: var(--accent-green);
  background: rgba(76, 175, 80, 0.2);
}

.wallet-info {
  margin-top: 25px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.wallet-info p {
  margin: 0 0 15px 0;
  color: var(--text-secondary);
  text-align: center;
}

.wallet-info ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wallet-info li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.wallet-install-hint {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  text-align: center;
}

.wallet-install-hint p {
  margin: 0 0 12px;
  color: #ffd700;
  font-size: 13px;
}

.install-links {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.install-link {
  padding: 8px 16px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 8px;
  color: #AB9FF2;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
}

.install-link:hover {
  background: rgba(139, 92, 246, 0.3);
}

.wallet-connect-modal {
  min-width: 420px;
}

/* Wallet total in panel */
.wallet-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(139,92,246,0.2) 0%, rgba(59,130,246,0.2) 100%);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}

.wallet-total-value {
  font-size: 20px;
  color: var(--accent-gold);
}

/* Connected icon */
.wallet-connected-icon {
  color: #14F195;
  margin-right: 5px;
}

/* =====================================================
   CUSTOM SCROLLBAR - Dark Theme
   ===================================================== */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #9b6dff 0%, #5ba3f5 100%);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-purple) rgba(0, 0, 0, 0.3);
}

/* Specific scrollable areas with nicer styling */
.rs-added-stakes,
.chat-messages,
.leaderboard-body,
.wallet-panel-body,
.wallet-tokens-list,
.referrers-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.7) rgba(0, 0, 0, 0.3);
}

.rs-added-stakes::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.leaderboard-body::-webkit-scrollbar,
.wallet-panel-body::-webkit-scrollbar {
  width: 6px;
}

.rs-added-stakes::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track,
.leaderboard-body::-webkit-scrollbar-track,
.wallet-panel-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  margin: 5px 0;
}

.rs-added-stakes::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.leaderboard-body::-webkit-scrollbar-thumb,
.wallet-panel-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.6) 0%, rgba(139, 92, 246, 0.6) 100%);
  border-radius: 3px;
}

.rs-added-stakes::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover,
.leaderboard-body::-webkit-scrollbar-thumb:hover,
.wallet-panel-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
}

/* Items grid scrollbar */
.rs-items-grid::-webkit-scrollbar {
  width: 6px;
}

.rs-items-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.rs-items-grid::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.5);
  border-radius: 3px;
}

/* =====================================================
   WALLET PANEL - Enhanced
   ===================================================== */

.wallet-section {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

.wallet-section:last-child {
  border-bottom: none;
}

.wallet-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.wallet-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-weight: 600;
}

.wallet-total-value {
  font-size: 20px;
  color: var(--accent-gold);
}

.wallet-total-value.platform-balance {
  color: var(--accent-green);
}

.wallet-token-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
}

.wallet-token-row .token-symbol {
  width: 60px;
  font-weight: 600;
  color: var(--text-primary);
}

.wallet-token-row .token-balance {
  flex: 1;
  color: var(--text-secondary);
}

.wallet-token-row .token-usd {
  color: var(--accent-gold);
  font-weight: 500;
}

.platform-balance-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.btn-withdraw {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent-green) 0%, #2d9048 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-withdraw:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.btn-withdraw.disabled {
  background: var(--bg-dark);
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* Withdraw Modal */
.withdraw-modal {
  min-width: 400px;
}

.withdraw-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid var(--accent-green);
  border-radius: 12px;
  margin-bottom: 20px;
}

.withdraw-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-green);
}

.withdraw-to {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin-bottom: 20px;
}

.withdraw-address {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--accent-purple);
}

.withdraw-note {
  padding: 15px;
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 8px 8px 0;
}

.withdraw-note p {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.withdraw-note p:last-child {
  margin-bottom: 0;
}

/* Modal Footer */
.modal-footer .btn-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.modal-footer .btn-cancel:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.modal-footer .btn-confirm {
  background: linear-gradient(135deg, var(--accent-green) 0%, #2d9048 100%);
  border: none;
  color: #fff;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.modal-footer .btn-confirm:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
}

/* Wallet button connected state */
#walletBtn.connected {
  background: linear-gradient(135deg, rgba(20, 241, 149, 0.2) 0%, rgba(153, 69, 255, 0.2) 100%);
  border-color: #14F195;
}

/* =====================================================
   RESULT MODAL SHARE BUTTONS
   ===================================================== */

.result-share {
  margin: 20px 0;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.share-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.share-buttons-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.share-btn-small {
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  user-select: none;
}

.share-btn-small:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.share-btn-small:active {
  transform: scale(0.95);
}

.share-btn-small.twitter {
  background: #000;
  color: #fff;
  border: 1px solid #333;
}

.share-btn-small.telegram {
  background: #0088cc;
  color: #fff;
}

.share-btn-small.discord {
  background: #5865f2;
  color: #fff;
}

.share-btn-small.copy {
  background: var(--bg-dark);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.replay-link {
  display: inline-block;
  color: var(--accent-purple);
  font-size: 13px;
  text-decoration: none;
  padding: 10px 20px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 8px;
  transition: all 0.2s;
  border: 1px solid rgba(139, 92, 246, 0.3);
  cursor: pointer;
}

.replay-link:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #a78bfa;
  transform: translateY(-2px);
}

/* Result content improvements */
.result-content {
  text-align: center;
  padding: 30px;
}

.result-blocks {
  font-size: 12px;
  color: var(--accent-purple);
  display: block;
  margin-top: 5px;
}

/* =====================================================
   LOGIN FOOTER STATS
   ===================================================== */

.login-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 15px 30px;
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.login-footer-item .status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 2s infinite;
}

.login-footer-item .status-indicator.connecting {
  background: var(--accent-gold);
}

.login-footer-item .status-indicator.error {
  background: var(--accent-red);
  animation: none;
}

.solana-icon-small {
  color: #14F195;
  font-weight: bold;
}

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

/* Make login container position relative for absolute footer */
.login-container {
  position: relative;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* =====================================================
   FIGHTER PROFILE PICTURES
   ===================================================== */

.fighter-profile-pic {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: none;
  object-fit: cover;
  z-index: 5;
}

.fighter.challenger .fighter-profile-pic {
  border: 3px solid var(--accent-blue);
}

.fighter.opponent .fighter-profile-pic {
  border: 3px solid var(--accent-red);
}

/* Make fighter-avatar relative for positioning */
.fighter-avatar {
  position: relative;
}

/* Hide sprite when profile pic is visible */
.fighter-avatar:has(.fighter-profile-pic[style*="display: block"]) .fighter-sprite {
  display: none;
}

/* Subtle glow on fighter cards */
.fighter.challenger {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.fighter.opponent {
  box-shadow: 0 0 30px rgba(244, 67, 54, 0.2);
}

/* Combat log improvements */
.combat-log {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.5) transparent;
}

.combat-log::-webkit-scrollbar {
  width: 4px;
}

.combat-log::-webkit-scrollbar-track {
  background: transparent;
}

.combat-log::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.5);
  border-radius: 2px;
}

/* Fighter border glow on low HP */
.fighter.low-hp {
  animation: lowHpPulse 1s infinite;
}

@keyframes lowHpPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(244, 67, 54, 0.3); }
  50% { box-shadow: 0 0 50px rgba(244, 67, 54, 0.6); }
}

/* =====================================================
   IMPROVED DUEL SCREEN LAYOUT
   ===================================================== */

/* Duel screen takes full height minus header - only when active */
#duelScreen.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(180deg, #0a0a15 0%, #12121f 50%, #0a0a15 100%);
}

/* Battle stats overlay more compact */
.battle-stats-overlay {
  padding: 8px 20px;
  background: rgba(0, 0, 0, 0.7);
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

/* Duel header more prominent */
.duel-header {
  padding: 15px 30px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
}

.round-info {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.duel-stake {
  font-size: 32px;
  font-weight: 700;
  color: #22c55e;
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

/* Fighter cards - more compact and visually interesting */
.fighter {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 25px;
  background: linear-gradient(145deg, rgba(20, 20, 35, 0.95), rgba(10, 10, 20, 0.95));
  border-radius: 15px;
  border: 2px solid;
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

/* Fighter card decorative corner */
.fighter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.5;
}

.fighter.challenger::before {
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
}

.fighter.opponent::before {
  background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
}

/* Fighter avatar larger and centered */
.fighter-avatar {
  width: 140px;
  height: 140px;
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.9), rgba(15, 15, 30, 0.9));
  border-radius: 15px;
  margin: 10px 0 15px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.fighter.challenger .fighter-avatar {
  border: 3px solid var(--accent-blue);
  box-shadow: 0 5px 25px rgba(59, 130, 246, 0.3);
}

.fighter.opponent .fighter-avatar {
  border: 3px solid var(--accent-red);
  box-shadow: 0 5px 25px rgba(244, 67, 54, 0.3);
}

.fighter-sprite {
  font-size: 70px;
}

/* Health bar improvements */
.health-bar-container {
  width: 100%;
  margin: 15px 0;
}

.health-bar {
  height: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.health-fill {
  height: 100%;
  transition: width 0.5s ease;
  border-radius: 10px;
}

.challenger-health {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.opponent-health {
  background: linear-gradient(90deg, #ef4444, #f87171);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.health-text {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-top: 5px;
  display: block;
  text-align: center;
}

/* Combat log - more compact */
.combat-log {
  width: 100%;
  min-height: 100px;
  max-height: 150px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  margin-top: auto;
  font-size: 13px;
}

.combat-log-entry {
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* VS container improvements */
.vs-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.vs-icon {
  font-size: 60px;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
  animation: vsFloat 2s ease-in-out infinite;
}

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

/* Combat actions panel */
.combat-actions {
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.95), rgba(15, 15, 30, 0.95));
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.actions-label {
  font-size: 12px;
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 10px;
  text-align: center;
}

.action-btn {
  width: 100%;
  padding: 10px 15px;
  margin: 5px 0;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.action-btn.power {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
}

.action-btn.defend {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
}

.action-btn.dodge {
  background: linear-gradient(135deg, #ffd700, #ca8a04);
  color: #000;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Items display */
.fighter-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0;
  min-height: 40px;
}

.item-badge {
  font-size: 24px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s;
}

.item-badge:hover {
  transform: scale(1.2);
}

/* Duel chat at bottom */
.duel-chat-bottom {
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  margin-top: auto;
}

.duel-chat-messages {
  max-height: 60px;
  overflow-y: auto;
  margin-bottom: 10px;
}

/* Fighter stake display */
.fighter-stake {
  font-size: 14px;
  color: #ffd700;
  padding: 8px 15px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 8px;
  margin: 10px 0;
}

/* =====================================================
   ENHANCED 3D COMBAT ARENA
   ===================================================== */

.combat-arena-3d {
  display: grid;
  grid-template-columns: 1fr 320px 1fr;
  gap: 10px;
  padding: 15px 30px;
  min-height: 450px;
  background: linear-gradient(180deg, #0a0a15 0%, #151525 50%, #1a1a2e 100%);
  position: relative;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1;
}

/* Battlefield Background */
.battlefield {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.arena-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg, transparent 0%, rgba(75, 0, 130, 0.1) 50%, rgba(75, 0, 130, 0.2) 100%);
  transform: perspective(500px) rotateX(60deg);
  transform-origin: bottom;
}

.arena-effects {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Combatant Sides */
.combatant {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  padding: 10px;
}

.challenger-side {
  align-items: center;
  justify-content: flex-start;
}

.challenger-side .combatant-stage {
  margin-left: auto;
}

.opponent-side {
  align-items: center;
  justify-content: flex-start;
}

.opponent-side .combatant-stage {
  margin-right: auto;
}

.combatant-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.combatant-flag {
  font-size: 11px;
  font-family: 'Courier New', monospace;
  color: #888;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.combatant-name {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.combatant-level {
  font-size: 12px;
  color: #ffd700;
}

/* Character Stage */
.combatant-stage {
  position: relative;
  width: 160px;
  height: 180px;
  margin: 5px 0;
}

/* Animated Character */
.character-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.character-shadow {
  position: absolute;
  bottom: 10px;
  width: 80px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.5) 0%, transparent 70%);
  border-radius: 50%;
  animation: shadow-pulse 1s ease-in-out infinite;
}

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

.character-body {
  position: relative;
  width: 80px;
  height: 140px;
  animation: idle-bounce 1.5s ease-in-out infinite;
}

@keyframes idle-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.character-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffdbac 0%, #e5a98f 100%);
  box-shadow: inset -5px -5px 10px rgba(0,0,0,0.2);
}

.challenger-body .character-head {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.challenger-body .character-head::before {
  content: '😎';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
}

.opponent-body .character-head {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.opponent-body .character-head::before {
  content: '😈';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
}

.character-torso {
  position: absolute;
  top: 35px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 10px;
}

.challenger-body .character-torso {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.opponent-body .character-torso {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.character-arm {
  position: absolute;
  top: 40px;
  width: 15px;
  height: 40px;
  border-radius: 8px;
  transform-origin: top center;
}

.challenger-body .character-arm {
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}

.opponent-body .character-arm {
  background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
}

.left-arm {
  left: 5px;
  animation: arm-swing-left 1.5s ease-in-out infinite;
}

.right-arm {
  right: 5px;
  animation: arm-swing-right 1.5s ease-in-out infinite;
}

@keyframes arm-swing-left {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

@keyframes arm-swing-right {
  0%, 100% { transform: rotate(5deg); }
  50% { transform: rotate(-5deg); }
}

.character-weapon {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
}

.character-leg {
  position: absolute;
  top: 80px;
  width: 18px;
  height: 45px;
  border-radius: 8px;
}

.challenger-body .character-leg {
  background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%);
}

.opponent-body .character-leg {
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
}

.left-leg { left: 15px; }
.right-leg { right: 15px; }

/* Attack Animations */
.character-body.attacking {
  animation: attack-lunge 0.4s ease-out forwards !important;
}

.challenger-body.attacking {
  animation: attack-lunge-right 0.4s ease-out forwards !important;
}

.opponent-body.attacking {
  animation: attack-lunge-left 0.4s ease-out forwards !important;
}

@keyframes attack-lunge-right {
  0% { transform: translateX(0) rotate(0); }
  30% { transform: translateX(50px) rotate(-10deg); }
  50% { transform: translateX(80px) rotate(-15deg); }
  100% { transform: translateX(0) rotate(0); }
}

@keyframes attack-lunge-left {
  0% { transform: translateX(0) rotate(0); }
  30% { transform: translateX(-50px) rotate(10deg); }
  50% { transform: translateX(-80px) rotate(15deg); }
  100% { transform: translateX(0) rotate(0); }
}

.character-body.hit {
  animation: take-hit 0.3s ease-out !important;
}

@keyframes take-hit {
  0% { transform: translateX(0); filter: brightness(1); }
  20% { transform: translateX(-15px); filter: brightness(2) hue-rotate(30deg); }
  40% { transform: translateX(10px); filter: brightness(1.5); }
  60% { transform: translateX(-5px); filter: brightness(1.2); }
  100% { transform: translateX(0); filter: brightness(1); }
}

.character-body.dodging {
  animation: dodge-animation 0.5s ease-out !important;
}

@keyframes dodge-animation {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-30px) scale(0.8); opacity: 0.5; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.character-body.blocking {
  animation: block-animation 0.3s ease-out !important;
}

@keyframes block-animation {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); filter: brightness(1.5); }
  100% { transform: scale(1); }
}

.character-body.powered {
  animation: power-glow 0.5s ease-out !important;
  filter: drop-shadow(0 0 20px #ff6b00);
}

@keyframes power-glow {
  0% { filter: drop-shadow(0 0 5px #ff6b00); }
  50% { filter: drop-shadow(0 0 30px #ff6b00); }
  100% { filter: drop-shadow(0 0 20px #ff6b00); }
}

/* Character Effects Layer */
.character-effects {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

/* Floating Damage Numbers */
.damage-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: visible;
}

.damage-number {
  position: absolute;
  font-size: 28px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 10px currentColor;
  animation: damage-float 1.5s ease-out forwards;
  white-space: nowrap;
}

.damage-number.crit {
  font-size: 36px;
  color: #ffd700 !important;
  animation: damage-float-crit 1.5s ease-out forwards;
}

.damage-number.heal {
  color: #22c55e !important;
}

.damage-number.miss {
  color: #888 !important;
  font-style: italic;
}

@keyframes damage-float {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  20% { transform: translateY(-20px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-80px) scale(0.8); opacity: 0; }
}

@keyframes damage-float-crit {
  0% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }
  20% { transform: translateY(-30px) scale(1.5) rotate(-5deg); opacity: 1; }
  100% { transform: translateY(-100px) scale(1) rotate(5deg); opacity: 0; }
}

/* Health Bars 3D */
.health-section {
  width: 100%;
  margin-top: 15px;
}

.health-bar-3d {
  position: relative;
  width: 100%;
}

.health-bar-bg {
  height: 28px;
  background: linear-gradient(180deg, #1a1a2e 0%, #0a0a15 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #333;
  position: relative;
}

.health-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  transition: width 0.5s ease-out;
  border-radius: 12px;
}

.challenger-health-fill {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), 0 0 10px rgba(34, 197, 94, 0.5);
}

.opponent-health-fill {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), 0 0 10px rgba(34, 197, 94, 0.5);
}

.health-bar-fill.low {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%) !important;
  animation: health-low-pulse 0.5s ease-in-out infinite;
}

@keyframes health-low-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.8); }
}

.health-bar-damage {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 0;
  background: rgba(255, 0, 0, 0.5);
  transition: width 0.3s ease-out;
}

.health-numbers {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.stake-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 14px;
  color: #ffd700;
}

.stake-icon {
  font-size: 16px;
}

/* Combat Items Bar */
.combat-items-bar {
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(180deg, rgba(30, 30, 60, 0.8) 0%, rgba(20, 20, 40, 0.9) 100%);
  border-radius: 12px;
  padding: 12px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.items-label {
  font-size: 11px;
  color: #ffd700;
  text-align: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
}

.combat-items {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 52px;
}

.combat-items:empty::after {
  content: 'No items selected';
  color: #666;
  font-size: 12px;
  font-style: italic;
}

.combat-item {
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #3a3a5a 0%, #2a2a4a 100%);
  border: 2px solid #555;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.combat-item:hover:not(.used):not(.opponent-item) {
  transform: scale(1.2) translateY(-5px);
  border-color: #ffd700;
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
}

.combat-item:active:not(.used):not(.opponent-item) {
  transform: scale(0.95);
}

.combat-item.used {
  opacity: 0.3;
  filter: grayscale(1);
  cursor: not-allowed;
  border-color: #333;
}

.combat-item.used::after {
  content: '✓';
  position: absolute;
  top: -5px;
  right: -5px;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.combat-item.activating {
  animation: item-activate 0.5s ease-out;
}

@keyframes item-activate {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
  50% { transform: scale(1.3); box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
}

.opponent-items .combat-item {
  cursor: default;
  opacity: 0.7;
}

.opponent-items .items-label {
  color: #888;
}

/* Battle Center Zone */
.battle-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 280px;
  z-index: 1;
  padding-top: 20px;
}

.clash-zone {
  width: 150px;
  height: 150px;
  position: relative;
  margin-bottom: 20px;
}

.clash-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
  opacity: 0;
  pointer-events: none;
}

.clash-effect.active {
  animation: clash-burst 0.5s ease-out forwards;
}

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

.vs-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  padding: 10px 25px;
  border-radius: 25px;
  margin-bottom: 20px;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.vs-text {
  font-size: 24px;
  font-weight: bold;
  color: #000;
  text-shadow: none;
}

/* Enhanced Action Buttons */
.combat-actions-panel {
  background: linear-gradient(180deg, rgba(30, 30, 60, 0.9) 0%, rgba(20, 20, 40, 0.95) 100%);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 15px;
}

.actions-title {
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.action-btn-3d {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.action-btn-3d.power {
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  border-color: #ef4444;
}

.action-btn-3d.defend {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #3b82f6;
}

.action-btn-3d.dodge {
  background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
  border-color: #8b5cf6;
}

.action-btn-3d:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.action-btn-3d:active:not(:disabled) {
  transform: translateY(0);
}

.action-btn-3d.active {
  box-shadow: 0 0 25px currentColor;
  animation: action-selected 0.5s ease-in-out infinite;
}

@keyframes action-selected {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.action-btn-3d:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.action-icon-3d {
  font-size: 28px;
  margin-bottom: 4px;
}

.action-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.action-name {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
}

.action-desc {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
}

.action-uses-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-hint {
  text-align: center;
  font-size: 11px;
  color: #888;
  margin-top: 10px;
}

/* Combat Log Panel */
.combat-log-panel {
  width: 100%;
  max-width: 280px;
  height: 120px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.combat-log-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 10px;
  font-size: 12px;
}

.combat-log-scroll::-webkit-scrollbar {
  width: 4px;
}

.combat-log-scroll::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 2px;
}

.log-entry {
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #aaa;
}

.log-entry.damage { color: #ef4444; }
.log-entry.crit { color: #ffd700; font-weight: bold; }
.log-entry.heal { color: #22c55e; }
.log-entry.miss { color: #666; font-style: italic; }
.log-entry.action { color: #8b5cf6; }
.log-entry.item { color: #f59e0b; }

/* Round Timer */
.round-timer {
  width: 200px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 10px 0;
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #ffd700 50%, #ef4444 100%);
  transition: width 0.1s linear;
  border-radius: 3px;
}

/* Responsive */
@media (max-width: 900px) {
  .combat-arena-3d {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 15px;
  }
  
  .combatant {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .challenger-side, .opponent-side {
    align-items: center;
  }
  
  .combatant-stage {
    width: 150px;
    height: 180px;
  }
  
  .battle-center {
    order: -1;
    min-width: auto;
  }
  
  .action-buttons {
    flex-wrap: wrap;
  }
}

/* Profile Pictures in Combat */
.combatant-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
  margin-bottom: 10px;
  background: linear-gradient(145deg, #2a2a4a 0%, #1a1a2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.combatant-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.combatant-avatar-placeholder {
  font-size: 30px;
  opacity: 0.5;
}

.challenger-side .combatant-avatar {
  border-color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.opponent-side .combatant-avatar {
  border-color: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* Rematch Button */
.rematch-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  display: none;
  text-align: center;
}

.rematch-container.visible {
  display: block;
  animation: rematch-pop 0.5s ease-out;
}

@keyframes rematch-pop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.1); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.rematch-panel {
  background: linear-gradient(180deg, #1a1a2e 0%, #0a0a15 100%);
  border: 3px solid #ffd700;
  border-radius: 20px;
  padding: 30px 50px;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.4), 0 0 100px rgba(255, 215, 0, 0.2);
}

.rematch-title {
  color: #ffd700;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.rematch-subtitle {
  color: #888;
  font-size: 14px;
  margin-bottom: 20px;
}

.rematch-btn {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  border: none;
  padding: 20px 60px;
  font-size: 24px;
  font-weight: bold;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 4px 30px rgba(34, 197, 94, 0.5);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 0 auto 15px;
  min-width: 250px;
}

.rematch-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 40px rgba(34, 197, 94, 0.7);
}

.rematch-btn:disabled {
  background: linear-gradient(180deg, #666 0%, #444 100%);
  cursor: not-allowed;
  box-shadow: none;
}

.rematch-btn .icon {
  font-size: 32px;
}

.rematch-waiting {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 4px 30px rgba(245, 158, 11, 0.5) !important;
}

.rematch-timer {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}

.rematch-timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #ffd700);
  width: 100%;
  transition: width 0.1s linear;
  border-radius: 3px;
}

.rematch-skip {
  color: #666;
  font-size: 12px;
  margin-top: 15px;
  cursor: pointer;
}

.rematch-skip:hover {
  color: #fff;
}

.rematch-incoming {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #1a1a2e 0%, #0a0a15 100%);
  border: 3px solid #ffd700;
  border-radius: 20px;
  padding: 30px 50px;
  z-index: 1001;
  text-align: center;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.4);
  display: none;
}

.rematch-incoming.visible {
  display: block;
  animation: pop-in 0.3s ease-out;
}

@keyframes pop-in {
  from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.rematch-incoming h3 {
  color: #ffd700;
  margin-bottom: 15px;
  font-size: 24px;
}

.rematch-incoming p {
  color: #fff;
  margin-bottom: 20px;
}

.rematch-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.rematch-accept {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
}

.rematch-decline {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
}

/* Stat Value Colors */
.stat-value.orange { color: #f59e0b; }
.stat-value.blue { color: #3b82f6; }
.stat-value.purple { color: #8b5cf6; }
.stat-value.red { color: #ef4444; }
.stat-value.green { color: #22c55e; }
.stat-value.gold { color: #ffd700; }

/* Flag emoji fallback for Windows */
.combatant-flag {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}

/* ===== CHARACTER DAMAGE STATES ===== */
.character-container.damage-light .character-body {
  filter: brightness(0.95);
}

.character-container.damage-medium .character-body {
  filter: brightness(0.85) saturate(0.9);
}

.character-container.damage-medium .character-body::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 30%;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 4px #ef4444;
}

.character-container.damage-heavy .character-body {
  filter: brightness(0.7) saturate(0.7);
  animation: damage-wobble 2s ease-in-out infinite;
}

.character-container.damage-heavy .character-body::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 25%;
  width: 12px;
  height: 12px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444, 15px 20px 0 6px #ef4444;
}

.character-container.damage-critical .character-body {
  filter: brightness(0.5) saturate(0.5) sepia(0.3);
  animation: damage-critical 0.5s ease-in-out infinite;
}

.character-container.damage-critical .character-body::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 20%;
  width: 15px;
  height: 15px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 
    0 0 10px #ef4444, 
    20px 15px 0 8px #ef4444,
    -5px 30px 0 5px #ef4444,
    15px 40px 0 4px #ef4444;
}

@keyframes damage-wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}

@keyframes damage-critical {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.98) rotate(-1deg); opacity: 0.8; }
}

/* ===== ARENA INTENSITY STATES ===== */
.combat-arena-3d.arena-calm {
  background: linear-gradient(180deg, #0a0a15 0%, #151525 50%, #1a1a2e 100%);
}

.combat-arena-3d.arena-tense {
  background: linear-gradient(180deg, #0a0a15 0%, #1a1525 50%, #251a2e 100%);
}

.combat-arena-3d.arena-intense {
  background: linear-gradient(180deg, #150a0a 0%, #251520 50%, #2e1a25 100%);
  box-shadow: inset 0 0 100px rgba(255, 50, 50, 0.1);
}

.combat-arena-3d.arena-critical {
  background: linear-gradient(180deg, #1a0505 0%, #2a1015 50%, #351520 100%);
  box-shadow: inset 0 0 150px rgba(255, 0, 0, 0.2);
}

.combat-arena-3d.pulsing {
  animation: arena-pulse 1s ease-in-out infinite;
}

@keyframes arena-pulse {
  0%, 100% { 
    box-shadow: inset 0 0 150px rgba(255, 0, 0, 0.2);
  }
  50% { 
    box-shadow: inset 0 0 200px rgba(255, 0, 0, 0.35);
  }
}

/* Arena floor reacts to intensity */
.combat-arena-3d.arena-intense .arena-floor,
.combat-arena-3d.arena-critical .arena-floor {
  background: linear-gradient(180deg, transparent 0%, rgba(150, 0, 50, 0.15) 50%, rgba(150, 0, 50, 0.25) 100%);
}

/* Particles/sparks effect for intense moments */
.combat-arena-3d.arena-critical::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(255,100,50,0.3) 0%, transparent 2%),
    radial-gradient(circle at 80% 20%, rgba(255,100,50,0.3) 0%, transparent 2%),
    radial-gradient(circle at 40% 40%, rgba(255,150,50,0.2) 0%, transparent 1.5%),
    radial-gradient(circle at 60% 70%, rgba(255,150,50,0.2) 0%, transparent 1.5%);
  pointer-events: none;
  animation: sparks-float 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes sparks-float {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-10px); }
}

/* Enhanced action feedback */
.character-body.powered {
  filter: brightness(1.3) saturate(1.2);
  box-shadow: 0 0 30px rgba(255, 150, 0, 0.6);
}

.character-body.blocking {
  filter: brightness(1.1);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
}

.character-body.dodging {
  filter: brightness(1.2) blur(2px);
  opacity: 0.7;
}

/* ===== STAKE INPUT ROW - COMPLETELY NEW ===== */
.stake-input-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  background: #1a1510;
  border: 2px solid #5a4a3a;
  border-radius: 6px;
  overflow: hidden;
}

.stake-token-select {
  width: 90px;
  min-width: 90px;
  padding: 12px 8px;
  background: #252015;
  border: none;
  border-right: 2px solid #5a4a3a;
  color: #ffcc00;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  outline: none;
}

.stake-token-select:focus {
  background: #302510;
}

.stake-amount-input {
  flex: 1;
  min-width: 80px;
  padding: 12px 10px;
  background: #1a1510;
  border: none;
  color: #ffcc00;
  font-size: 16px;
  font-weight: bold;
  outline: none;
}

.stake-amount-input::placeholder {
  color: #666;
}

.stake-amount-input:focus {
  background: #201810;
}

.stake-match-btn {
  padding: 12px 20px;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-left: 2px solid #5a4a3a;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.stake-match-btn:hover {
  background: linear-gradient(180deg, #2dd36f 0%, #1db954 100%);
}

.stake-match-btn:active {
  transform: scale(0.98);
}

/* Full width match button below inputs */
.stake-match-btn-full {
  width: 100%;
  padding: 8px 15px;
  margin-top: 8px;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  border: 1px solid #1a8a3e;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stake-match-btn-full:hover {
  background: linear-gradient(180deg, #2dd36f 0%, #1db954 100%);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.stake-match-btn-full:active {
  transform: scale(0.98);
}

/* ===== CUSTOM SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a4a6a 0%, #3a3a5a 100%);
  border-radius: 5px;
  border: 2px solid #1a1a2e;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5a5a7a 0%, #4a4a6a 100%);
}

::-webkit-scrollbar-corner {
  background: #1a1a2e;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #4a4a6a #1a1a2e;
}

/* Modal scrollbar specific */
.rs-inventory-grid {
  scrollbar-width: thin;
  scrollbar-color: #5a4a3a #2a2318;
}

.rs-inventory-grid::-webkit-scrollbar-track {
  background: #2a2318;
}

.rs-inventory-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6a5a4a 0%, #5a4a3a 100%);
  border: 2px solid #2a2318;
}

/* ===== BIG REMATCH BUTTON IN RESULT MODAL ===== */
.btn-rematch-big {
  display: block;
  width: 100%;
  padding: 18px 30px;
  margin: 15px 0 10px 0;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  border: 3px solid #1a8a3e;
  border-radius: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-rematch-big:hover {
  background: linear-gradient(180deg, #2dd36f 0%, #1db954 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(34, 197, 94, 0.5);
}

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

.btn-rematch-big.waiting {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border-color: #b45309;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-continue {
  display: block;
  width: 100%;
  padding: 15px 30px;
  background: linear-gradient(180deg, #ffd700 0%, #ffb800 100%);
  border: 2px solid #cc9900;
  border-radius: 8px;
  color: #000;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-continue:hover {
  background: linear-gradient(180deg, #ffe033 0%, #ffcc00 100%);
  transform: translateY(-1px);
}

/* ===== REPEAT LAST BET BUTTON ===== */
.repeat-bet-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  border: 1px solid #4338ca;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.repeat-bet-btn:hover {
  background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.repeat-bet-btn:active {
  transform: translateY(-50%) scale(0.98);
}

.repeat-bet-btn:disabled {
  background: #444;
  border-color: #333;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== NUMBER INPUT SPINNER STYLING ===== */
/* Remove default spinner in WebKit */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

/* Custom number input styling */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* For browsers that show spinners, style them */
.rs-input[type="number"],
.stake-amount-input[type="number"],
#modalStakeAmount,
#stakeAmount {
  background: #1a1510 !important;
  color: #ffcc00 !important;
  border-color: #5a4a3a !important;
}

/* Focus state */
.rs-input[type="number"]:focus,
.stake-amount-input[type="number"]:focus,
#modalStakeAmount:focus,
#stakeAmount:focus {
  border-color: #ffcc00 !important;
  outline: none;
}

/* ===== BEST OF 3 ROUNDS TOGGLE ===== */
.rs-rounds-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid #3a3a3a;
}

.rounds-label {
  color: #888;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rounds-options {
  display: flex;
  gap: 6px;
}

.rounds-btn {
  padding: 6px 14px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  color: #888;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.rounds-btn:hover {
  background: #2a2a2a;
  border-color: #666;
  color: #fff;
}

.rounds-btn.active {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border-color: #f59e0b;
  color: #000;
}

/* Private Match Button (compact) */
.challenge-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.challenge-buttons .rs-btn-challenge {
  flex: 1;
  height: 44px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rs-btn-private-small {
  width: 44px;
  min-width: 44px;
  height: 44px;
  background: rgba(139, 92, 246, 0.2);
  border: 2px solid rgba(139, 92, 246, 0.5);
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rs-btn-private-small:hover {
  background: rgba(139, 92, 246, 0.4);
  border-color: #8b5cf6;
  transform: scale(1.05);
}

/* Private Match Modal */
.private-match-modal {
  max-width: 450px;
  text-align: center;
}

.private-match-modal h2 {
  color: #8b5cf6;
  margin-bottom: 15px;
}

.private-match-modal p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.invite-code-box {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
  border: 2px dashed rgba(139, 92, 246, 0.5);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.invite-code-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.invite-code-value {
  display: block;
  font-size: 36px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #a78bfa;
  letter-spacing: 4px;
}

.invite-link-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.invite-link-box input {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #444;
  padding: 12px;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
}

.invite-link-box button {
  padding: 12px 20px;
  background: var(--accent-purple);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.share-private-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.share-btn-private {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: white;
  transition: all 0.2s;
}

.share-btn-private.twitter { background: #1DA1F2; }
.share-btn-private.discord { background: #5865F2; }
.share-btn-private.telegram { background: #0088cc; }

.share-btn-private:hover {
  transform: translateY(-2px);
}

.private-match-hint {
  font-size: 14px;
  color: var(--accent-gold);
  margin-bottom: 20px;
}

.btn-close-modal {
  width: 100%;
  padding: 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
}

.btn-close-modal:hover {
  background: var(--bg-card);
}

/* ===== ENHANCED CHALLENGE CARD ===== */
.challenge-card {
  position: relative;
}

.challenge-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  z-index: 2;
}

.challenge-rounds-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.challenge-rounds-badge.single {
  background: #3b82f6;
  color: #fff;
}

.challenge-rounds-badge.bo3 {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  animation: bo3-pulse 2s ease-in-out infinite;
}

@keyframes bo3-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
  50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.8); }
}

.challenge-stats-row {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.challenge-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #888;
}

.challenge-stat-value {
  color: #ffcc00;
  font-weight: 600;
}

.challenge-winrate {
  color: #4ade80;
}

.challenge-winrate.negative {
  color: #f87171;
}

.challenge-total-duels {
  color: #60a5fa;
}

/* YOUR CHALLENGE badge */
.challenge-your-badge {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
}

/* Challenge amount styling */
.challenge-stake {
  text-align: right;
}

.challenge-amount {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #fff;
}

.challenge-usd {
  font-size: 16px;
  font-weight: 700;
  color: #4ade80;
}

/* Series score display during duel */
.series-score {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid #f59e0b;
}

.series-score-item {
  text-align: center;
}

.series-score-label {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
}

.series-score-value {
  font-size: 24px;
  font-weight: 700;
  color: #ffcc00;
}

.series-game-indicator {
  text-align: center;
  padding: 4px 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* Series result info in modal */
.result-series-info {
  margin: 8px 0;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
  border: 1px solid #f59e0b;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #f59e0b;
}

/* =====================================================
   CHAOS EVENT SYSTEM - Slot Machine Style
   ===================================================== */

/* Chaos Event Overlay */
.chaos-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.chaos-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Slot Machine Container */
.chaos-slot-container {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.chaos-slot-reel {
  width: 80px;
  height: 100px;
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  border: 3px solid #f59e0b;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.chaos-slot-symbols {
  position: absolute;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: slotSpin 0.8s ease-out forwards;
}

.chaos-slot-symbol {
  width: 80px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

@keyframes slotSpin {
  0% { transform: translateY(-500px); }
  100% { transform: translateY(0); }
}

/* Chaos Event Result */
.chaos-event-result {
  text-align: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.5s ease;
}

.chaos-event-result.show {
  opacity: 1;
  transform: scale(1);
}

.chaos-event-icon {
  font-size: 80px;
  margin-bottom: 10px;
  animation: chaosIconPulse 0.5s ease infinite alternate;
}

@keyframes chaosIconPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px var(--chaos-color)); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 25px var(--chaos-color)); }
}

.chaos-event-name {
  font-size: 36px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 10px;
  text-shadow: 0 0 20px var(--chaos-color);
}

.chaos-event-desc {
  font-size: 18px;
  color: #aaa;
}

/* No chaos (miss) state */
.chaos-miss {
  font-size: 24px;
  color: #666;
  margin-top: 20px;
}

/* =====================================================
   FURY METER SYSTEM
   ===================================================== */

.fury-meter-container {
  position: absolute;
  bottom: -25px;
  left: 0;
  right: 0;
  height: 8px;
  background: #1a1a1a;
  border-radius: 4px;
  border: 1px solid #333;
  overflow: hidden;
}

.fury-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #ef4444, #dc2626);
  border-radius: 4px;
  transition: width 0.5s ease;
  position: relative;
}

.fury-meter-fill.near-full {
  animation: furyPulse 0.5s ease infinite alternate;
}

.fury-meter-fill.full {
  background: linear-gradient(90deg, #ef4444, #fbbf24, #ef4444);
  animation: furyReady 0.3s ease infinite alternate;
}

@keyframes furyPulse {
  0% { box-shadow: 0 0 5px #ef4444; }
  100% { box-shadow: 0 0 15px #ef4444; }
}

@keyframes furyReady {
  0% { filter: brightness(1); box-shadow: 0 0 10px #fbbf24; }
  100% { filter: brightness(1.3); box-shadow: 0 0 25px #fbbf24; }
}

.fury-meter-label {
  position: absolute;
  top: -16px;
  left: 0;
  font-size: 10px;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Fury Activation Effect */
.fury-activated {
  animation: furyActivation 1s ease forwards;
}

@keyframes furyActivation {
  0% { filter: none; }
  25% { filter: brightness(2) saturate(2); }
  50% { filter: brightness(1.5) saturate(1.5); }
  75% { filter: brightness(2) saturate(2); }
  100% { filter: none; }
}

.fury-text-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: 900;
  color: #ef4444;
  text-shadow: 0 0 30px #ef4444, 0 0 60px #f59e0b;
  animation: furyPopup 1.5s ease forwards;
  pointer-events: none;
  z-index: 100;
}

@keyframes furyPopup {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(0.8); }
}

/* XP Bonus indicator for chaos events */
.xp-chaos-bonus {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #000;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
  animation: bonusPulse 1s ease infinite alternate;
}

@keyframes bonusPulse {
  0% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
  100% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.8); }
}

/* Chaos event indicator during combat */
.chaos-active-indicator {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 20px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--chaos-color, #f59e0b);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 50;
  animation: chaosIndicatorPulse 1s ease infinite alternate;
}

@keyframes chaosIndicatorPulse {
  0% { box-shadow: 0 0 10px var(--chaos-color, #f59e0b); }
  100% { box-shadow: 0 0 25px var(--chaos-color, #f59e0b); }
}

.chaos-indicator-icon {
  font-size: 24px;
}

.chaos-indicator-text {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--chaos-color, #f59e0b);
}

/* Damage multiplier indicator */
.damage-multiplier {
  color: #ef4444;
  font-weight: 900;
  font-size: 14px;
  margin-left: 4px;
}

.damage-jackpot {
  color: #fbbf24;
  animation: jackpotFlash 0.3s ease infinite alternate;
}

@keyframes jackpotFlash {
  0% { text-shadow: 0 0 5px #fbbf24; }
  100% { text-shadow: 0 0 20px #fbbf24; }
}

/* Slot machine miss state */
.chaos-slot-symbol.miss {
  opacity: 0.5;
}

.chaos-slot-symbol.match {
  animation: matchPulse 0.5s ease infinite alternate;
}

@keyframes matchPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 10px #f59e0b); }
}

.chaos-miss {
  font-size: 18px;
  color: #666;
  margin-top: 20px;
  opacity: 0;
  animation: fadeInMiss 0.5s ease 0.8s forwards;
}

@keyframes fadeInMiss {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Compact slot for non-events */
.chaos-overlay:not(.jackpot) .chaos-slot-container {
  transform: scale(0.8);
}

/* XP popup styling */
.xp-popup {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 700;
  z-index: 10000;
  animation: xpPopupAnim 2.5s ease forwards;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  white-space: nowrap;
  width: auto !important;
  max-width: 280px;
}

@keyframes xpPopupAnim {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.8); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.1); }
  30% { transform: translateX(-50%) translateY(0) scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-30px); }
}

/* Combat log chaos entry */
.combat-log-entry.chaos {
  background: rgba(245, 158, 11, 0.2);
  border-left: 3px solid #f59e0b;
  color: #f59e0b;
}

.combat-log-entry.fury {
  background: rgba(239, 68, 68, 0.2);
  border-left: 3px solid #ef4444;
  color: #ef4444;
}

/* =====================================================
   CORNER SLOT MACHINE - Non-intrusive, always visible
   ===================================================== */

.chaos-slot-corner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
  border: 2px solid #333;
  border-radius: 12px;
  padding: 8px 12px;
  z-index: 1000;
  display: none; /* Hidden by default, shown when in duel */
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.85;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  font-size: 12px;
}

.chaos-slot-corner:hover {
  opacity: 1;
}

.chaos-slot-corner.spinning {
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.chaos-slot-corner.hit {
  border-color: #22c55e;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
  animation: slotHit 0.5s ease;
  transform: scale(1.1);
}

.chaos-slot-corner.near-miss {
  border-color: #f59e0b;
  animation: nearMissShake 0.3s ease;
}

@keyframes slotHit {
  0%, 100% { transform: scale(1.1); }
  50% { transform: scale(1.2); }
}

@keyframes nearMissShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.chaos-slot-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.chaos-slot-reels {
  display: flex;
  gap: 6px;
}

.chaos-mini-reel {
  width: 36px;
  height: 36px;
  background: #0a0a15;
  border: 2px solid #444;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: all 0.2s ease;
}

.chaos-mini-reel.spinning span {
  animation: reelSpin 0.15s linear infinite;
}

@keyframes reelSpin {
  0% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.3; transform: translateY(-5px); }
  100% { opacity: 1; transform: translateY(0); }
}

.chaos-slot-corner.hit .chaos-mini-reel {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
}

.chaos-slot-corner.near-miss .chaos-mini-reel {
  border-color: #f59e0b;
}

/* Highlight matching reels on near-miss */
.chaos-slot-corner.near-miss .chaos-mini-reel:nth-child(1),
.chaos-slot-corner.near-miss .chaos-mini-reel:nth-child(2) {
  background: rgba(245, 158, 11, 0.15);
}

.chaos-slot-result {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 14px;
  transition: all 0.3s ease;
}

.chaos-slot-result.hit {
  font-size: 12px;
  animation: resultPulse 0.5s ease infinite alternate;
}

.chaos-slot-result.near-miss {
  color: #f59e0b;
  opacity: 0.8;
}

@keyframes resultPulse {
  0% { opacity: 1; }
  100% { opacity: 0.7; }
}

/* =====================================================
   CHAOS EVENT POPUP - Brief notification on hit
   ===================================================== */

.chaos-event-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: linear-gradient(135deg, rgba(15, 15, 26, 0.95), rgba(26, 26, 46, 0.95));
  border: 3px solid var(--chaos-color, #f59e0b);
  border-radius: 16px;
  padding: 20px 40px;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 30px var(--chaos-color, #f59e0b);
}

.chaos-event-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.chaos-popup-icon {
  font-size: 48px;
  margin-bottom: 8px;
  animation: popupIconBounce 0.5s ease;
}

@keyframes popupIconBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.chaos-popup-name {
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-shadow: 0 0 20px var(--chaos-color, #f59e0b);
}

.chaos-popup-desc {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 4px;
}

.chaos-popup-target {
  font-size: 16px;
  font-weight: 700;
  margin-top: 8px;
}

/* Hide old overlay styles */
.chaos-overlay {
  display: none !important;
}

/* =====================================================
   SPECTATOR BETTING PANEL
   ===================================================== */

.spectator-bet-panel {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.spectator-bet-panel.hidden {
  display: none;
}

.bet-panel-header {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: #f59e0b;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bet-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.bet-side-btn {
  flex: 1;
  padding: 12px 8px;
  border: 2px solid #333;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bet-side-btn:hover {
  border-color: #666;
  background: rgba(255, 255, 255, 0.05);
}

.bet-side-btn.selected {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

.bet-side-btn.challenger.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.bet-side-btn.opponent.selected {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.bet-side-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bet-fighter-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-odds {
  font-size: 14px;
  font-weight: 700;
  color: #f59e0b;
}

.bet-vs {
  font-size: 12px;
  color: #666;
  font-weight: 700;
}

.bet-amount-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.bet-amount-row input {
  flex: 1;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #333;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
}

.bet-amount-row input:focus {
  border-color: #f59e0b;
  outline: none;
}

.bet-amount-row select {
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #333;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.bet-place-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 8px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bet-place-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.bet-place-btn:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}

.bet-totals {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: #888;
}

.bet-pool-info {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.my-bet-info {
  margin-top: 10px;
  padding: 10px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  border-radius: 6px;
  text-align: center;
}

.my-bet-placed {
  font-size: 13px;
  color: #22c55e;
  font-weight: 600;
}

/* =====================================================
   SPECTATOR REACTION BUTTONS
   ===================================================== */

.spectator-reactions-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reactions-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-align: center;
}

.spectator-reaction-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reaction-btn {
  width: 40px;
  height: 40px;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reaction-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.15);
  border-color: #f59e0b;
}

.reaction-btn:active {
  transform: scale(0.95);
}

/* =====================================================
   LIVE ODDS DISPLAY
   ===================================================== */

.live-odds-display {
  position: absolute;
  bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 4px;
}

#challengerCharacter .live-odds-display {
  left: 10px;
}

#opponentCharacter .live-odds-display {
  right: 10px;
}


/* =====================================================
   ARENA BACKGROUNDS (Animated)
   ===================================================== */

/* Arena Theme: Neon Pit (Default) - Pulsing neon glow */
.combat-arena-3d.arena-neon {
  background: linear-gradient(180deg, #0a0015 0%, #1a0a2e 50%, #0f0a1a 100%);
  animation: neon-ambient 4s ease-in-out infinite;
}

@keyframes neon-ambient {
  0%, 100% { background: linear-gradient(180deg, #0a0015 0%, #1a0a2e 50%, #0f0a1a 100%); }
  50% { background: linear-gradient(180deg, #0a0018 0%, #1f0a35 50%, #120a1f 100%); }
}

.combat-arena-3d.arena-neon .arena-floor {
  background: 
    linear-gradient(180deg, transparent 0%, rgba(138, 43, 226, 0.15) 50%, rgba(138, 43, 226, 0.3) 100%),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(138, 43, 226, 0.1) 50px, rgba(138, 43, 226, 0.1) 51px);
  animation: neon-floor-pulse 3s ease-in-out infinite;
}

@keyframes neon-floor-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.combat-arena-3d.arena-neon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 50% 100%, rgba(138, 43, 226, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 20%, rgba(0, 255, 255, 0.05) 0%, transparent 30%),
    radial-gradient(ellipse at 80% 30%, rgba(255, 0, 128, 0.05) 0%, transparent 30%);
  pointer-events: none;
  z-index: 0;
  animation: neon-glow-shift 6s ease-in-out infinite;
}

@keyframes neon-glow-shift {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Arena Theme: Colosseum - Flickering torchlight */
.combat-arena-3d.arena-colosseum {
  background: linear-gradient(180deg, #1a1510 0%, #2a1f15 50%, #1a1510 100%);
}

.combat-arena-3d.arena-colosseum .arena-floor {
  background: 
    linear-gradient(180deg, transparent 0%, rgba(139, 90, 43, 0.2) 50%, rgba(139, 90, 43, 0.4) 100%),
    repeating-linear-gradient(90deg, transparent, transparent 80px, rgba(0,0,0,0.2) 80px, rgba(0,0,0,0.2) 82px);
  animation: torch-flicker-floor 2s ease-in-out infinite;
}

@keyframes torch-flicker-floor {
  0%, 100% { opacity: 0.9; }
  25% { opacity: 1; }
  50% { opacity: 0.85; }
  75% { opacity: 0.95; }
}

.combat-arena-3d.arena-colosseum::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 10% 30%, rgba(255, 150, 50, 0.15) 0%, transparent 25%),
    radial-gradient(ellipse at 90% 25%, rgba(255, 150, 50, 0.15) 0%, transparent 25%);
  pointer-events: none;
  z-index: 0;
  animation: torch-flicker 1.5s ease-in-out infinite;
}

@keyframes torch-flicker {
  0%, 100% { opacity: 0.6; }
  20% { opacity: 0.8; }
  40% { opacity: 0.5; }
  60% { opacity: 0.9; }
  80% { opacity: 0.7; }
}

/* Arena Theme: Cyber Ring - Scanning lines */
.combat-arena-3d.arena-cyber {
  background: linear-gradient(180deg, #000a0a 0%, #001a1a 50%, #000f0f 100%);
}

.combat-arena-3d.arena-cyber .arena-floor {
  background: 
    linear-gradient(180deg, transparent 0%, rgba(0, 255, 136, 0.1) 50%, rgba(0, 255, 136, 0.2) 100%),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(0, 255, 136, 0.1) 40px, rgba(0, 255, 136, 0.1) 41px),
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(0, 255, 136, 0.05) 40px, rgba(0, 255, 136, 0.05) 41px);
}

.combat-arena-3d.arena-cyber::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 2px,
      rgba(0, 255, 136, 0.03) 2px,
      rgba(0, 255, 136, 0.03) 4px
    );
  animation: scan-lines 8s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes scan-lines {
  0% { transform: translateY(0); }
  100% { transform: translateY(100px); }
}

.combat-arena-3d.arena-cyber::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.05), transparent);
  animation: cyber-sweep 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cyber-sweep {
  0% { left: -50%; }
  100% { left: 150%; }
}

/* Arena Theme: Vegas Floor - Slot machine lights */
.combat-arena-3d.arena-vegas {
  background: linear-gradient(180deg, #1a0a1a 0%, #2a1020 50%, #1a0a15 100%);
}

.combat-arena-3d.arena-vegas .arena-floor {
  background: 
    linear-gradient(180deg, transparent 0%, rgba(255, 215, 0, 0.1) 50%, rgba(255, 215, 0, 0.2) 100%),
    repeating-linear-gradient(
      45deg,
      rgba(139, 0, 0, 0.1),
      rgba(139, 0, 0, 0.1) 20px,
      rgba(0, 100, 0, 0.1) 20px,
      rgba(0, 100, 0, 0.1) 40px
    );
}

.combat-arena-3d.arena-vegas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(255, 0, 0, 0.1) 0%, transparent 30%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 255, 0, 0.1) 0%, transparent 30%),
    radial-gradient(ellipse at 50% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
  animation: vegas-lights 2s ease-in-out infinite;
}

@keyframes vegas-lights {
  0%, 100% { opacity: 0.5; }
  25% { opacity: 0.8; }
  50% { opacity: 0.6; }
  75% { opacity: 0.9; }
}

/* Arena Theme: Street Fight - Flickering streetlight */
.combat-arena-3d.arena-street {
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
}

.combat-arena-3d.arena-street .arena-floor {
  background: 
    linear-gradient(180deg, transparent 0%, rgba(50, 50, 50, 0.3) 50%, rgba(30, 30, 30, 0.5) 100%),
    repeating-linear-gradient(90deg, transparent, transparent 100px, rgba(255,255,255,0.02) 100px, rgba(255,255,255,0.02) 102px);
}

.combat-arena-3d.arena-street::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 15% 30%, rgba(255, 200, 100, 0.1) 0%, transparent 20%);
  pointer-events: none;
  z-index: 0;
  animation: streetlight-flicker 3s ease-in-out infinite;
}

@keyframes streetlight-flicker {
  0%, 100% { opacity: 0.8; }
  10% { opacity: 0.3; }
  12% { opacity: 0.9; }
  50% { opacity: 0.7; }
  52% { opacity: 0.2; }
  54% { opacity: 0.8; }
}

/* Arena Theme: Dojo - Gentle breathing light */
.combat-arena-3d.arena-dojo {
  background: linear-gradient(180deg, #1a1510 0%, #2a2015 50%, #1a1510 100%);
}

.combat-arena-3d.arena-dojo .arena-floor {
  background: 
    linear-gradient(180deg, transparent 0%, rgba(139, 90, 43, 0.15) 50%, rgba(139, 90, 43, 0.3) 100%),
    repeating-linear-gradient(90deg, rgba(101, 67, 33, 0.1), rgba(101, 67, 33, 0.1) 30px, rgba(139, 90, 43, 0.15) 30px, rgba(139, 90, 43, 0.15) 60px);
}

.combat-arena-3d.arena-dojo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 250, 240, 0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: dojo-breathe 5s ease-in-out infinite;
}

@keyframes dojo-breathe {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* Arena Theme: Inferno - Raging fire */
.combat-arena-3d.arena-inferno {
  background: linear-gradient(180deg, #1a0500 0%, #2a0a00 50%, #150500 100%);
}

.combat-arena-3d.arena-inferno .arena-floor {
  background: 
    linear-gradient(180deg, transparent 0%, rgba(255, 69, 0, 0.15) 50%, rgba(255, 69, 0, 0.3) 100%);
  animation: lava-pulse 2s ease-in-out infinite;
}

@keyframes lava-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.combat-arena-3d.arena-inferno::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: 
    radial-gradient(ellipse at 20% 100%, rgba(255, 100, 0, 0.25) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 50, 0, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(255, 100, 0, 0.25) 0%, transparent 40%);
  animation: fire-dance 1.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes fire-dance {
  0%, 100% { transform: scaleY(1); opacity: 0.8; }
  33% { transform: scaleY(1.05); opacity: 1; }
  66% { transform: scaleY(0.95); opacity: 0.9; }
}

.combat-arena-3d.arena-inferno::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 50, 0, 0.1) 0%, transparent 50%);
  animation: heat-wave 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heat-wave {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* =====================================================
   GUIDE TAB STYLES
   ===================================================== */

.guide-page {
  padding: 20px;
  overflow-y: auto;
  max-height: 100%;
}

.guide-container {
  max-width: 900px;
  margin: 0 auto;
}

.guide-header {
  text-align: center;
  padding: 20px 0 30px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.guide-header h1 {
  font-size: 32px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.guide-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

.guide-toc {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
}

.guide-toc h3 {
  color: var(--accent-gold);
  margin-bottom: 15px;
  font-size: 16px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.toc-link {
  color: var(--text-primary);
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 8px;
  background: var(--bg-secondary);
  transition: all 0.2s;
  font-size: 14px;
}

.toc-link:hover {
  background: var(--bg-hover);
  transform: translateX(5px);
}

.guide-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
}

.guide-section h2 {
  color: var(--accent-gold);
  font-size: 22px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.guide-content {
  color: var(--text-primary);
  line-height: 1.7;
}

.guide-content p {
  margin-bottom: 15px;
}

.guide-step {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg-secondary);
  border-radius: 10px;
}

.step-num {
  width: 32px;
  height: 32px;
  background: var(--accent-gold);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.guide-step h4 {
  color: var(--text-primary);
  margin-bottom: 5px;
}

.guide-step p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 14px;
}

.guide-info-box {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-gold);
  padding: 15px 20px;
  border-radius: 0 10px 10px 0;
  margin: 15px 0;
}

.guide-info-box h4 {
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.guide-info-box ul {
  margin: 0;
  padding-left: 20px;
}

.guide-info-box li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.guide-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.action-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 2px solid transparent;
}

.action-card.power {
  border-color: #ff6b6b;
}

.action-card.defend {
  border-color: #4ecdc4;
}

.action-card.dodge {
  border-color: #a78bfa;
}

.action-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.action-card h4 {
  color: var(--text-primary);
  margin-bottom: 5px;
}

.action-uses {
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px !important;
}

.action-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.action-key {
  background: var(--bg-tertiary);
  padding: 5px 10px;
  border-radius: 5px;
  font-family: monospace;
  font-size: 12px;
  display: inline-block;
}

.guide-tip {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
}

.chaos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.chaos-item {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
}

.chaos-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 8px;
}

.chaos-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.chaos-item p {
  color: var(--text-secondary);
  font-size: 12px;
  margin: 0;
}

.example-box {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 20px;
  margin-top: 15px;
}

.example-box h4 {
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.example-box p {
  margin-bottom: 5px;
  font-size: 14px;
}

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

.tip-card {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 20px;
}

.tip-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
}

.tip-card h4 {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 14px;
}

.tip-card p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.shortcut {
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
}

.shortcut kbd {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: monospace;
  margin-right: 8px;
}

/* Leaderboard filter styles */
.leaderboard-filters {
  display: flex;
  gap: 15px;
  align-items: center;
}

.lb-filter-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
}

.lb-filter-select option {
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 10px;
}

.lb-filter-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* Mobile responsive for guide */
@media (max-width: 768px) {
  .guide-actions-grid,
  .chaos-grid {
    grid-template-columns: 1fr;
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .shortcuts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .toc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =====================================================
   TOKEN PAGE STYLES
   ===================================================== */
.token-page {
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.token-container {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 40px;
  border: 1px solid var(--border-color);
}

.token-header {
  text-align: center;
  margin-bottom: 40px;
}

.token-logo {
  font-size: 72px;
  margin-bottom: 15px;
  animation: tokenFloat 3s ease-in-out infinite;
}

@keyframes tokenFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.token-header h1 {
  font-family: 'Cinzel', serif;
  font-size: 42px;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.token-tagline {
  font-size: 18px;
  color: var(--text-secondary);
}

.token-address-box {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 40px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.token-address-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.token-address-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.token-address {
  background: rgba(255, 215, 0, 0.1);
  padding: 12px 20px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  color: var(--accent-gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.btn-copy-token {
  background: var(--accent-gold);
  color: #000;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-copy-token:hover {
  transform: scale(1.05);
}

.token-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.token-link {
  color: var(--accent-purple);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.token-link:hover {
  color: var(--accent-gold);
}

.token-link.disabled {
  color: var(--text-secondary);
  pointer-events: none;
  opacity: 0.5;
}

.token-section {
  margin-bottom: 40px;
}

.token-section h2 {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  color: var(--accent-gold);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.revenue-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.revenue-item {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--border-color);
}

.revenue-icon {
  font-size: 32px;
}

.revenue-info {
  display: flex;
  flex-direction: column;
}

.revenue-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.revenue-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-green);
}

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

.token-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--accent-gold);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.step-content h3 {
  margin: 0 0 5px 0;
  color: var(--text-primary);
  font-size: 16px;
}

.step-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.tokenomics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.tokenomics-item {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.tokenomics-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.tokenomics-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
}

.token-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.token-benefits li {
  background: var(--bg-primary);
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
}

.token-cta {
  text-align: center;
  padding: 30px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.token-cta p {
  font-size: 18px;
  margin-bottom: 20px;
}

.token-socials {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.social-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s;
}

.social-btn:hover {
  transform: scale(1.05);
}

.social-btn.twitter {
  background: #000;
  color: #fff;
}

.social-btn.telegram {
  background: #0088cc;
  color: #fff;
}

.social-btn.discord {
  background: #5865f2;
  color: #fff;
}

/* Round Announcement Banner */
.round-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 165, 0, 0.9));
  padding: 20px 60px;
  border-radius: 16px;
  font-family: 'Cinzel', serif;
  font-size: 36px;
  font-weight: 700;
  color: #000;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.3);
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
  animation: roundBannerPop 1.5s ease-out forwards;
}

@keyframes roundBannerPop {
  0% { 
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  20% { 
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
  40% { 
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% { 
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
}

/* =====================================================
   TOKEN EARNINGS CALCULATOR
   ===================================================== */
.calculator-container {
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 25px;
  border: 1px solid var(--border-color);
}

.calc-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 25px;
}

@media (max-width: 768px) {
  .calc-inputs {
    grid-template-columns: 1fr;
  }
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-input-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.calc-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 5px 15px;
  border: 1px solid var(--border-color);
}

.calc-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--accent-gold);
  font-size: 20px;
  font-weight: 700;
  padding: 10px 0;
  outline: none;
  width: 100%;
}

.calc-input-row input::-webkit-outer-spin-button,
.calc-input-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-unit {
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
}

.calc-slider-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.calc-slider-row input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-secondary);
  -webkit-appearance: none;
  cursor: pointer;
}

.calc-slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.calc-percent {
  background: var(--accent-purple);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 50px;
  text-align: center;
}

.calc-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.calc-preset {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.calc-preset:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

.calc-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.calc-result-item {
  background: var(--bg-secondary);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.calc-result-item.highlight {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(139, 92, 246, 0.15));
  border-color: var(--accent-gold);
}

.calc-result-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.calc-result-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-green);
}

.calc-result-item.highlight .calc-result-value {
  color: var(--accent-gold);
  font-size: 24px;
}

.calc-note {
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 12px;
  color: var(--text-secondary);
}

.calc-note strong {
  color: var(--accent-purple);
}

/* =====================================================
   SPECTATOR BETTING PANEL - HORIZONTAL LAYOUT
   ===================================================== */
.spectator-panel-horizontal {
  background: rgba(15, 15, 26, 0.9);
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.bet-header-row {
  display: none;
}

.bet-main-row {
  display: none;
}

.bet-fighter-btn {
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 70px;
}

.bet-fighter-btn:hover {
  border-color: #666;
  background: rgba(255, 255, 255, 0.05);
}

.bet-fighter-btn.challenger.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.25);
}

.bet-fighter-btn.opponent.selected {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.25);
}

.bet-fighter-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bet-fighter-btn .fighter-name {
  font-size: 9px;
  font-weight: 600;
  color: #ccc;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-fighter-btn .fighter-odds {
  font-size: 12px;
  font-weight: 700;
  color: #f59e0b;
}

.bet-input-section {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bet-input-row {
  display: flex;
  gap: 3px;
}

.bet-input-row input {
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  width: 40px;
}

.bet-input-row input:focus {
  border-color: #f59e0b;
  outline: none;
}

.bet-input-row select {
  padding: 4px 3px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
  border-radius: 3px;
  color: #fff;
  font-size: 10px;
  cursor: pointer;
}

.spectator-panel-horizontal .bet-place-btn {
  padding: 4px 8px;
  font-size: 9px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 3px;
  color: #000;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.spectator-panel-horizontal .bet-place-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.spectator-panel-horizontal .bet-place-btn:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}

.spectator-panel-horizontal .my-bet-info {
  padding: 4px 8px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  color: #22c55e;
  font-weight: 600;
}

/* Bet Result Banner */
.bet-result-banner {
  margin-top: 10px;
  padding: 12px 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: result-pop 0.4s ease-out;
}

@keyframes result-pop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.bet-result-banner.win {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.3));
  border: 2px solid #22c55e;
}

.bet-result-banner.loss {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
  border: 2px solid #ef4444;
}

.bet-result-banner .result-icon {
  font-size: 28px;
}

.bet-result-banner .result-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.bet-result-banner .result-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

.bet-result-banner.win .result-title {
  color: #22c55e;
}

.bet-result-banner.loss .result-title {
  color: #ef4444;
}

.bet-result-banner .result-amount {
  font-size: 20px;
  font-weight: 700;
}

.bet-result-banner.win .result-amount {
  color: #4ade80;
}

.bet-result-banner.loss .result-amount {
  color: #f87171;
}

/* Spectator Reactions Row */
.spectator-reactions-row {
  display: flex;
  gap: 3px;
  margin-left: auto;
}

.react-btn {
  width: 24px;
  height: 24px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.react-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.react-btn:active {
  transform: scale(0.95);
}

/* Mobile adjustments */
@media (max-width: 500px) {
  .bet-main-row {
    flex-wrap: wrap;
  }
  
  .bet-fighter-btn {
    min-width: calc(50% - 5px);
  }
  
  .bet-input-section {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }
  
  .bet-input-row {
    flex: 1;
  }
  
  .spectator-panel-horizontal .bet-place-btn {
    white-space: nowrap;
  }
}

/* Inline pool display */
.bet-pool-inline {
  font-size: 9px;
  color: #22c55e;
  font-weight: 600;
  white-space: nowrap;
  padding: 2px 6px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 3px;
}

/* Override - spectator panel no margin */
.spectator-bet-panel {
  margin: 0 !important;
  padding: 0 !important;
}

/* =====================================================
   DEPOSIT & WITHDRAWAL MODALS
   ===================================================== */

.deposit-modal,
.withdrawal-modal {
  background: linear-gradient(135deg, rgba(15, 15, 26, 0.98), rgba(26, 26, 46, 0.98));
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  position: relative;
}

.deposit-modal h2,
.withdrawal-modal h2 {
  text-align: center;
  color: #f59e0b;
  margin-bottom: 20px;
  font-size: 24px;
}

.deposit-info,
.withdrawal-info {
  text-align: center;
  margin-bottom: 20px;
  color: #aaa;
}

.deposit-current-balance,
.withdrawal-balance {
  margin-top: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  font-size: 14px;
}

.withdrawal-balance .balance-amount {
  color: #22c55e;
  font-weight: 700;
  font-size: 18px;
}

.deposit-input-group,
.withdrawal-input-group {
  margin-bottom: 20px;
}

.deposit-input-group label,
.withdrawal-input-group label {
  display: block;
  color: #888;
  font-size: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.deposit-input-group input,
.withdrawal-input-group input {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  box-sizing: border-box;
}

.deposit-input-group input:focus,
.withdrawal-input-group input:focus {
  border-color: #f59e0b;
  outline: none;
}

.deposit-quick-amounts {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

.deposit-quick-amounts button {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.deposit-quick-amounts button:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.withdrawal-input-group {
  position: relative;
}

.max-btn {
  position: absolute;
  right: 10px;
  top: 32px;
  padding: 6px 10px;
  background: #f59e0b;
  border: none;
  border-radius: 4px;
  color: #000;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
}

.max-btn:hover {
  background: #fbbf24;
}

.deposit-destination,
.withdrawal-destination {
  margin-bottom: 20px;
}

.deposit-destination label,
.withdrawal-destination label {
  display: block;
  color: #888;
  font-size: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.deposit-address,
.withdrawal-address {
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
}

.demo-badge {
  color: #f59e0b;
  font-size: 10px;
  margin-left: 8px;
}

.deposit-status,
.withdrawal-status {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  text-align: center;
}

.deposit-status.loading,
.withdrawal-status.loading {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3b82f6;
  color: #93c5fd;
}

.deposit-status.success,
.withdrawal-status.success {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #4ade80;
}

.deposit-status.error,
.withdrawal-status.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #f87171;
}

.deposit-amount,
.withdrawal-amount {
  font-size: 20px;
  font-weight: 700;
  display: block;
  margin: 5px 0;
}

.deposit-balance,
.withdrawal-balance {
  font-size: 14px;
  color: #888;
}

.deposit-btn,
.withdrawal-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 8px;
  color: #000;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.deposit-btn:hover:not(:disabled),
.withdrawal-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-2px);
}

.deposit-btn:disabled,
.withdrawal-btn:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
  transform: none;
}

.deposit-note,
.withdrawal-note {
  text-align: center;
  margin-top: 15px;
  color: #666;
}

.deposit-note small,
.withdrawal-note small {
  font-size: 12px;
}

/* Wallet buttons layout */
.wallet-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.wallet-buttons .btn-deposit,
.wallet-buttons .btn-withdraw {
  flex: 1;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.wallet-buttons .btn-deposit {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.wallet-buttons .btn-deposit:hover {
  background: linear-gradient(135deg, #4ade80, #22c55e);
}

.wallet-buttons .btn-withdraw {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
}

.wallet-buttons .btn-withdraw:hover:not(.disabled) {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.wallet-buttons .btn-withdraw.disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}

/* =====================================================
   MOBILE RESPONSIVE STYLES
   Comprehensive mobile support without breaking desktop
   ===================================================== */

/* Mobile breakpoints:
   - 768px: Tablets
   - 480px: Large phones
   - 375px: Small phones
*/

/* =====================================================
   MOBILE: Header & Navigation
   ===================================================== */

@media (max-width: 768px) {
  .header {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .logo {
    font-size: 18px;
  }
  
  .logo img {
    height: 28px;
  }
  
  .header-right {
    gap: 8px;
  }
  
  .wallet-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .nav-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 5px;
  }
  
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .nav-tab {
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* =====================================================
   MOBILE: Main Layout
   ===================================================== */

@media (max-width: 768px) {
  .lobby-layout {
    grid-template-columns: 1fr !important;
    padding: 10px;
    gap: 15px;
  }
  
  .lobby-sidebar {
    display: none;
  }
  
  .main-content {
    padding: 10px;
  }
  
  .challenge-page-layout {
    padding: 10px;
  }
  
  .home-info-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .home-info-row {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   MOBILE: Challenge/Duel Creation
   ===================================================== */

@media (max-width: 768px) {
  .rs-challenge-grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }
  
  .rs-panel {
    padding: 12px;
  }
  
  .rs-panel-title {
    font-size: 14px;
  }
  
  /* Item selection grid */
  .rs-inventory-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px;
  }
  
  .rs-item-slot {
    padding: 8px;
    min-height: 70px;
  }
  
  .rs-item-slot .item-icon {
    font-size: 24px;
  }
  
  .rs-item-slot .item-name {
    font-size: 9px;
  }
  
  /* Stake input */
  .rs-stake-input {
    padding: 10px 12px;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  .rs-quick-amounts {
    flex-wrap: wrap;
  }
  
  .rs-quick-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  /* Challenge button */
  .rs-create-challenge {
    padding: 14px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .rs-inventory-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px;
  }
  
  .rs-item-slot {
    padding: 6px;
    min-height: 60px;
  }
  
  .rs-item-slot .item-icon {
    font-size: 20px;
  }
}

/* =====================================================
   MOBILE: Duel Arena / Battle Screen
   ===================================================== */

@media (max-width: 768px) {
  .duel-screen {
    padding: 10px;
  }
  
  .duel-arena {
    padding: 10px;
    gap: 10px;
  }
  
  .duel-players {
    flex-direction: column;
    gap: 15px;
  }
  
  .duel-player {
    width: 100%;
    padding: 10px;
  }
  
  .player-avatar {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }
  
  .player-name {
    font-size: 14px;
  }
  
  .player-level {
    font-size: 11px;
  }
  
  /* Health bars */
  .health-bar-container {
    height: 20px;
  }
  
  .health-text {
    font-size: 11px;
  }
  
  /* VS divider */
  .vs-divider {
    font-size: 24px;
    padding: 5px 15px;
  }
  
  /* Combat actions */
  .combat-actions {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  
  .action-btn {
    padding: 10px 15px;
    font-size: 12px;
    min-width: 80px;
  }
  
  /* Items bar */
  .items-bar {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .item-slot {
    width: 45px;
    height: 45px;
  }
  
  .item-slot .item-icon {
    font-size: 20px;
  }
  
  /* Combat log */
  .combat-log {
    max-height: 120px;
    font-size: 11px;
  }
  
  /* Round info */
  .round-info {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  /* Timer */
  .duel-timer {
    font-size: 18px;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .player-avatar {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .action-btn {
    padding: 8px 12px;
    font-size: 11px;
    min-width: 70px;
  }
  
  .item-slot {
    width: 40px;
    height: 40px;
  }
  
  .item-slot .item-icon {
    font-size: 18px;
  }
}

/* =====================================================
   MOBILE: Spectator Mode
   ===================================================== */

@media (max-width: 768px) {
  .spectator-panel {
    padding: 10px;
  }
  
  .spectator-bet-panel {
    padding: 8px;
  }
  
  .bet-fighter-btn {
    padding: 6px 10px;
    font-size: 11px;
    min-width: 60px;
  }
  
  .bet-input-row input {
    width: 50px;
    font-size: 12px;
    padding: 6px;
  }
  
  .react-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
}

/* =====================================================
   MOBILE: Modals
   ===================================================== */

@media (max-width: 768px) {
  .modal-overlay {
    padding: 10px;
    align-items: flex-start;
    padding-top: 50px;
  }
  
  .modal-content,
  .modal,
  .deposit-modal,
  .withdrawal-modal,
  .wallet-connect-modal {
    width: 95% !important;
    max-width: none !important;
    min-width: auto !important;
    margin: 0 auto;
    max-height: 85vh;
    overflow-y: auto;
  }
  
  .modal-content {
    padding: 15px;
  }
  
  .modal-content h2,
  .modal h3 {
    font-size: 18px;
  }
  
  .modal-close {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
  
  /* Deposit/Withdrawal specific */
  .deposit-modal,
  .withdrawal-modal {
    padding: 15px;
  }
  
  .deposit-input-group input,
  .withdrawal-input-group input {
    font-size: 16px; /* Prevents iOS zoom */
    padding: 12px;
  }
  
  .deposit-quick-amounts {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .deposit-quick-amounts button {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .deposit-btn,
  .withdrawal-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .deposit-address,
  .withdrawal-address {
    font-size: 10px;
    word-break: break-all;
  }
}

/* =====================================================
   MOBILE: Wallet Panel
   ===================================================== */

@media (max-width: 768px) {
  .wallet-panel {
    width: 100% !important;
    max-width: none;
    right: 0;
    top: 60px;
    border-radius: 0 0 12px 12px;
  }
  
  .wallet-section {
    padding: 12px;
  }
  
  .wallet-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .wallet-buttons .btn-deposit,
  .wallet-buttons .btn-withdraw {
    width: 100%;
    padding: 12px;
  }
}

/* =====================================================
   MOBILE: Chat
   ===================================================== */

@media (max-width: 768px) {
  .chat-container {
    max-height: 200px;
  }
  
  .chat-input-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .chat-input {
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  .chat-message {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  /* Duel chat */
  .duel-chat {
    max-height: 150px;
  }
  
  .duel-chat-input {
    font-size: 16px;
  }
}

/* =====================================================
   MOBILE: Browse Duels List
   ===================================================== */

@media (max-width: 768px) {
  .duel-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }
  
  .duel-info {
    width: 100%;
  }
  
  .duel-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .btn-accept,
  .btn-spectate {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  /* Active duels */
  .active-duel-card {
    padding: 10px;
  }
  
  .active-duel-players {
    font-size: 13px;
  }
}

/* =====================================================
   MOBILE: Leaderboard & Stats
   ===================================================== */

@media (max-width: 768px) {
  .leaderboard-table {
    font-size: 12px;
  }
  
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 8px 6px;
  }
  
  .leaderboard-filters {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .leaderboard-filter-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  /* Stats cards */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .stat-label {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   MOBILE: Result Modal
   ===================================================== */

@media (max-width: 768px) {
  .result-modal {
    padding: 20px 15px;
  }
  
  .result-title {
    font-size: 24px;
  }
  
  .result-amount {
    font-size: 28px;
  }
  
  .result-stats {
    gap: 15px;
  }
  
  .result-btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

/* =====================================================
   MOBILE: Guide/How to Play
   ===================================================== */

@media (max-width: 768px) {
  .guide-content {
    padding: 15px;
  }
  
  .guide-section {
    padding: 15px;
  }
  
  .guide-section h3 {
    font-size: 16px;
  }
  
  .guide-section p,
  .guide-section li {
    font-size: 13px;
  }
}

/* =====================================================
   MOBILE: Admin Panel
   ===================================================== */

@media (max-width: 768px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-card {
    padding: 15px;
  }
  
  .admin-table {
    font-size: 11px;
    display: block;
    overflow-x: auto;
  }
}

/* =====================================================
   MOBILE: Footer
   ===================================================== */

@media (max-width: 768px) {
  .footer {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 10px;
  }
  
  .footer-left,
  .footer-right {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* =====================================================
   MOBILE: Touch Improvements
   ===================================================== */

@media (max-width: 768px) {
  /* Larger touch targets */
  button, 
  .btn,
  .nav-tab,
  .action-btn,
  .item-slot,
  .rs-item-slot {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Prevent text selection on buttons */
  button,
  .btn,
  .action-btn {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Smooth scrolling */
  .main-content,
  .modal-content,
  .chat-messages,
  .combat-log {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix iOS input zoom */
  input[type="text"],
  input[type="number"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* =====================================================
   MOBILE: Landscape Adjustments
   ===================================================== */

@media (max-width: 768px) and (orientation: landscape) {
  .duel-players {
    flex-direction: row;
    justify-content: space-around;
  }
  
  .duel-player {
    width: 45%;
  }
  
  .modal-content {
    max-height: 90vh;
  }
}

/* =====================================================
   MOBILE: Safe Area (notch) Support
   ===================================================== */

@supports (padding: env(safe-area-inset-top)) {
  .header {
    padding-top: calc(8px + env(safe-area-inset-top));
  }
  
  .footer {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
  
  .modal-overlay {
    padding-top: calc(50px + env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* =====================================================
   MOBILE: Additional Modal Fixes
   Override min-width on specific modals
   ===================================================== */

@media (max-width: 500px) {
  .wallet-connect-modal,
  .withdraw-modal,
  .modal {
    min-width: unset !important;
    width: calc(100% - 20px) !important;
  }
  
  /* Wallet options buttons */
  .wallet-option {
    padding: 12px;
  }
  
  .wallet-option-info {
    flex: 1;
  }
  
  .wallet-name {
    font-size: 14px;
  }
  
  .wallet-status {
    font-size: 11px;
  }
  
  /* Install links */
  .install-links {
    flex-direction: column;
    gap: 8px;
  }
  
  .install-link {
    width: 100%;
    text-align: center;
  }
}

/* =====================================================
   MOBILE: Duel Screen Specific Fixes
   ===================================================== */

@media (max-width: 480px) {
  /* Compact duel header */
  .duel-header {
    padding: 8px;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .duel-header-left,
  .duel-header-right {
    width: 100%;
    justify-content: center;
  }
  
  /* Fury bar */
  .fury-bar-container {
    height: 8px;
  }
  
  .fury-label {
    font-size: 10px;
  }
  
  /* Chaos event banner */
  .chaos-banner {
    font-size: 12px;
    padding: 8px;
  }
  
  /* Selected items display */
  .selected-items-bar {
    gap: 4px;
  }
  
  .selected-item-mini {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  /* Win/lose animation */
  .result-animation {
    font-size: 48px;
  }
  
  /* Post-match stats */
  .post-match-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* =====================================================
   MOBILE: Improve Tap Responsiveness
   ===================================================== */

@media (max-width: 768px) {
  /* Remove hover effects on touch devices */
  @media (hover: none) {
    .btn:hover,
    .action-btn:hover,
    .nav-tab:hover,
    .duel-card:hover,
    .rs-item-slot:hover {
      transform: none;
      background: inherit;
    }
    
    /* Add active state instead */
    .btn:active,
    .action-btn:active,
    .nav-tab:active {
      transform: scale(0.95);
      opacity: 0.8;
    }
    
    .rs-item-slot:active {
      transform: scale(0.95);
    }
  }
}

/* =====================================================
   MOBILE: Loading States
   ===================================================== */

@media (max-width: 768px) {
  .loading-spinner {
    width: 40px;
    height: 40px;
  }
  
  .loading-text {
    font-size: 14px;
  }
}

/* =====================================================
   MOBILE: Notifications & Toasts
   ===================================================== */

@media (max-width: 768px) {
  .toast-container {
    bottom: 70px; /* Above mobile nav if present */
    left: 10px;
    right: 10px;
    max-width: none;
  }
  
  .toast {
    padding: 10px 15px;
    font-size: 13px;
  }
}

/* =====================================================
   MOBILE: Game Header Specific
   ===================================================== */

@media (max-width: 768px) {
  .game-header {
    padding: 8px 12px;
    height: auto;
    min-height: 55px;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .player-info {
    gap: 8px;
  }
  
  .player-card {
    padding: 6px 10px 6px 6px;
    gap: 8px;
  }
  
  .player-avatar-small {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .player-details {
    gap: 2px;
  }
  
  .player-name-header {
    font-size: 13px;
  }
  
  .player-level-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .xp-bar-mini {
    height: 3px;
    width: 60px;
  }
  
  .header-buttons {
    gap: 4px;
  }
  
  .btn-header {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .btn-wallet-main {
    padding: 8px 12px;
    font-size: 11px;
  }
  
  .balance-display {
    font-size: 12px;
  }
  
  /* Hide some header elements on very small screens */
  .streak-badge {
    display: none;
  }
}

@media (max-width: 480px) {
  .game-header {
    padding: 6px 8px;
    min-height: 50px;
  }
  
  .player-card {
    padding: 4px 8px 4px 4px;
  }
  
  .player-avatar-small {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .player-name-header {
    font-size: 12px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .header-buttons {
    gap: 3px;
  }
  
  .btn-header {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  
  .btn-wallet-main {
    padding: 6px 10px;
    font-size: 10px;
  }
  
  /* Hide less important buttons on very small screens */
  .btn-header[title="How to Play"],
  .btn-header[title="Support"] {
    display: none;
  }
}

/* =====================================================
   MOBILE: Login Screen Improvements
   ===================================================== */

@media (max-width: 480px) {
  .login-container {
    padding: 15px;
  }
  
  .logo h1 {
    font-size: 32px;
  }
  
  .logo-icon {
    font-size: 60px;
  }
  
  .tagline {
    font-size: 14px;
  }
  
  .login-form {
    max-width: 100%;
  }
  
  .login-form input {
    padding: 12px 15px;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  .btn-connect-phantom {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* =====================================================
   MOBILE: Duel Result Modal Improvements
   ===================================================== */

@media (max-width: 480px) {
  .duel-result-modal,
  .result-modal {
    padding: 15px;
  }
  
  .result-title {
    font-size: 20px !important;
  }
  
  .result-amount {
    font-size: 24px !important;
  }
  
  .result-xp {
    font-size: 14px;
  }
  
  .result-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .result-buttons .btn {
    width: 100%;
  }
  
  /* Opponent items reveal */
  .opponent-items-reveal {
    padding: 10px;
  }
  
  .opponent-items-grid {
    gap: 6px;
  }
  
  .opponent-item-mini {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/* =====================================================
   MOBILE: Duel Chat Positioning
   ===================================================== */

@media (max-width: 768px) {
  .duel-chat-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 35vh;
    z-index: 100;
    border-radius: 12px 12px 0 0;
  }
  
  .duel-chat-toggle {
    display: block;
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 101;
  }
}

/* =====================================================
   MOBILE: Item Tooltip Positioning
   ===================================================== */

@media (max-width: 768px) {
  .item-tooltip,
  .tooltip {
    position: fixed !important;
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    transform: none !important;
    max-width: none !important;
    z-index: 9999;
  }
}

/* =====================================================
   MOBILE: Browse Duels Improvements
   ===================================================== */

@media (max-width: 480px) {
  .duels-list {
    gap: 8px;
  }
  
  .duel-card {
    padding: 10px;
    gap: 8px;
  }
  
  .duel-challenger {
    font-size: 13px;
  }
  
  .duel-stake {
    font-size: 12px;
  }
  
  .btn-accept {
    padding: 8px 12px;
    font-size: 11px;
  }
  
  /* Bot indicator */
  .bot-indicator {
    font-size: 10px;
  }
}

/* =====================================================
   MOBILE: Token Page ($DUEL)
   ===================================================== */

@media (max-width: 768px) {
  .token-page {
    padding: 15px;
  }
  
  .token-hero {
    padding: 20px 15px;
  }
  
  .token-hero h1 {
    font-size: 28px;
  }
  
  .token-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .token-stat-card {
    padding: 12px;
  }
  
  .token-stat-value {
    font-size: 20px;
  }
  
  .earnings-calculator {
    padding: 15px;
  }
  
  .calculator-slider {
    margin: 15px 0;
  }
}

@media (max-width: 480px) {
  .token-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   MOBILE: Referral Page
   ===================================================== */

@media (max-width: 768px) {
  .referral-page {
    padding: 15px;
  }
  
  .referral-code-display {
    font-size: 20px;
    padding: 15px;
  }
  
  .referral-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .referral-stat {
    padding: 12px;
  }
  
  .referral-link-container {
    flex-direction: column;
    gap: 8px;
  }
  
  .referral-link-container input {
    font-size: 12px;
  }
  
  .btn-copy {
    width: 100%;
  }
}

/* =====================================================
   MOBILE: Volume Controls (In-game)
   ===================================================== */

@media (max-width: 768px) {
  .volume-controls {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }
  
  .volume-slider-container {
    width: 100%;
  }
  
  .volume-slider {
    width: 100%;
  }
}

/* =====================================================
   MOBILE: Match History
   ===================================================== */

@media (max-width: 768px) {
  .match-history-table {
    display: block;
    overflow-x: auto;
  }
  
  .match-history-table th,
  .match-history-table td {
    padding: 8px 6px;
    font-size: 11px;
    white-space: nowrap;
  }
  
  .btn-export-csv {
    width: 100%;
    margin-top: 10px;
  }
}

/* =====================================================
   MOBILE: Private Match Modal
   ===================================================== */

@media (max-width: 768px) {
  .private-match-modal {
    padding: 15px;
  }
  
  .invite-code-display {
    font-size: 24px;
    letter-spacing: 4px;
  }
  
  .invite-link-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .invite-link-row input {
    font-size: 12px;
  }
  
  .invite-link-row .btn {
    width: 100%;
  }
}

/* =====================================================
   MOBILE: Achievement Cards
   ===================================================== */

@media (max-width: 480px) {
  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .achievement-card {
    padding: 10px;
  }
  
  .achievement-icon {
    font-size: 24px;
  }
  
  .achievement-name {
    font-size: 11px;
  }
  
  .achievement-progress {
    font-size: 9px;
  }
}

/* =====================================================
   MOBILE: Ensure proper stacking context
   ===================================================== */

@media (max-width: 768px) {
  .modal-overlay {
    z-index: 10000;
  }
  
  .toast-container {
    z-index: 10001;
  }
  
  .wallet-panel {
    z-index: 9999;
  }
  
  .settings-panel {
    z-index: 9998;
  }
}

/* Footer legal links */
.footer-links {
  margin-left: 15px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

@media (max-width: 768px) {
  .footer-links {
    display: block;
    margin-left: 0;
    margin-top: 5px;
  }
}

/* =====================================================
   CUSTOM CONFIRMATION MODALS
   ===================================================== */

.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  animation: fadeIn 0.2s ease;
}

.custom-modal {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.15);
  max-width: 380px;
  width: 90%;
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-modal .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(139, 92, 246, 0.1);
}

.custom-modal .modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-modal .modal-body {
  padding: 24px;
}

/* Withdraw Confirm Modal Specific */
.withdraw-confirm-modal .withdraw-amount-display {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.withdraw-amount-display .amount-label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.withdraw-amount-display .amount-value {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: #10b981;
  line-height: 1.2;
}

.withdraw-amount-display .amount-sol {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.withdraw-destination {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.withdraw-destination .dest-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.withdraw-destination .dest-wallet {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
}

.withdraw-note {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.custom-modal .modal-actions {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
}

.btn-confirm-withdraw {
  flex: 1;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  transition: all 0.2s;
}

.btn-confirm-withdraw:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-cancel-withdraw {
  flex: 1;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s;
}

.btn-cancel-withdraw:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

/* Error Modal Styles */
.error-modal .error-header {
  background: rgba(239, 68, 68, 0.2);
}

.error-modal .error-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 16px;
}

.error-modal .error-message {
  font-size: 15px;
  color: #fff;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 16px;
}

.error-modal .error-reassurance {
  font-size: 13px;
  color: #10b981;
  text-align: center;
  padding: 12px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  margin-bottom: 16px;
}

.error-modal .error-support {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.error-modal .error-support p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.error-modal .support-link {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.error-modal .support-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Mobile Wallet Modal */
.mobile-wallet-modal .modal-body {
  padding: 24px;
}

.mobile-wallet-modal .modal-body p {
  margin: 0;
}

/* Mobile Wallet Modal Styles */
.mobile-steps {
  margin-bottom: 24px;
}

.mobile-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-step:last-child {
  border-bottom: none;
}

.mobile-step .step-number {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.mobile-step span:last-child {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
}

.btn-phantom-mobile {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #AB9FF2, #8B5CF6);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  transition: all 0.2s;
}

.btn-phantom-mobile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.mobile-alt-options {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.mobile-alt-options p {
  margin: 0 0 8px 0;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}

.mobile-manual-steps {
  font-size: 12px !important;
  line-height: 1.6;
}

.mobile-manual-steps code {
  display: inline-block;
  background: rgba(139, 92, 246, 0.2);
  padding: 6px 12px;
  border-radius: 6px;
  margin-top: 8px;
  cursor: pointer;
  color: #AB9FF2;
  font-family: monospace;
}

.mobile-manual-steps code:active {
  background: rgba(139, 92, 246, 0.4);
}

/* Multi-wallet support styles */
.mobile-wallet-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}

.mobile-wallet-link .wallet-arrow {
  margin-left: auto;
  color: rgba(255,255,255,0.4);
  font-size: 18px;
}

.mobile-wallet-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-wallet-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: all 0.2s;
}

.mobile-wallet-btn:hover {
  background: rgba(255,255,255,0.15);
}

.mobile-wallet-btn .wallet-icon {
  font-size: 24px;
}

.wallet-option[data-wallet] {
  position: relative;
}

.wallet-option.not-detected {
  opacity: 0.5;
}

.wallet-option.detected {
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

.wallet-option.detected:hover {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.15);
}

/* =====================================================
   RESULT MODAL - FULLSCREEN OVERLAY FIX
   ===================================================== */

/* When result modal is active, ensure it covers everything */
#resultModal.active {
  z-index: 10001;
  background: rgba(0, 0, 0, 0.98);
}

#resultModal .modal-content {
  position: relative;
  z-index: 10002;
}

/* Hide ALL distracting elements when result modal is showing */
body.result-showing .chaos-slot-corner,
body.result-showing .server-stats-corner,
body.result-showing .win-streak-badge,
body.result-showing .header-balance,
body.result-showing .header-stats,
body.result-showing .header-right,
body.result-showing header,
body.result-showing .stats-bar,
body.result-showing .balance-display,
body.result-showing .game-header {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Ensure result content is properly centered and sized */
#resultModal .result-content {
  max-width: 450px;
  width: 95%;
  max-height: 85vh;
  margin: auto;
  animation: resultSlideIn 0.4s ease-out;
}

@keyframes resultSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Make series info look better */
.result-series-info {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 10px 16px;
  margin: 12px 0;
  font-size: 14px;
  color: #f59e0b;
  font-weight: 600;
}

/* =====================================================
   LOGIN PAGE - USP FEATURE CARDS
   ===================================================== */

.usp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 30px;
  max-width: 420px;
}

.usp-card {
  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.12);
  border-radius: 14px;
  padding: 20px 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.usp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.usp-card:hover {
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.12) 0%, rgba(245, 197, 24, 0.04) 100%);
  border-color: rgba(245, 197, 24, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(245, 197, 24, 0.1);
}

.usp-card:hover::before {
  opacity: 1;
}

.usp-icon {
  font-size: 32px;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 10px rgba(245, 197, 24, 0.3));
}

.usp-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}

.usp-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  opacity: 0.9;
}

/* Mobile: Single column */
@media (max-width: 400px) {
  .usp-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .usp-card {
    flex-direction: row;
    text-align: left;
    gap: 15px;
    padding: 16px 20px;
  }
  
  .usp-icon {
    font-size: 28px;
    margin-bottom: 0;
  }
  
  .usp-card > div {
    display: flex;
    flex-direction: column;
  }
}

/* Token Info Modal - Enhanced */
.token-info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.token-info-modal.active {
  display: flex;
}

.token-info-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid rgba(245, 197, 24, 0.5);
  border-radius: 20px;
  padding: 0;
  max-width: 480px;
  width: 90%;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(245, 197, 24, 0.1);
}

.token-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #888;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.token-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.token-header {
  padding: 30px 30px 20px;
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.15) 0%, rgba(245, 197, 24, 0.05) 100%);
}

.token-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 10px;
}

.token-header h2 {
  font-family: 'Cinzel', serif;
  color: #f5c518;
  font-size: 1.8em;
  margin: 0;
  text-shadow: 0 0 30px rgba(245, 197, 24, 0.3);
}

.token-subtitle {
  color: #888;
  font-size: 14px;
  margin-top: 5px;
}

.token-hero {
  padding: 25px 30px;
}

.token-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.eq-part {
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.2) 0%, rgba(245, 197, 24, 0.1) 100%);
  border: 1px solid rgba(245, 197, 24, 0.4);
  padding: 12px 20px;
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.2em;
  color: #f5c518;
}

.eq-equals {
  font-size: 1.5em;
  color: #888;
}

.token-hero-text {
  color: #888;
  font-size: 14px;
  margin: 0;
}

.token-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 25px 25px;
}

.token-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  text-align: left;
}

.token-feature .feature-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.token-feature .feature-text {
  display: flex;
  flex-direction: column;
}

.token-feature .feature-text strong {
  color: #fff;
  font-size: 12px;
}

.token-feature .feature-text span {
  color: #888;
  font-size: 11px;
}

.token-contract {
  padding: 15px 25px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contract-label {
  color: #666;
  font-size: 12px;
}

.contract-value {
  color: #a78bfa;
  font-size: 12px;
  font-family: monospace;
}

.token-cta-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #f5c518 0%, #d4a00a 100%);
  border: none;
  color: #000;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.token-cta-btn:hover {
  background: linear-gradient(135deg, #ffd700 0%, #f5c518 100%);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .token-features {
    grid-template-columns: 1fr;
  }
  
  .token-equation {
    flex-direction: column;
    gap: 10px;
  }
  
  .eq-equals {
    transform: rotate(90deg);
  }
}
