/* ═══════════════════════════════════════════════════════════
   vs_styles.css — VS Mode Complete Styling
   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   Global VS Mode Styles
   ───────────────────────────────────────────────────────── */

.vs-lobby-container,
.vs-arena-body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary, #0a0a0a);
  color: var(--text-primary, #ffffff);
  min-height: 100vh;
}

/* ─────────────────────────────────────────────────────────
   Lobby Styles
   ───────────────────────────────────────────────────────── */

.vs-lobby-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lobby-section {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.lobby-header h1 {
  font-size: 48px;
  margin: 0 0 10px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lobby-subtitle {
  font-size: 18px;
  color: #888;
  margin-bottom: 40px;
}

.lobby-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.lobby-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.lobby-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.lobby-btn-primary {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.lobby-btn-primary:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
}

.lobby-btn-secondary {
  border-color: #f093fb;
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.1), rgba(245, 87, 108, 0.1));
}

.lobby-btn-secondary:hover {
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 87, 108, 0.2));
}

.lobby-btn-tertiary {
  border-color: #4facfe;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.1), rgba(0, 242, 254, 0.1));
}

.lobby-btn-tertiary:hover {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(0, 242, 254, 0.2));
}

.btn-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.btn-text {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 5px;
}

.btn-desc {
  font-size: 14px;
  color: #888;
}

.lobby-footer {
  margin-top: 40px;
}

.back-link {
  color: #667eea;
  text-decoration: none;
  font-size: 16px;
}

.back-link:hover {
  text-decoration: underline;
}

/* Matching Section */
.matching-content {
  padding: 60px 20px;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 30px;
}

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

.matching-content h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.status-message {
  font-size: 16px;
  color: #888;
  margin-bottom: 30px;
}

.status-message.status-loading {
  color: #667eea;
}

.status-message.status-success {
  color: #22c55e;
}

.status-message.status-error {
  color: #ef4444;
}

.btn-cancel {
  padding: 12px 32px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  border-radius: 8px;
  color: #ef4444;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Room Host Section */
.room-content {
  padding: 40px 20px;
}

.room-code-display {
  margin: 30px 0;
}

.room-code-display label {
  display: block;
  font-size: 14px;
  color: #888;
  margin-bottom: 10px;
}

.room-code {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 8px;
  color: #667eea;
  font-family: 'Courier New', monospace;
}

.share-section {
  margin: 30px 0;
}

.share-link-container {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.share-link {
  color: #4facfe;
  text-decoration: none;
  font-size: 14px;
  word-break: break-all;
}

.btn-copy {
  padding: 8px 16px;
  background: rgba(79, 172, 254, 0.2);
  border: 1px solid #4facfe;
  border-radius: 6px;
  color: #4facfe;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

.btn-copy:hover {
  background: rgba(79, 172, 254, 0.3);
}

/* Room Join Section */
.join-content {
  padding: 40px 20px;
}

.join-form {
  margin: 30px 0;
}

.join-form label {
  display: block;
  font-size: 14px;
  color: #888;
  margin-bottom: 10px;
}

.join-form input {
  width: 100%;
  max-width: 300px;
  padding: 16px;
  font-size: 24px;
  text-align: center;
  letter-spacing: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-family: 'Courier New', monospace;
  margin-bottom: 20px;
}

.join-form input:focus {
  outline: none;
  border-color: #667eea;
}

.btn-join {
  padding: 12px 32px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-join:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-back {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  margin-top: 20px;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ─────────────────────────────────────────────────────────
   Arena Styles
   ───────────────────────────────────────────────────────── */

.arena-container {
  display: grid;
  grid-template-columns: 30% 50% 20%;
  height: 100vh;
  gap: 0;
  overflow: hidden;
}

/* Task Panel (Left) */
.task-panel {
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stage-info {
  font-size: 20px;
  font-weight: 600;
  color: #667eea;
}

.timer {
  font-size: 24px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #22c55e;
}

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

.task-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.task-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.task-description {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #e0e0e0;
}

.test-cases {
  margin-top: 20px;
}

.test-case {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.test-case code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

.btn-hint {
  margin-top: 20px;
  padding: 10px 20px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid #fbbf24;
  border-radius: 8px;
  color: #fbbf24;
  cursor: pointer;
  font-size: 14px;
}

.btn-hint:hover {
  background: rgba(251, 191, 36, 0.3);
}

/* Editor Panel (Center) */
.editor-panel {
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
}

.monaco-container {
  flex: 1;
  min-height: 0;
}

.editor-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-run {
  padding: 10px 24px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-run:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.btn-submit {
  padding: 10px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.run-count {
  margin-left: auto;
  font-size: 14px;
  color: #888;
}

.output-console {
  height: 200px;
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.console-header {
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
}

.console-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.console-line {
  margin-bottom: 4px;
}

.console-error {
  color: #ef4444;
}

/* Battle Panel (Right) */
.battle-panel {
  background: rgba(255, 255, 255, 0.02);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.player-status {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player {
  margin-bottom: 20px;
}

.player-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #888;
}

.hp-container {
  margin-bottom: 8px;
}

.hp-bar-bg {
  width: 100%;
  height: 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.hp-bar {
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  transition: width 0.5s ease, background 0.3s ease;
  border-radius: 12px;
}

.hp-text {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  text-align: center;
}

.score {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  color: #667eea;
}

.vs-divider {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #ef4444;
  margin: 10px 0;
}

.attack-inventory-section {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 300px;
  overflow-y: auto;
}

.attack-inventory-section h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: #888;
}

.attack-inventory {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inventory-empty {
  font-size: 12px;
  color: #666;
  text-align: center;
  padding: 20px 0;
}

.attack-card {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.attack-card:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: translateX(4px);
}

.attack-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.attack-stars {
  font-size: 12px;
}

.event-feed-section {
  flex: 1;
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.event-feed-section h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: #888;
}

.event-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 12px;
  transition: all 0.3s ease;
}

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

.event-message {
  flex: 1;
  color: #e0e0e0;
}

.event-time {
  font-size: 10px;
  color: #666;
}

/* Match End Overlay */
.match-end-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.match-end-content {
  text-align: center;
  padding: 60px;
}

.match-end-content h1 {
  font-size: 64px;
  margin-bottom: 20px;
}

.match-end-content p {
  font-size: 24px;
  color: #888;
  margin-bottom: 40px;
}

.btn-return {
  padding: 16px 48px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
}

/* Big Warning Overlay */
.big-warning-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
}

.big-warning-content {
  font-size: 48px;
  font-weight: 700;
  color: #ef4444;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
  animation: warning-pulse 0.5s ease-in-out;
}

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

@keyframes border-flash {
  0%, 100% { box-shadow: inset 0 0 0 5px #ef4444; }
  50% { box-shadow: inset 0 0 0 5px #ff6600; }
}

/* Responsive */
@media (max-width: 1200px) {
  .arena-container {
    grid-template-columns: 25% 55% 20%;
  }
}

@media (max-width: 768px) {
  .arena-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .task-panel,
  .battle-panel {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* ═══════════════════════════════════════════════════════════
   Enhanced UI Animations and Polish
   ═══════════════════════════════════════════════════════════ */

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

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

.toast-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.toast-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.toast-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.toast-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

/* Button Press Effects */
.lobby-btn:active,
.btn-run:active,
.btn-submit:active,
.btn-join:active {
  transform: translateY(-2px) scale(0.98);
}

.attack-card:active {
  transform: translateX(2px) scale(0.98);
}

/* HP Bar Shake Effect */
@keyframes hp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.hp-bar-damage {
  animation: hp-shake 0.3s ease;
}

/* Success Checkmark Animation */
@keyframes checkmark {
  0% { transform: scale(0) rotate(0deg); }
  50% { transform: scale(1.2) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

.success-checkmark {
  animation: checkmark 0.5s ease;
}

/* Particle Effects for Attacks */
@keyframes particle-float {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-100px) scale(0); opacity: 0; }
}

.attack-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  animation: particle-float 1s ease-out forwards;
}

/* Loading Spinner Enhancement */
.loading-spinner::after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 2px solid transparent;
  border-top-color: rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

/* Button Hover Glow */
.btn-run:hover,
.btn-submit:hover {
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.btn-submit:hover {
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* Console Line Animations */
.console-line {
  animation: console-slide-in 0.2s ease;
}

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

.console-success {
  color: #22c55e;
  font-weight: 600;
}

.console-info {
  color: #3b82f6;
}

/* Stage Transition Effect */
@keyframes stage-transition {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.stage-transition {
  animation: stage-transition 0.5s ease;
}

/* Attack Card Glow on Hover */
.attack-card {
  position: relative;
  overflow: hidden;
}

.attack-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(102, 126, 234, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.attack-card:hover::before {
  transform: translateX(100%);
}

/* Event Feed Item Highlight */
.event-item[data-type="stage_win"] {
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid #22c55e;
}

.event-item[data-type="attack_sent"] {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
}

.event-item[data-type="attack_received"] {
  background: rgba(251, 191, 36, 0.1);
  border-left: 3px solid #fbbf24;
}

/* Disabled Button State */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Focus Indicators for Accessibility */
button:focus-visible,
input:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Connection Status Indicator */
.connection-status {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 6px;
}

.connection-status.connected {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.connection-status.disconnected {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.connection-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.connection-status.connected::before {
  animation: pulse-dot 2s infinite;
}

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

/* Smooth Transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

/* Mobile Toast Adjustments */
@media (max-width: 768px) {
  .toast {
    bottom: 10px;
    right: 10px;
    left: 10px;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════
   Hint Modal Styling
   ═══════════════════════════════════════════════════════════ */

.hint-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  animation: modal-fade-in 0.3s ease;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hint-modal-content {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  animation: modal-slide-up 0.3s ease;
}

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

.hint-modal-content h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #667eea;
}

.hint-text {
  font-size: 16px;
  line-height: 1.8;
  color: #e0e0e0;
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  white-space: pre-wrap;
}

.btn-close-hint {
  padding: 12px 32px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-close-hint:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Show hint button when available */
.btn-hint {
  margin-top: 20px;
  padding: 10px 20px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid #fbbf24;
  border-radius: 8px;
  color: #fbbf24;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-hint:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.3);
  transform: translateY(-2px);
}

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

/* ═══════════════════════════════════════════════════════════
   Match Statistics End Screen
   ═══════════════════════════════════════════════════════════ */

.match-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
}

.stat-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #667eea;
}

/* Confetti Animation */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #667eea;
  top: -10px;
  z-index: 10003;
  animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Enhanced Match End Overlay */
.match-end-overlay {
  backdrop-filter: blur(10px);
}

.match-end-content {
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.95), rgba(30, 30, 30, 0.95));
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 24px;
  padding: 60px;
  max-width: 800px;
  animation: match-end-appear 0.5s ease;
}

@keyframes match-end-appear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.match-end-content h1 {
  font-size: 72px;
  margin-bottom: 20px;
  text-shadow: 0 0 30px currentColor;
}

.btn-return {
  margin-top: 32px;
  padding: 16px 48px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-return:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* Loading States */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.loading-text {
  margin-top: 20px;
  font-size: 18px;
  color: #888;
}

/* Error States */
.error-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 16px;
  text-align: center;
  font-weight: 600;
  z-index: 10000;
  animation: slide-down 0.3s ease;
}

@keyframes slide-down {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.error-banner button {
  margin-left: 16px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

.error-banner button:hover {
  background: rgba(255, 255, 255, 0.3);
}
