/* Air Hockey Game Styles */

* { 
  padding: 0; 
  margin: 0; 
  box-sizing: border-box; 
}

body { 
  background: linear-gradient(135deg, #0f172a, #1e293b, #334155);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 80px;
}

.game-container.game-active {
  /* Video background handled by video element */
}

/* Background Video */
.background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.7));
  z-index: -1;
}

/* Top Left Logo */
.top-logo {
  position: fixed;
  top: 20px;
  left: 0;
  z-index: 1001;
  width: 100px;
  height: 100px;
  transition: transform 0.3s ease;
}

.top-logo img {
  width:300px;
  height: 100%;
  object-fit: contain;
  object-position: top left;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.top-logo:hover {
  transform: scale(1.1);
}

/* Top Right Social Links */
.social-links {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  display: flex;
  gap: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: transparent;
  border-radius: 50%;
  color: #ffffff;
  transition: all 0.3s ease;
  text-decoration: none;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.social-link:hover {
  background: rgba(34, 197, 94, 0.9);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(34, 197, 94, 0.5);
  border-color: rgba(34, 197, 94, 0.7);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* Start Screen Styles */
.start-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.start-content {
  text-align: center;
  max-width: 540px;
  width: 90%;
  max-height: calc(100vh - 40px);
  padding: clamp(38px, 4vh, 48px);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.9));
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 1px 0 rgba(255, 255, 255, 0.1) inset;
  overflow-y: auto;
  overflow-x: hidden;
  
  /* Hide scrollbar for Chrome, Safari and Opera */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.start-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.logo-section {
  margin-bottom: clamp(12px, 2.5vh, 24px);
}

.logo-icon {
  display: inline-block;
  width: clamp(140px, 18vh, 200px);
  height: auto;
  margin-bottom: clamp(8px, 1.8vh, 16px);
  filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.6)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.game-title {
  font-size: clamp(2rem, 4.5vh, 2.75rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #f3e8ff 50%, #e9d5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 clamp(6px, 1.2vh, 10px) 0;
  letter-spacing: 2px;
  text-shadow: 0 2px 20px rgba(147, 51, 234, 0.4);
  filter: drop-shadow(0 0 30px rgba(147, 51, 234, 0.3));
}

.game-subtitle {
  font-size: clamp(0.9rem, 1.6vh, 1.05rem);
  color: #cbd5e1;
  margin: 0 0 clamp(16px, 3vh, 28px) 0;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.3px;
  opacity: 0.9;
}

.form-section {
  margin-bottom: clamp(10px, 2vh, 20px);
}

.input-group {
  margin-bottom: clamp(10px, 2vh, 20px);
  text-align: left;
}

.input-label {
  display: block;
  font-size: clamp(0.8rem, 1.3vh, 0.9rem);
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: clamp(6px, 1.2vh, 10px);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.text-input {
  width: 100%;
  padding: clamp(10px, 1.8vh, 14px) clamp(14px, 2.2vh, 18px);
  font-size: clamp(0.9rem, 1.6vh, 1.05rem);
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(100, 116, 139, 0.3);
  border-radius: 12px;
  color: #ffffff;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  font-weight: 500;
}

.text-input:focus {
  border-color: #9333ea;
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 
    0 0 0 3px rgba(147, 51, 234, 0.2),
    0 4px 12px rgba(147, 51, 234, 0.3);
  transform: translateY(-1px);
}

.text-input::placeholder {
  color: #64748b;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 10px);
  margin-bottom: clamp(10px, 2vh, 20px);
}

.game-button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(3px, 0.5vh, 5px);
  gap: clamp(6px, 1.2vh, 10px);
  padding: clamp(12px, 2.2vh, 16px) clamp(18px, 2.8vh, 24px);
  font-size: clamp(0.9rem, 1.6vh, 1.05rem);
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.game-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.game-button:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 50%, #6b21a8 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.5);
}

.btn-secondary {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 50%, #0f766e 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-neutral {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.9), rgba(51, 65, 85, 0.9));
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.game-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(147, 51, 234, 0.6);
}

.btn-secondary:hover {
  box-shadow: 0 8px 30px rgba(20, 184, 166, 0.6);
}

.btn-success:hover {
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

.game-button:active {
  transform: translateY(0);
}

.join-section {
  padding-top: clamp(12px, 2.5vh, 24px);
  margin-top: clamp(10px, 2vh, 20px);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  position: relative;
}

.join-section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #9333ea, transparent);
}

.section-title {
  font-size: clamp(0.75rem, 1.2vh, 0.85rem);
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: clamp(10px, 1.8vh, 18px);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
}

/* Settings Screen */
.settings-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.settings-content {
  max-width: 600px;
  width: 90%;
  padding: 40px;
  background: rgba(30, 41, 59, 0.3);
  border-radius: 24px;
  border: 1px solid rgba(71, 85, 105, 0.3);
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.settings-title {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 32px 0;
}

.settings-section {
  margin-bottom: 32px;
  text-align: left;
}

.settings-label {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 16px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.color-option {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  margin: 0 auto;
}

.color-option:hover {
  transform: scale(1.05);
}

.color-option.selected {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.color-option.green { background: linear-gradient(135deg, #10b981, #047857); }
.color-option.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.color-option.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.color-option.red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.color-option.orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.color-option.teal { background: linear-gradient(135deg, #06b6d4, #0891b2); }

.ball-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.ball-color-option {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  margin: 0 auto;
}

.ball-color-option:hover {
  transform: scale(1.1);
}

.ball-color-option.selected {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.ball-white { background: #ffffff; }
.ball-yellow { background: #fbbf24; }
.ball-orange { background: #fb923c; }
.ball-red { background: #f87171; }
.ball-pink { background: #f472b6; }
.ball-purple { background: #a78bfa; }
.ball-blue { background: #60a5fa; }
.ball-green { background: #4ade80; }

/* Game UI */
.game-ui {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
}

.game-active .game-ui {
  display: flex;
}

.exit-button {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(239, 68, 68, 0.95);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  letter-spacing: 0.3px;
  z-index: 150;
}

.exit-button:hover {
  background: rgba(220, 38, 38, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(239, 68, 68, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.exit-button:active {
  transform: translateY(0);
}

/* Claim Winnings Button */
.claim-winnings-btn {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: 3px solid #34d399;
  padding: 18px 40px;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 
    0 8px 32px rgba(16, 185, 129, 0.5),
    0 0 60px rgba(16, 185, 129, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: pulse-glow 2s ease-in-out infinite;
  z-index: 10000;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.claim-winnings-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #10b981;
  transform: translateX(-50%) translateY(-3px) scale(1.05);
  box-shadow: 
    0 12px 48px rgba(16, 185, 129, 0.7),
    0 0 80px rgba(16, 185, 129, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.claim-winnings-btn:active {
  transform: translateX(-50%) translateY(-1px) scale(1.02);
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 
      0 8px 32px rgba(16, 185, 129, 0.5),
      0 0 60px rgba(16, 185, 129, 0.3),
      inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow: 
      0 8px 32px rgba(16, 185, 129, 0.8),
      0 0 100px rgba(16, 185, 129, 0.6),
      inset 0 2px 4px rgba(255, 255, 255, 0.4);
  }
}

.score-panel {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 20px 36px;
  backdrop-filter: blur(30px) saturate(180%);
  display: flex;
  align-items: center;
  gap: 32px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 1px 0 rgba(255, 255, 255, 0.1) inset;
  pointer-events: auto;
  z-index: 100;
}

.player-info {
  text-align: center;
  min-width: 120px;
}

.player-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.9;
}

.player-score {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 10px currentColor;
}

.player1-info .player-name {
  color: #fcd34d;
}

.player1-info .player-score {
  color: #fbbf24;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.player2-info .player-name {
  color: #67e8f9;
}

.player2-info .player-score {
  color: #06b6d4;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vs-separator {
  font-size: 1.1rem;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: 3px;
  opacity: 0.7;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.game-info {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  color: #e2e8f0;
  padding: 14px 28px;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(20px) saturate(180%);
  display: none;
  z-index: 100;
  border: 2px solid rgba(148, 163, 184, 0.15);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  letter-spacing: 0.3px;
}

.game-active .game-info {
  display: block;
}

/* Game Canvas */
canvas { 
  display: none;
  border: 6px solid rgba(71, 85, 105, 0.5);
  border-radius: 20px;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 0 2px rgba(148, 163, 184, 0.1);
  background: #1e293b;
}

.game-active canvas {
  display: block;
}

.hidden {
  display: none !important;
}

/* Multiplayer Status Styles */
.multiplayer-status {
  position: fixed;
  top: 80px;
  right: 20px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 0.85rem;
  color: #e2e8f0;
  min-width: 220px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  pointer-events: auto;
}

.connection-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse 2s infinite;
}

.status-dot.connected {
  background: #22c55e;
  animation: none;
}

.status-dot.waiting {
  background: #f59e0b;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.room-info, .player-role {
  font-size: 0.8em;
  opacity: 0.8;
  margin-bottom: 2px;
}

.room-info span, .player-role span {
  font-weight: 600;
  color: #60a5fa;
}

/* Goal Celebration Styles */
.goal-celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: celebrationFadeIn 0.3s ease-out;
}

.celebration-content {
  text-align: center;
  color: white;
  transform: scale(0);
  animation: celebrationBounce 0.8s ease-out forwards;
}

.goal-text {
  font-size: 4rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 
    0 0 20px #fbbf24,
    0 0 40px #f59e0b,
    0 0 60px #d97706;
  margin-bottom: 20px;
  animation: goalTextGlow 2s ease-in-out infinite alternate;
}

.scorer-text {
  font-size: 1.8rem;
  font-weight: 600;
  color: #60a5fa;
  text-shadow: 0 2px 10px rgba(96, 165, 250, 0.5);
  margin-bottom: 30px;
}

.celebration-effects {
  position: relative;
  height: 100px;
}

.firework {
  position: absolute;
  font-size: 2rem;
  animation: fireworksAnimation 3s ease-out forwards;
}

.firework-1 {
  left: 10%;
  animation-delay: 0.2s;
}

.firework-2 {
  left: 25%;
  animation-delay: 0.4s;
}

.firework-3 {
  left: 50%;
  animation-delay: 0.1s;
}

.firework-4 {
  left: 75%;
  animation-delay: 0.3s;
}

.firework-5 {
  left: 90%;
  animation-delay: 0.5s;
}

@keyframes celebrationFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(5px);
  }
}

@keyframes celebrationBounce {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(-90deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes goalTextGlow {
  0% {
    text-shadow: 
      0 0 20px #fbbf24,
      0 0 40px #f59e0b,
      0 0 60px #d97706;
  }
  100% {
    text-shadow: 
      0 0 30px #fbbf24,
      0 0 60px #f59e0b,
      0 0 90px #d97706,
      0 0 120px #b45309;
  }
}

@keyframes fireworksAnimation {
  0% {
    transform: translateY(0) scale(0) rotate(0deg);
    opacity: 1;
  }
  20% {
    transform: translateY(-30px) scale(1) rotate(180deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-60px) scale(1.2) rotate(360deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(0.5) rotate(720deg);
    opacity: 0;
  }
}

@keyframes screenShake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-5px) rotate(-1deg); }
  20% { transform: translateX(5px) rotate(1deg); }
  30% { transform: translateX(-3px) rotate(-1deg); }
  40% { transform: translateX(3px) rotate(1deg); }
  50% { transform: translateX(-2px); }
  60% { transform: translateX(2px); }
  70% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
  90% { transform: translateX(0); }
}

/* Epic Winning Celebration Styles */
.winning-celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at center, rgba(255, 215, 0, 0.3), rgba(255, 140, 0, 0.2), rgba(0, 0, 0, 0.7)),
    linear-gradient(45deg, #1a1a2e, #16213e, #0f172a);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  animation: victoryFadeIn 1s ease-out;
  overflow: hidden;
}

.winning-content {
  text-align: center;
  color: white;
  transform: scale(0);
  animation: epicEntrance 2s ease-out forwards;
  position: relative;
  z-index: 10;
}

.champion-crown {
  font-size: 8rem;
  animation: crownFloat 3s ease-in-out infinite;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px #FFD700);
}

.winner-text {
  font-size: 5rem;
  font-weight: 900;
  background: linear-gradient(45deg, #FFD700, #FFA500, #FF6347, #FFD700);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: championGlow 2s ease-in-out infinite alternate, textShimmer 3s linear infinite;
  text-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
  margin-bottom: 20px;
}

.player-winner {
  font-size: 2.5rem;
  font-weight: 700;
  color: #60a5fa;
  text-shadow: 0 0 20px rgba(96, 165, 250, 0.8);
  margin-bottom: 30px;
  animation: winnerPulse 2s ease-in-out infinite;
}

.victory-message {
  font-size: 2rem;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 40px;
  animation: victoryBounce 1.5s ease-in-out infinite;
}

.celebration-fireworks {
  position: relative;
  height: 200px;
  margin: 40px 0;
}

.big-firework {
  position: absolute;
  font-size: 4rem;
  animation: epicFireworks 4s ease-out infinite;
}

.fw1 { left: 5%; animation-delay: 0.2s; }
.fw2 { left: 15%; animation-delay: 0.8s; }
.fw3 { left: 25%; animation-delay: 0.4s; }
.fw4 { left: 40%; animation-delay: 1.2s; }
.fw5 { left: 55%; animation-delay: 0.6s; }
.fw6 { left: 70%; animation-delay: 1.0s; }
.fw7 { left: 85%; animation-delay: 0.3s; }
.fw8 { left: 95%; animation-delay: 1.4s; }

.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #FFD700;
  animation: confettiFall 5s linear infinite;
  opacity: 0.8;
}

.return-message {
  font-size: 1.2rem;
  color: #94a3b8;
  margin-top: 40px;
  animation: fadeInOut 2s ease-in-out infinite;
}

.epic-background-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.light-ray {
  position: absolute;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, #FFD700, transparent);
  animation: lightRayMove 3s linear infinite;
  opacity: 0.6;
}

.ray1 { left: 20%; animation-delay: 0s; }
.ray2 { left: 40%; animation-delay: 0.5s; }
.ray3 { left: 60%; animation-delay: 1s; }
.ray4 { left: 80%; animation-delay: 1.5s; }

@keyframes victoryFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

@keyframes epicEntrance {
  0% {
    transform: scale(0) rotateY(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.3) rotateY(-90deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(1) rotateY(0deg);
    opacity: 1;
  }
}

@keyframes crownFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes championGlow {
  0% {
    text-shadow: 
      0 0 40px rgba(255, 215, 0, 0.8),
      0 0 60px rgba(255, 165, 0, 0.6);
  }
  100% {
    text-shadow: 
      0 0 60px rgba(255, 215, 0, 1),
      0 0 80px rgba(255, 165, 0, 0.8),
      0 0 100px rgba(255, 99, 71, 0.6);
  }
}

@keyframes textShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes winnerPulse {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.8);
  }
  50% {
    transform: scale(1.1);
    text-shadow: 0 0 30px rgba(96, 165, 250, 1);
  }
}

@keyframes victoryBounce {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes epicFireworks {
  0% {
    transform: translateY(100px) scale(0) rotate(0deg);
    opacity: 0;
  }
  20% {
    transform: translateY(0px) scale(1) rotate(180deg);
    opacity: 1;
  }
  40% {
    transform: translateY(-50px) scale(1.5) rotate(360deg);
    opacity: 1;
  }
  70% {
    transform: translateY(-100px) scale(1.2) rotate(540deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-200px) scale(0.3) rotate(720deg);
    opacity: 0;
  }
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes lightRayMove {
  0% {
    transform: translateX(-100px) scaleY(0);
  }
  50% {
    transform: translateX(0px) scaleY(1);
  }
  100% {
    transform: translateX(100px) scaleY(0);
  }
}

@keyframes epicScreenShake {
  0%, 100% { transform: translateX(0); }
  5% { transform: translateX(-10px) rotate(-2deg); }
  10% { transform: translateX(10px) rotate(2deg); }
  15% { transform: translateX(-8px) rotate(-1deg); }
  20% { transform: translateX(8px) rotate(1deg); }
  25% { transform: translateX(-6px); }
  30% { transform: translateX(6px); }
  35% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  45% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
  55% { transform: translateX(-1px); }
  60% { transform: translateX(1px); }
  65% { transform: translateX(0); }
}

/* ================================
   Web3 Wallet Styles
   ================================ */

/* Wallet Section */
.wallet-section {
  margin-top: clamp(12px, 2.5vh, 24px);
  padding: clamp(16px, 3vh, 24px);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.6));
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* Wallet Section - Bottom Left Fixed Position */
.wallet-section-bottom {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1001;
  padding: 20px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.85));
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(20px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  min-width: 280px;
  max-width: 320px;
}

.wallet-button {
  width: 100%;
  padding: clamp(12px, 2.2vh, 16px) clamp(20px, 3vh, 28px);
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 50%, #6b21a8 100%);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: clamp(0.9rem, 1.6vh, 1.05rem);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.3vh, 12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.5);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.wallet-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.wallet-button:hover::before {
  left: 100%;
}

.wallet-button:hover {
  background: linear-gradient(135deg, #7e22ce 0%, #6b21a8 50%, #581c87 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.6);
}

.wallet-button:active {
  transform: translateY(0);
}

.wallet-button.connected {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.wallet-button.connected:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

.wallet-icon {
  width: clamp(20px, 2.5vh, 28px);
  height: auto;
  filter: brightness(1.2);
}

.button-solana-icon {
  width: clamp(18px, 2.2vh, 24px);
  height: auto;
  filter: brightness(1.1);
}

.wallet-info {
  margin-top: clamp(10px, 2vh, 18px);
  padding: clamp(12px, 2.3vh, 18px);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.7));
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) inset;
}

.wallet-address {
  font-size: clamp(0.75rem, 1.3vh, 0.9rem);
  color: #94a3b8;
  margin-bottom: clamp(4px, 1vh, 8px);
  font-family: 'Courier New', monospace;
  text-align: center;
  word-break: break-all;
}

.wallet-balance {
  font-size: clamp(1rem, 2vh, 1.3rem);
  font-weight: 700;
  color: #10b981;
  text-align: center;
  margin-bottom: clamp(4px, 0.8vh, 6px);
}

.wallet-network {
  font-size: clamp(0.7rem, 1.2vh, 0.8rem);
  color: #64748b;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.airdrop-button {
  width: 100%;
  margin-top: clamp(8px, 1.5vh, 12px);
  padding: clamp(8px, 1.5vh, 10px) clamp(12px, 2vh, 16px);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: clamp(0.8rem, 1.3vh, 0.9rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.airdrop-button:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.airdrop-button:active {
  transform: translateY(0);
}

.airdrop-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.airdrop-button span {
  font-size: 1.1rem;
  margin-right: 6px;
}

.airdrop-help {
  margin-top: 8px;
  text-align: center;
}

.airdrop-help a {
  color: #8b5cf6;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.airdrop-help a:hover {
  color: #a78bfa;
  text-decoration: underline;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border-radius: 24px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  max-width: 540px;
  width: 90%;
  max-height: 90vh;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(139, 92, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 28px 28px 20px 28px;
  border-bottom: 1px solid rgba(147, 51, 234, 0.3);
  text-align: center;
  background: linear-gradient(180deg, rgba(147, 51, 234, 0.08) 0%, transparent 100%);
  flex-shrink: 0;
}

.modal-header h2 {
  color: #ffffff;
  font-size: 1.9rem;
  margin: 0;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(147, 51, 234, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.modal-solana-icon {
  width: 32px;
  height: auto;
  filter: brightness(1.2);
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  /* Custom scrollbar for webkit browsers */
  scrollbar-width: thin;
  scrollbar-color: rgba(147, 51, 234, 0.4) transparent;
}

/* Webkit scrollbar styling (Chrome, Safari, Edge) */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(147, 51, 234, 0.4);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(147, 51, 234, 0.6);
}

.modal-description {
  color: #cbd5e1;
  text-align: center;
  margin-bottom: 28px;
  font-size: 1.05rem;
  font-weight: 500;
}

/* Stake Options */
.stake-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stake-option {
  padding: 18px;
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.2), rgba(51, 65, 85, 0.3));
  border: 2px solid rgba(147, 51, 234, 0.3);
  border-radius: 14px;
  color: #e2e8f0;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stake-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(126, 34, 206, 0.15));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stake-option:hover::before {
  opacity: 1;
}

.stake-option:hover {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.4), rgba(51, 65, 85, 0.5));
  border-color: rgba(147, 51, 234, 0.6);
  transform: translateY(-3px);
  box-shadow: 
    0 8px 20px rgba(147, 51, 234, 0.3),
    0 0 30px rgba(147, 51, 234, 0.15);
}

.stake-option.selected {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.5), rgba(126, 34, 206, 0.5));
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 
    0 8px 25px rgba(147, 51, 234, 0.4),
    0 0 40px rgba(147, 51, 234, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
}

.stake-option.selected::before {
  opacity: 1;
}

/* Custom Stake Input */
.custom-stake-section {
  margin: 24px 0;
  padding: 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(30, 41, 59, 0.4));
  border-radius: 16px;
  border: 1px solid rgba(147, 51, 234, 0.3);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.custom-stake-label {
  display: block;
  color: #e2e8f0;
  font-size: 0.95rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.custom-stake-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.custom-stake-input {
  flex: 1;
  padding: 14px 60px 14px 18px;
  background: rgba(30, 41, 59, 0.8);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

.custom-stake-input:focus {
  outline: none;
  border-color: #a78bfa;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.15),
    0 0 0 3px rgba(139, 92, 246, 0.15);
}

.custom-stake-input::placeholder {
  color: #64748b;
  font-weight: 500;
}

.custom-stake-currency {
  position: absolute;
  right: 18px;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 1rem;
  pointer-events: none;
}

.custom-stake-hint {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 0.9rem;
  text-align: right;
  font-weight: 500;
}

.custom-stake-hint #availableBalance {
  color: #10b981;
  font-weight: 700;
}

/* Bet Summary */
.bet-summary {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.6));
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.15);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  color: #cbd5e1;
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(71, 85, 105, 0.25);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row.highlight {
  color: #10b981;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 16px 0;
  margin: 4px 0;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
  border-radius: 8px;
  padding-left: 12px;
  padding-right: 12px;
}

.summary-row span:first-child {
  display: flex;
  align-items: center;
}

.summary-row span:last-child {
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.summary-row.highlight span:last-child {
  color: #10b981;
  font-size: 1.25rem;
}

.modal-warning {
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 10px;
  color: #fcd34d;
  font-size: 0.95rem;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.1);
}

.modal-footer {
  padding: 24px 28px;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.3) 100%);
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-shrink: 0;
}

.modal-button {
  flex: 1;
  padding: 16px 28px;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-button.btn-cancel {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.5), rgba(51, 65, 85, 0.6));
  color: #e2e8f0;
  border: 1px solid rgba(71, 85, 105, 0.5);
}

.modal-button.btn-cancel:hover {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.7), rgba(51, 65, 85, 0.8));
  border-color: rgba(71, 85, 105, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.modal-button.btn-cancel:active {
  transform: translateY(0);
}

.modal-button.btn-confirm {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 
    0 6px 20px rgba(16, 185, 129, 0.35),
    0 0 30px rgba(16, 185, 129, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.modal-button.btn-confirm:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-3px);
  box-shadow: 
    0 8px 25px rgba(16, 185, 129, 0.45),
    0 0 40px rgba(16, 185, 129, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-button.btn-confirm:active {
  transform: translateY(-1px);
}

.modal-button.btn-neutral {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.5), rgba(51, 65, 85, 0.6));
  color: #e2e8f0;
  border: 1px solid rgba(71, 85, 105, 0.5);
}

.modal-button.btn-neutral:hover {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.7), rgba(51, 65, 85, 0.8));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Transaction Status */
.tx-status {
  text-align: center;
  padding: 20px;
}

.tx-status p {
  color: #94a3b8;
  font-size: 1rem;
  margin-top: 16px;
}

.spinner {
  margin: 0 auto;
  width: 50px;
  height: 50px;
  border: 4px solid rgba(139, 92, 246, 0.2);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tx-signature {
  margin-top: 20px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
}

.tx-signature p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.tx-signature a {
  color: #8b5cf6;
  text-decoration: none;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

.tx-signature a:hover {
  color: #a78bfa;
  text-decoration: underline;
}

/* Disable game buttons when wallet not connected */
.game-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ================================
   Matchmaking Screen Styles
   ================================ */

.matchmaking-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('Images/matchmaking_bg_img/new_img.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.matchmaking-screen::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: transparent;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.matchmaking-screen.active {
  display: flex;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { 
    opacity: 0;
    transform: scale(0.95);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

.matchmaking-content {
  max-width: 700px;
  width: 90%;
  padding: clamp(30px, 4vh, 50px) clamp(25px, 3vh, 40px);
  text-align: center;
  position: relative;
  z-index: 10;
}

.matchmaking-header {
  margin-bottom: 50px;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.match-location {
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: clamp(12px, 2vh, 16px) clamp(28px, 4vh, 40px);
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 50%, #a855f7 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  color: #ffffff;
  font-size: clamp(0.95rem, 1.5vh, 1.1rem);
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  box-shadow: 
    0 8px 30px rgba(147, 51, 234, 0.6),
    0 0 60px rgba(147, 51, 234, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  animation: glow 2s ease-in-out infinite, float 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.badge-solana-icon {
  width: clamp(20px, 2.5vh, 28px);
  height: auto;
  filter: brightness(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.location-badge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.online-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 20px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.online-dot {
  color: #22c55e;
  font-size: 0.6rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.searching-count {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.5),
                0 0 40px rgba(147, 51, 234, 0.3);
  }
  50% {
    box-shadow: 0 8px 30px rgba(147, 51, 234, 0.7),
                0 0 60px rgba(147, 51, 234, 0.5);
  }
}

.match-pool {
  margin-top: 20px;
}

.pool-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.pool-counter {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1.5vh, 15px);
  padding: clamp(10px, 1.5vh, 14px) clamp(20px, 3vh, 28px);
  background: 
    linear-gradient(145deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.15)),
    rgba(15, 23, 42, 0.5);
  border: 3px solid rgba(251, 191, 36, 0.6);
  border-radius: 24px;
  box-shadow: 
    0 0 40px rgba(251, 191, 36, 0.4),
    0 8px 25px rgba(0, 0, 0, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 30px rgba(251, 191, 36, 0.1);
  position: relative;
  overflow: hidden;
}

.pool-counter::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.2), transparent);
  animation: slideLight 3s infinite;
}

@keyframes slideLight {
  0% { left: -100%; }
  100% { left: 100%; }
}

.pool-counter.flash {
  animation: winFlash 0.5s ease-out;
}

@keyframes winFlash {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
  }
  50% {
    transform: scale(1.15);
    border-color: #fbbf24;
    box-shadow: 0 0 60px rgba(251, 191, 36, 0.8),
                0 0 100px rgba(251, 191, 36, 0.5);
  }
}

.pool-amount {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.6));
  min-width: 80px;
  text-align: center;
}

.pool-amount.rolling {
  animation: numberRoll 0.05s linear infinite;
}

@keyframes numberRoll {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.pool-currency {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: #cbd5e1;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.pool-solana-icon {
  width: clamp(24px, 3vh, 32px);
  height: auto;
  filter: brightness(1.1);
}

.matchmaking-players {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  margin-bottom: clamp(20px, 3vh, 30px);
  animation: slideUp 0.5s ease-out 0.3s both;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 clamp(10px, 2vw, 20px);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.player-card {
  padding: clamp(12px, 2vh, 16px) clamp(10px, 1.5vw, 14px);
  background: 
    linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9)),
    rgba(51, 65, 85, 0.5);
  border-radius: 16px;
  border: 2px solid rgba(100, 116, 139, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.player-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.6;
}

.player-1::before {
  color: #10b981;
}

.player-2::before {
  color: #ef4444;
}

.player-1 {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(16, 185, 129, 0.25),
    inset 0 0 30px rgba(16, 185, 129, 0.05);
}

.player-2 {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(239, 68, 68, 0.25),
    inset 0 0 30px rgba(239, 68, 68, 0.05);
}

.player-avatar {
  position: relative;
  margin-bottom: clamp(10px, 1.5vh, 14px);
  display: inline-block;
}

.avatar-circle {
  width: clamp(70px, 9vw, 85px);
  height: clamp(70px, 9vw, 85px);
  margin: 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #475569, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4),
              inset 0 -3px 10px rgba(0, 0, 0, 0.3);
}

.avatar-circle.searching {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5),
              inset 0 -3px 10px rgba(0, 0, 0, 0.3),
              0 0 40px rgba(139, 92, 246, 0.4);
}

/* Avatar Image Styles */
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
  display: block;
}

.avatar-icon {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

/* Avatar Scroll Container for Searching Animation */
.avatar-scroll-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 1;
}

.avatar-rotating-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Legacy scroll styles - kept for compatibility */
.avatar-scroll-item {
  width: 100%;
  height: 130px;
  min-height: 130px;
  max-height: 130px;
  flex-shrink: 0;
  flex-grow: 0;
  display: block;
  margin: 0;
  padding: 0;
  line-height: 0;
  box-sizing: border-box;
}

.avatar-scroll-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  vertical-align: top;
  box-sizing: border-box;
}

/* Infinite Scroll Animation - removed, now using JS rotation */
.slot-machine .avatar-scroll-container {
  /* animation removed */
}

@keyframes infiniteScroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-66.666%);
  }
}

.found-avatar {
  opacity: 0;
  transform: scale(0.5);
  border-radius: 12px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.found-avatar.show {
  display: block !important;
  animation: revealAvatar 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 1;
  transform: scale(1);
}

@keyframes revealAvatar {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
  }
  50% {
    transform: scale(1.15) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.player-flag {
  display: none !important;
}

.searching-flag {
  animation: spin 2s linear infinite;
}

.player-name {
  font-size: clamp(0.85rem, 1.3vw, 1rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: clamp(6px, 1vh, 8px);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.searching-text {
  color: #94a3b8;
  animation: fadeInOut 1.5s ease-in-out infinite;
}

.player-stake {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 10px;
  display: inline-flex;
}

.stake-amount {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

.searching-stake {
  animation: fadeInOut 1.5s ease-in-out infinite;
}

.stake-currency {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.vs-text {
  width: clamp(40px, 6vw, 50px);
  height: clamp(40px, 6vw, 50px);
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 900;
  color: #ffffff;
  border: 3px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.6),
              0 8px 25px rgba(239, 68, 68, 0.4),
              inset 0 -3px 10px rgba(0, 0, 0, 0.3);
  animation: vsPulse 1.5s ease-in-out infinite;
  position: relative;
  z-index: 10;
}

@keyframes vsPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.6),
                0 8px 25px rgba(239, 68, 68, 0.4),
                inset 0 -3px 10px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.8),
                0 8px 30px rgba(239, 68, 68, 0.6),
                inset 0 -3px 10px rgba(0, 0, 0, 0.3);
  }
}

/* Professional Searching Animation */
.slot-machine .avatar-circle {
  animation: searchPulse 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.slot-machine.found .avatar-circle {
  animation: foundReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  overflow: visible;
}

@keyframes searchPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7),
                0 0 20px rgba(139, 92, 246, 0.3);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 15px rgba(139, 92, 246, 0),
                0 0 30px rgba(139, 92, 246, 0.5);
  }
}

@keyframes foundReveal {
  0% {
    transform: scale(1.08);
    box-shadow: 0 0 0 15px rgba(139, 92, 246, 0),
                0 0 30px rgba(139, 92, 246, 0.5);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7),
                0 0 40px rgba(34, 197, 94, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0),
                0 0 20px rgba(34, 197, 94, 0.3);
  }
}

.matchmaking-footer {
  margin-top: 40px;
  animation: slideUp 0.5s ease-out 0.5s both;
}

.search-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vh, 15px);
  margin-bottom: clamp(20px, 3vh, 30px);
  padding: clamp(16px, 2.5vh, 24px) clamp(24px, 3.5vh, 32px);
  background: 
    linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.7)),
    rgba(51, 65, 85, 0.3);
  border-radius: 18px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(139, 92, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.search-status::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
  animation: statusSweep 2s infinite;
}

@keyframes statusSweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

.search-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-spinner {
  width: clamp(20px, 3vh, 28px);
  height: clamp(20px, 3vh, 28px);
  border: 3px solid rgba(139, 92, 246, 0.15);
  border-top-color: #8b5cf6;
  border-right-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.6));
  position: relative;
}

.search-spinner::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 3px solid transparent;
  border-top-color: rgba(139, 92, 246, 0.3);
  border-radius: 50%;
  animation: spin 1.5s linear infinite reverse;
}

.search-text {
  color: #e2e8f0;
  font-size: clamp(0.95rem, 1.5vh, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.5;
}

.search-subtext {
  color: #94a3b8;
  font-size: clamp(0.8rem, 1.2vh, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-top: 4px;
  animation: fadeInOut 2s ease-in-out infinite;
}

.cancel-search-btn {
  padding: clamp(12px, 2vh, 16px) clamp(30px, 4vh, 42px);
  background: 
    linear-gradient(145deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2)),
    rgba(15, 23, 42, 0.5);
  border: 2px solid rgba(239, 68, 68, 0.6);
  border-radius: 14px;
  color: #fca5a5;
  font-size: clamp(0.95rem, 1.5vh, 1.1rem);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
  position: relative;
  overflow: hidden;
}

.cancel-search-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cancel-search-btn:hover::before {
  width: 300px;
  height: 300px;
}

.cancel-search-btn:hover {
  background: 
    linear-gradient(145deg, rgba(239, 68, 68, 0.35), rgba(220, 38, 38, 0.35)),
    rgba(15, 23, 42, 0.7);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(239, 68, 68, 0.4),
    0 0 30px rgba(239, 68, 68, 0.2);
}

.cancel-search-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ================================
   Coin Rush Animation Styles
   ================================ */

.coin-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2200;
}

.coin {
  position: absolute;
  width: 40px;
  height: 40px;
  font-size: 2rem;
  filter: drop-shadow(0 4px 8px rgba(251, 191, 36, 0.6));
  animation: coinFly var(--duration) ease-out forwards;
  pointer-events: none;
}

@keyframes coinFly {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(var(--mid-x), var(--mid-y)) rotate(720deg) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(var(--end-x), var(--end-y)) rotate(1080deg) scale(0.5);
    opacity: 0;
  }
}

.coin.burst {
  animation: coinBurst 0.6s ease-out forwards;
}

@keyframes coinBurst {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  30% {
    transform: scale(1.5) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.3) rotate(720deg);
    opacity: 0;
  }
}

/* Responsive adjustments for matchmaking */
@media (max-width: 768px) {
  .matchmaking-players {
    gap: 20px;
  }
  
  .player-card {
    padding: 20px 15px;
  }
  
  .avatar-circle {
    width: 90px;
    height: 90px;
  }
  
  .avatar-icon {
    font-size: 2.8rem;
  }
  
  .vs-text {
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
  }
  
  .pool-amount {
    font-size: 3rem;
  }
  
  .location-badge {
    font-size: 0.9rem;
    padding: 12px 24px;
  }
}

/* Responsive adjustments for betting modal */
@media (max-width: 600px) {
  .modal-content {
    width: 95%;
    max-height: 92vh;
    border-radius: 20px;
  }
  
  .modal-header {
    padding: 20px 20px 16px 20px;
  }
  
  .modal-header h2 {
    font-size: 1.6rem;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-description {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  
  .stake-options {
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .stake-option {
    padding: 14px;
    font-size: 1rem;
  }
  
  .custom-stake-section {
    padding: 16px;
    margin: 20px 0;
  }
  
  .custom-stake-label {
    font-size: 0.9rem;
  }
  
  .custom-stake-input {
    padding: 12px 55px 12px 14px;
    font-size: 1rem;
  }
  
  .bet-summary {
    padding: 18px;
    margin-bottom: 20px;
  }
  
  .summary-row {
    font-size: 0.95rem;
    padding: 10px 0;
  }
  
  .summary-row.highlight {
    font-size: 1.1rem;
    padding: 14px 8px;
  }
  
  .summary-row.highlight span:last-child {
    font-size: 1.15rem;
  }
  
  .modal-footer {
    padding: 18px 20px;
    gap: 10px;
  }
  
  .modal-button {
    padding: 14px 20px;
    font-size: 0.95rem;
  }
}

@media (max-width: 400px) {
  .modal-content {
    width: 98%;
    max-height: 94vh;
  }
  
  .modal-header h2 {
    font-size: 1.4rem;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .stake-options {
    gap: 8px;
  }
  
  .stake-option {
    padding: 12px;
    font-size: 0.95rem;
  }
  
  .custom-stake-section {
    padding: 14px;
  }
  
  .bet-summary {
    padding: 16px;
  }
  
  .summary-row {
    font-size: 0.9rem;
  }
  
  .summary-row.highlight {
    font-size: 1.05rem;
  }
  
  .modal-footer {
    flex-direction: column;
    gap: 10px;
  }
  
  .modal-button {
    width: 100%;
  }
}

/* Private Room Modal Styles */
.room-info-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.room-code-display {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(168, 85, 247, 0.1));
  border-radius: 16px;
  border: 2px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.room-code-label {
  color: #a78bfa;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.room-code-value {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 8px;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
  margin-bottom: 16px;
  font-family: 'Courier New', monospace;
}

.copy-code-btn {
  padding: 12px 28px;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.copy-code-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
  background: linear-gradient(135deg, #7c3aed, #9333ea);
}

.copy-code-btn:active {
  transform: translateY(0);
}

.room-details {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row.highlight {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent);
  padding: 12px 16px;
  margin: 8px -16px;
  border-radius: 8px;
  border-bottom: none;
}

.detail-label {
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 500;
}

.detail-value {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-row.highlight .detail-value {
  color: #a78bfa;
  font-size: 1.15rem;
}

.tx-status {
  font-size: 0.95rem;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.share-instructions {
  text-align: center;
  padding: 16px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.share-instructions p {
  color: #cbd5e1;
  margin: 0;
}

.share-instructions strong {
  color: #60a5fa;
  font-size: 1.05rem;
}

.confirm-instructions {
  text-align: center;
  padding: 16px;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.confirm-instructions p {
  color: #cbd5e1;
  margin: 0;
}

.confirm-instructions strong {
  color: #fbbf24;
  font-size: 1.05rem;
}

.waiting-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
}

.waiting-indicator p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
}

/* Responsive styles for private room modals */
@media (max-width: 640px) {
  .room-code-value {
    font-size: 2rem;
    letter-spacing: 4px;
  }
  
  .copy-code-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .detail-label, .detail-value {
    font-size: 0.85rem;
  }
}