@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --cyber-cyan: #00ffff;
  --cyber-pink: #ff3cac;
  --cyber-purple: #7427ff;
  --deep-space: #050510;
  --panel: rgba(5, 8, 30, 0.88);
  --panel-border: rgba(0, 255, 255, 0.25);
  --panel-border-strong: rgba(0, 255, 255, 0.55);
  --panel-shadow: 0 25px 65px rgba(2, 10, 30, 0.65);
  --text-base: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.65);
  --mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

body {
  font-family: 'Space Grotesk', var(--mono);
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.12), transparent 45%),
    radial-gradient(circle at 85% 5%, rgba(255, 60, 172, 0.12), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(116, 39, 255, 0.15), transparent 60%),
    linear-gradient(135deg, #02000d 0%, #050b1f 35%, #050524 65%, #0b0140 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-base);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 255, 255, 0.025) 2px,
      rgba(0, 255, 255, 0.025) 4px
    );
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: gridDrift 18s linear infinite;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 75%, rgba(0, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(255, 60, 172, 0.15), transparent 45%);
  filter: blur(120px);
  opacity: 0.4;
  z-index: 0;
  animation: auroraDrift 20s ease-in-out infinite alternate;
}

body.cyber-page {
  font-family: 'Space Grotesk', var(--mono);
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.12), transparent 45%),
    radial-gradient(circle at 85% 5%, rgba(255, 60, 172, 0.12), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(116, 39, 255, 0.15), transparent 60%),
    linear-gradient(135deg, #02000d 0%, #050b1f 35%, #050524 65%, #0b0140 100%);
  color: var(--text-base);
  letter-spacing: 0.01em;
}

body.cyber-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 255, 255, 0.025) 2px,
      rgba(0, 255, 255, 0.025) 4px
    );
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: gridDrift 18s linear infinite;
}

body.cyber-page::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 75%, rgba(0, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(255, 60, 172, 0.15), transparent 45%);
  filter: blur(120px);
  opacity: 0.4;
  z-index: 0;
  animation: auroraDrift 20s ease-in-out infinite alternate;
}

body.cyber-page .game-container {
  padding: 60px;
  padding-top: 120px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 32px;
  box-shadow: var(--panel-shadow), 0 0 120px rgba(0, 255, 255, 0.12);
  max-width: 1100px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

body.cyber-page .game-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(0, 255, 255, 0.8), rgba(116, 39, 255, 0.65), rgba(255, 60, 172, 0.6));
  opacity: 0.35;
  filter: blur(25px);
  z-index: -2;
  animation: borderGlow 6s ease-in-out infinite;
}

body.cyber-page .game-container::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.08), transparent 60%);
  z-index: -1;
  opacity: 0.6;
}

body.cyber-page h1 {
  font-size: clamp(2.5rem, 4vw, 3.2rem);
  color: var(--text-base);
  text-shadow: 0 0 30px rgba(0, 255, 255, 0.35);
  letter-spacing: 4px;
}

body.cyber-page .subtitle {
  color: var(--text-muted);
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

body.cyber-page .subtitle.note {
  font-size: 0.9em;
  margin-top: 10px;
  opacity: 0.85;
}

@keyframes gridDrift {
  0% { background-position: 0 0; }
  100% { background-position: 0 24px; }
}

@keyframes auroraDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.35; }
  100% { transform: translate3d(-3%, -3%, 0) scale(1.05); opacity: 0.5; }
}

body.pvp-page .match-section {
  margin: 30px 0;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

body.pvp-page .match-status {
  flex: 1 1 320px;
  text-align: left;
}

body.pvp-page .match-timer {
  font-size: 1.25rem;
  font-family: var(--mono);
  color: var(--text-base);
}

body.pvp-page .opponent-info {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

body.pvp-page .match-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.pvp-page .match-section button {
  border-radius: 18px;
  padding: 14px 26px;
  font-family: var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

body.pvp-page .find-match-btn {
  background: linear-gradient(120deg, rgba(0, 255, 255, 0.9), rgba(116, 39, 255, 0.9));
  color: #050510;
  box-shadow: 0 25px 45px rgba(0, 255, 255, 0.25);
}

body.pvp-page .cancel-match-btn {
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid rgba(255, 0, 0, 0.4);
  color: #ff4d4d;
  box-shadow: 0 20px 35px rgba(255, 0, 0, 0.15);
}

body.pvp-page .hands-container {
  gap: 50px;
}

body.pvp-page .hand-icon {
  width: 220px;
  height: 220px;
}

body.pvp-page .hand-icon img {
  width: 180px;
  height: 180px;
}

body.pvp-page .player-choices {
  gap: 24px;
  flex-wrap: wrap;
}

body.pvp-page .choice-btn {
  width: 130px;
  height: 130px;
  border-radius: 20px;
}

body.pvp-page #result {
  min-height: 60px;
  font-size: 1.8rem;
}

body.pvp-page #result.win {
  color: #00ff9d;
  text-shadow: 0 0 20px rgba(0, 255, 157, 0.7);
}

body.pvp-page #result.lose {
  color: #ff4d4d;
  text-shadow: 0 0 20px rgba(255, 77, 77, 0.7);
}

body.pvp-page #result.tie {
  color: #ffe066;
}

body.pvp-page .status {
  color: var(--text-muted);
  min-height: 30px;
}

body.pvp-page .extra-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  text-decoration: none;
  font-family: var(--mono);
  letter-spacing: 0.2em;
  color: var(--text-base);
  border: 1px solid var(--panel-border-strong);
  border-radius: 18px;
  padding: 14px 30px;
  transition: all 0.3s;
}

body.pvp-page .extra-link:hover {
  box-shadow: 0 20px 45px rgba(0, 255, 255, 0.2);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  body.pvp-page .match-section {
    flex-direction: column;
    align-items: flex-start;
  }

  body.pvp-page .match-actions {
    width: 100%;
    justify-content: stretch;
  }

  body.pvp-page .match-actions button {
    flex: 1;
  }
}

.game-container {
  text-align: center;
  padding: 60px;
  padding-top: 120px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 32px;
  box-shadow: var(--panel-shadow), 0 0 120px rgba(0, 255, 255, 0.12);
  max-width: 1100px;
  width: 100%;
  position: relative;
  z-index: 1;
  margin-top: 40px;
  overflow: hidden;
  backdrop-filter: blur(22px) saturate(140%);
  isolation: isolate;
}

.game-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(0, 255, 255, 0.8), rgba(116, 39, 255, 0.65), rgba(255, 60, 172, 0.6));
  opacity: 0.35;
  filter: blur(25px);
  z-index: -2;
  animation: borderGlow 6s ease-in-out infinite;
}

.game-container::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.08), transparent 60%);
  z-index: -1;
  opacity: 0.6;
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.15; filter: blur(0px); }
  50% { opacity: 0.5; filter: blur(1px); }
}

h1 {
  font-size: clamp(2.5rem, 4vw, 3.2rem);
  margin-bottom: 10px;
  color: var(--text-base);
  background: linear-gradient(120deg, #f6f6f6, var(--cyber-cyan), var(--cyber-pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(0, 255, 255, 0.35);
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: textGlow 3s ease-in-out infinite alternate;
}

.subtitle {
  font-size: 1.1em;
  margin-bottom: 35px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.35em;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.35);
}

@keyframes textGlow {
  0% { text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 15px #00ffff; }
  100% { text-shadow: 0 0 10px #00ffff, 0 0 15px #00ffff, 0 0 20px #00ffff; }
}

.mode-banner {
  margin-bottom: 45px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  text-align: center;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.45), 0 0 25px rgba(0, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.9em;
  font-weight: 600;
}

.pill-live {
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--cyber-cyan), var(--cyber-pink));
  color: #050510;
  font-size: 0.75em;
  letter-spacing: 0.3em;
  font-weight: 700;
}

.mode-copy {
  max-width: 650px;
  color: var(--text-muted);
  font-size: 1.05em;
  line-height: 1.6;
}

.mode-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.mode-tag {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85em;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  backdrop-filter: blur(6px);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 35px;
}

.stat-card {
  position: relative;
  padding: 22px 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5);
  text-align: left;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(0, 255, 255, 0.1), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.stat-label {
  font-size: 0.8em;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-base);
  font-family: var(--mono);
}

.stat-meta {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-top: 8px;
}

.info-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 26px;
  margin-top: 25px;
  text-align: left;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.card-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-value {
  font-family: var(--mono);
  font-size: 2rem;
  color: var(--text-base);
  font-weight: 600;
}

.card-row,
.card-meta {
  font-size: 0.9em;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

.wallet-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-family: 'Space Grotesk', 'Courier New', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(246, 255, 254, 0.92);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(62, 247, 255, 0.35), rgba(255, 49, 217, 0.2));
  padding: 14px 28px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  margin: 5px;
}

.wallet-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.wallet-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(62, 247, 255, 0.3);
}

.wallet-btn:hover::after {
  opacity: 1;
}

.wallet-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  transform: none;
}

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

.wallet-info {
  margin-top: 15px;
  padding: 18px;
  background: rgba(6, 12, 32, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.9em;
  text-align: center;
  letter-spacing: 0.05em;
  color: rgba(246, 255, 254, 0.88);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
}

.sol-card {
  margin-top: 15px;
}

.fee-display {
  margin-top: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  font-size: 0.9em;
  color: var(--text-base);
  text-align: left;
}

.contract-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 24px;
  margin: 20px 0;
  text-align: center;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.45);
}

.contract-label {
  font-size: 1rem;
  color: var(--text-base);
  margin-bottom: 15px;
  font-weight: bold;
  text-shadow: 0 0 5px var(--cyber-cyan);
}

.contract-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.contract-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--panel-border);
  color: var(--text-base);
  padding: 14px 20px;
  font-size: 0.95rem;
  border-radius: 16px;
  font-family: var(--mono);
  min-width: 300px;
  max-width: 100%;
  flex: 1;
}

.contract-input:focus {
  outline: none;
  box-shadow: 0 0 15px var(--cyber-cyan);
}

.contract-btn {
  padding: 12px 24px;
  font-size: 0.85rem;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.dex-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

.dex-btn {
  padding: 16px 32px;
  font-size: 0.95rem;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.45);
}

.dex-btn-buy {
  background: linear-gradient(135deg, #ff6b35, #ff8c42);
  color: white;
}

.dex-btn-buy:hover {
  background: linear-gradient(135deg, #ff8c42, #ff6b35);
  box-shadow: 0 25px 45px rgba(255, 107, 53, 0.6);
  transform: translateY(-2px);
}

.dex-btn-community {
  background: linear-gradient(135deg, #1a237e, #283593);
  color: white;
}

.dex-btn-community:hover {
  background: linear-gradient(135deg, #283593, #3949ab);
  box-shadow: 0 25px 45px rgba(26, 35, 126, 0.6);
  transform: translateY(-2px);
}

#modeNavigation {
  position: fixed !important;
  top: 40px !important;
  left: 20px !important;
  z-index: 99999 !important;
  display: flex !important;
  gap: 10px;
  flex-wrap: wrap;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#modeNavigation a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  cursor: pointer !important;
  text-decoration: none !important;
  padding: 10px 20px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(5, 10, 25, 0.9) !important;
  color: var(--text-base) !important;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  text-transform: uppercase;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.45);
  transition: all 0.25s ease;
}

#modeNavigation a.highlighted {
  background: linear-gradient(120deg, rgba(0, 255, 255, 0.2), rgba(255, 60, 172, 0.25)) !important;
  border-color: rgba(0, 255, 255, 0.6) !important;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.35);
}

#modeNavigation a.current {
  border-color: rgba(255, 255, 255, 0.65) !important;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
}

body.leaderboard-page #modeNavigation a[href="/rps_leaderboard.html"],
body.stats-page #modeNavigation a[href="/rps_stats.html"],
body.deposit-page #modeNavigation a[href="/rps_deposit.html"],
body.group-chat-page #modeNavigation a[href="/group_chat.html"],
body.vs-luna-page #modeNavigation a[href="/rps_vs_luna.html"],
body.pvp-page #modeNavigation a[href="/rps_game.html"],
body.cyber-page #modeNavigation a[href="/rps_betting.html"].highlighted,
body.guide-page #modeNavigation a[href="/luna_guide.html"] {
  border-color: rgba(255, 255, 255, 0.65) !important;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
}

/* Hide Guide button on Guide page */
body.guide-page #modeNavigation a[href="/luna_guide.html"] {
  display: none !important;
}

#modeNavigation a:hover {
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(0, 255, 255, 0.35),
    0 0 45px rgba(255, 255, 255, 0.35);
  transform: translateY(-2px) scale(1.05);
  background: rgba(0, 0, 0, 0.95);
  border-color: rgba(255, 255, 255, 0.65);
  text-shadow:
    0 0 10px currentColor,
    0 0 20px currentColor,
    0 0 30px rgba(255, 255, 255, 0.5);
}

#modeNavigation a:active {
  transform: translateY(0px) scale(0.98);
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(255, 255, 255, 0.35);
}

#walletConnectFixed {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

#walletConnectFixed .wallet-btn {
  margin: 0;
  min-width: 240px;
  justify-content: center;
}

#walletConnectFixed .wallet-info {
  max-width: 260px;
  min-width: 240px;
  text-align: center;
  word-break: break-word;
}

#walletConnectFixed .hidden {
  display: none !important;
}

#neonToggle {
  position: fixed !important;
  bottom: 28px !important;
  right: 32px !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  z-index: 30 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 22px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(120deg, rgba(7, 10, 30, 0.95), rgba(30, 8, 46, 0.9));
  color: rgba(246, 255, 254, 0.95);
  cursor: pointer !important;
  font-family: 'Space Grotesk', 'Courier New', monospace !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  transition: all 0.25s ease !important;
  box-shadow: 0 10px 25px rgba(3, 3, 20, 0.8);
}

#neonToggle:hover {
  box-shadow: 0 25px 35px rgba(0, 0, 0, 0.55), 0 0 25px rgba(62, 247, 255, 0.4) !important;
  transform: translateY(-2px) !important;
}

body.neon-off * {
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
  animation: none !important;
}

body.neon-off .game-container::before {
  display: none !important;
}

body.neon-off body::before {
  opacity: 0.05 !important;
}

.hands-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 40px 0;
}

.hand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.hand-label {
  font-size: 1.3em;
  color: var(--text-base);
  text-shadow: 0 0 5px var(--cyber-cyan);
  font-weight: bold;
}

.hand-icon {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border-strong);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 35px rgba(0, 255, 255, 0.25);
}

.choice-btn {
  width: 120px;
  height: 120px;
  border: 1px solid var(--panel-border-strong);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  color: var(--cyber-cyan);
  position: relative;
  overflow: hidden;
}

.choice-btn:hover:not(:disabled) {
  background: rgba(0, 255, 255, 0.15);
  box-shadow: 0 25px 45px rgba(0, 255, 255, 0.3);
  transform: scale(1.08);
}

.choice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.result-box {
  font-size: 2em;
  margin: 30px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status {
  margin-top: 20px;
  font-size: 1.1em;
  color: var(--text-muted);
  min-height: 30px;
}

.rooms-list {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-right: 6px;
}

.rooms-list::-webkit-scrollbar {
  width: 6px;
}

.rooms-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

.rooms-list::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.4);
  border-radius: 999px;
}

.hidden {
  display: none !important;
}

.room-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.room-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 255, 255, 0.08), transparent 70%);
  pointer-events: none;
}

.room-card:hover {
  border-color: rgba(0, 255, 255, 0.4);
  box-shadow: 0 35px 65px rgba(0, 0, 0, 0.55);
  transform: translateY(-4px);
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.room-bet {
  font-size: 1.4em;
  color: var(--text-base);
  font-weight: 600;
  font-family: var(--mono);
}

.room-creator {
  font-size: 0.85em;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.empty-rooms {
  text-align: center;
  color: var(--text-muted);
  padding: 45px 20px;
  font-size: 1em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cyber-cyan);
  font-size: 0.85em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.live-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyber-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.9);
  animation: pulse 1.8s ease-in-out infinite;
}

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

.countdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  pointer-events: none;
}

.countdown-number {
  font-size: 15em;
  font-weight: bold;
  color: var(--cyber-cyan);
  text-shadow:
    0 0 20px var(--cyber-cyan),
    0 0 40px var(--cyber-cyan),
    0 0 60px var(--cyber-cyan),
    0 0 80px var(--cyber-cyan);
  animation: countdownPulse 0.8s ease-out;
}

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

.modal-card {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 35px 65px rgba(0, 0, 0, 0.6);
}

@media (max-width: 1024px) {
  .game-container {
    padding: 40px 25px;
    padding-top: 120px;
  }
}

/* ============================================
   RIPPLE EFFECT - Click Animation
   ============================================ */

/* Ripple effect สำหรับปุ่มทั้งหมด */
.wallet-btn,
.choice-btn,
.dex-btn,
.create-btn,
.join-btn,
.cancel-btn,
.find-match-btn,
.cancel-match-btn,
.contract-btn,
.transparency-btn,
.group-chat-tip-btn,
#group-chat-send-btn {
  position: relative;
  overflow: hidden;
}

/* Ripple element - สร้างคลื่นเมื่อคลิก */
.wallet-btn::before,
.choice-btn::before,
.dex-btn::before,
.create-btn::before,
.join-btn::before,
.cancel-btn::before,
.find-match-btn::before,
.cancel-match-btn::before,
.contract-btn::before,
.transparency-btn::before,
.group-chat-tip-btn::before,
#group-chat-send-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

/* Trigger ripple เมื่อคลิก (active state) */
.wallet-btn:active::before,
.choice-btn:active::before,
.dex-btn:active::before,
.create-btn:active::before,
.join-btn:active::before,
.cancel-btn:active::before,
.find-match-btn:active::before,
.cancel-match-btn:active::before,
.contract-btn:active::before,
.transparency-btn:active::before,
.group-chat-tip-btn:active::before,
#group-chat-send-btn:active::before {
  width: 300px;
  height: 300px;
  opacity: 0;
  transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
}

/* Ripple สำหรับปุ่มที่มีสีเฉพาะ */
.wallet-btn::before {
  background: rgba(0, 255, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.choice-btn::before {
  background: rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.dex-btn-buy::before {
  background: rgba(255, 107, 53, 0.4);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
}

.dex-btn-community::before {
  background: rgba(26, 35, 126, 0.4);
  box-shadow: 0 0 20px rgba(26, 35, 126, 0.6);
}

.create-btn::before,
.join-btn::before {
  background: rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.cancel-btn::before {
  background: rgba(255, 77, 77, 0.4);
  box-shadow: 0 0 20px rgba(255, 77, 77, 0.6);
}

.find-match-btn::before {
  background: rgba(0, 255, 255, 0.5);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.7);
}

.cancel-match-btn::before {
  background: rgba(255, 77, 77, 0.4);
  box-shadow: 0 0 20px rgba(255, 77, 77, 0.6);
}

/* 确保按钮内容在 ripple 之上 */
.wallet-btn > *,
.choice-btn > *,
.dex-btn > *,
.create-btn > *,
.join-btn > *,
.cancel-btn > *,
.find-match-btn > *,
.cancel-match-btn > *,
.contract-btn > *,
.transparency-btn > *,
.group-chat-tip-btn > *,
#group-chat-send-btn > * {
  position: relative;
  z-index: 1;
}

/* ปิด ripple เมื่อปุ่ม disabled */
.wallet-btn:disabled::before,
.choice-btn:disabled::before,
.dex-btn:disabled::before,
.create-btn:disabled::before,
.join-btn:disabled::before,
.cancel-btn:disabled::before,
.find-match-btn:disabled::before,
.cancel-match-btn:disabled::before,
.contract-btn:disabled::before,
.transparency-btn:disabled::before,
.group-chat-tip-btn:disabled::before,
#group-chat-send-btn:disabled::before {
  display: none;
}

/* Neon off mode - ปิด ripple effect */
body.neon-off .wallet-btn::before,
body.neon-off .choice-btn::before,
body.neon-off .dex-btn::before,
body.neon-off .create-btn::before,
body.neon-off .join-btn::before,
body.neon-off .cancel-btn::before,
body.neon-off .find-match-btn::before,
body.neon-off .cancel-match-btn::before,
body.neon-off .contract-btn::before,
body.neon-off .transparency-btn::before,
body.neon-off .group-chat-tip-btn::before,
body.neon-off #group-chat-send-btn::before {
  display: none;
}

@media (max-width: 768px) {
  #modeNavigation {
    left: 10px;
    right: 10px;
  }

  #modeNavigation a {
    flex: 1 1 45%;
    justify-content: center;
  }

  .hands-container {
    flex-direction: column;
  }
}

/* ========================================
   Toast Notification System
   ======================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 400px;
  width: calc(100% - 40px);
}

.toast {
  background: rgba(5, 8, 30, 0.95);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 255, 0.2);
  pointer-events: all;
  transform: translateX(450px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(10px);
  min-width: 280px;
  max-width: 100%;
}

.toast-show {
  transform: translateX(0);
  opacity: 1;
}

.toast-hide {
  transform: translateX(450px);
  opacity: 0;
}

.toast-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
}

.toast-success .toast-icon {
  background: rgba(0, 255, 157, 0.2);
  color: #00ff9d;
}

.toast-error .toast-icon {
  background: rgba(255, 77, 77, 0.2);
  color: #ff4d4d;
}

.toast-warning .toast-icon {
  background: rgba(255, 224, 102, 0.2);
  color: #ffe066;
}

.toast-info .toast-icon {
  background: rgba(0, 255, 255, 0.2);
  color: #00ffff;
}

.toast-message {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-base);
  line-height: 1.5;
  word-wrap: break-word;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.toast-close:hover {
  color: var(--text-base);
}

.toast-success {
  border-color: rgba(0, 255, 157, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 157, 0.15);
}

.toast-error {
  border-color: rgba(255, 77, 77, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 77, 77, 0.15);
}

.toast-warning {
  border-color: rgba(255, 224, 102, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 224, 102, 0.15);
}

.toast-info {
  border-color: rgba(0, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 255, 0.15);
}

@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }

  .toast {
    min-width: auto;
    width: 100%;
  }

  .toast {
    transform: translateY(-100px);
  }

  .toast-show {
    transform: translateY(0);
  }

  .toast-hide {
    transform: translateY(-100px);
  }
}

/* ========================================
   Skeleton Loading States
   ======================================== */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

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

.skeleton-text {
  height: 1em;
  margin: 0.5em 0;
  border-radius: 4px;
}

.skeleton-text:last-child {
  width: 80%;
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: 1em;
  border-radius: 4px;
}

.skeleton-button {
  height: 40px;
  width: 120px;
  border-radius: 8px;
}

.skeleton-card {
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.skeleton-circle {
  border-radius: 50%;
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 255, 255, 0.2);
  border-top-color: var(--cyber-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-overlay-content {
  background: rgba(5, 8, 30, 0.95);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.loading-overlay-content .loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border-width: 4px;
}

.loading-overlay-content p {
  color: var(--text-base);
  margin: 0;
}

/* ========================================
   Mobile Responsiveness Improvements
   ======================================== */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .game-container,
  .container {
    padding: 15px !important;
    max-width: 100% !important;
  }

  #modeNavigation {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    font-size: 0.85rem;
  }

  #modeNavigation a {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .wallet-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .wallet-info {
    font-size: 0.85rem;
    padding: 12px;
  }

  h1 {
    font-size: 1.8rem !important;
  }

  h2 {
    font-size: 1.4rem !important;
  }

  .info-card,
  .panel {
    padding: 15px;
    margin: 10px 0;
  }

  button {
    padding: 10px 16px;
    font-size: 0.9rem;
    min-height: 40px;
  }

  input,
  textarea {
    padding: 10px;
    font-size: 0.9rem;
  }

  /* Touch-friendly targets */
  .choice-btn,
  button,
  a {
    min-height: 44px;
    min-width: 44px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 5px;
  }

  h1 {
    font-size: 1.5rem !important;
  }

  h2 {
    font-size: 1.2rem !important;
  }

  #modeNavigation {
    font-size: 0.75rem;
  }

  #modeNavigation a {
    padding: 6px 10px;
  }

  .wallet-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 768px) {
  * {
    max-width: 100%;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  pre,
  code {
    overflow-x: auto;
    word-wrap: break-word;
  }
}

/* ========================================
   Tooltip Styles
   ======================================== */
.luna-tooltip {
  position: absolute;
  background: rgba(5, 8, 30, 0.95);
  color: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 10000;
  white-space: nowrap;
  border: 1px solid rgba(0, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s;
  font-family: 'Space Grotesk', var(--mono);
  backdrop-filter: blur(8px);
}

.luna-tooltip::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 6px solid transparent;
}

.luna-tooltip[data-position="top"]::before {
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: rgba(0, 255, 255, 0.3);
}

.luna-tooltip[data-position="bottom"]::before {
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: rgba(0, 255, 255, 0.3);
}

.luna-tooltip[data-position="left"]::before {
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: rgba(0, 255, 255, 0.3);
}

.luna-tooltip[data-position="right"]::before {
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: rgba(0, 255, 255, 0.3);
}

/* ========================================
   Enhanced Loading States
   ======================================== */
.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-loading .loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.btn-loading.hidden {
  display: none;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

button:disabled .btn-text {
  opacity: 0.5;
}

/* Form validation error styles */
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: rgba(255, 77, 77, 0.6) !important;
  box-shadow: 0 0 8px rgba(255, 77, 77, 0.3) !important;
}

.error-message {
  color: #ff4d4d;
  font-size: 0.85rem;
  margin-top: 4px;
  display: none;
}

.error-message.show {
  display: block;
}

/* Offline indicator */
.offline-indicator {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 77, 77, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 10001;
  display: none;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.offline-indicator.show {
  display: flex;
}

/* Progress bar for long operations */
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-pink));
  width: 0%;
  transition: width 0.3s ease;
  animation: progress-shimmer 2s infinite;
}

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

