/* ============================================
   BINGO ROLLER CSS - COMPLETE v11.0
   Includes: Base + Tour + Mobile + Tablet + Accessibility + Animations
   ============================================ */

:root {
  --primary: #00c6c9;
  --primary-dark: #009fa1;
  --secondary: #00FF00;
  --accent: #FFD700;
  --bg-dark: #0a0e27;
  --bg-card: #1a1f3a;
  --bg-darker: #0d1128;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.7);
  --text-dimmer: rgba(255, 255, 255, 0.5);
  --border: rgba(255, 255, 255, 0.1);
  --success: #00FF00;
  --error: #FF4444;
  --warning: #FFA500;
  
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-darker));
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible {
  outline-offset: 4px;
}

/* Skip to main content */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary);
  color: #000;
  padding: var(--spacing-md);
  text-decoration: none;
  z-index: 100000;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   SCREEN SYSTEM
   ============================================ */

.screen {
  display: none;
  min-height: 100vh;
  padding: var(--spacing-lg);
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

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

/* ============================================
   LANDING SCREEN
   ============================================ */

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-xl);
}

.mascot-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: var(--spacing-lg);
  filter: drop-shadow(0 8px 24px rgba(0, 198, 201, 0.3));
}

.game-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-sm);
}

.game-subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-dim);
  margin-bottom: var(--spacing-xl);
}

.mode-buttons {
  display: grid;
  gap: var(--spacing-lg);
  width: 100%;
  max-width: 400px;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xl);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 120px;
}

.mode-btn:hover {
  border-color: var(--primary);
  background: rgba(0, 198, 201, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 198, 201, 0.2);
}

.mode-btn:active {
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 2.5rem;
}

.btn-label {
  font-size: 1.25rem;
}

.btn-desc {
  font-size: 0.875rem;
  color: var(--text-dimmer);
  font-weight: 400;
}

.back-link {
  margin-top: var(--spacing-xl);
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--primary);
}

/* ============================================
   SETUP SCREENS
   ============================================ */

.setup-container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: var(--spacing-xl);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.setup-container h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.back-btn {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-dim);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: var(--spacing-lg);
  transition: all var(--transition);
  font-size: 0.875rem;
  font-weight: 600;
}

.back-btn:hover {
  border-color: var(--primary);
  color: var(--text);
}

.input-group {
  margin-bottom: var(--spacing-lg);
}

.input-group label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--text);
}

.input-group input,
.input-group select {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--bg-darker);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  transition: all var(--transition);
  min-height: 48px;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 198, 201, 0.1);
}

.input-group input::placeholder {
  color: var(--text-dimmer);
}

.setup-actions {
  margin-top: var(--spacing-xl);
}

.primary-btn,
.secondary-btn,
.danger-btn,
.tertiary-btn {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 48px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
}

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

.secondary-btn {
  background: var(--bg-darker);
  color: var(--text);
  border: 2px solid var(--border);
  margin-top: var(--spacing-md);
}

.secondary-btn:hover {
  border-color: var(--primary);
}

.danger-btn {
  background: var(--error);
  color: var(--text);
}

.danger-btn:hover {
  background: #cc0000;
  transform: translateY(-2px);
}

.tertiary-btn {
  background: transparent;
  color: var(--text-dim);
  border: 2px solid var(--border);
  margin-top: var(--spacing-md);
}

.tertiary-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   GAME HEADER
   ============================================ */

.game-header {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--bg-card);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.header-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
}

.game-id-label {
  color: var(--text-dimmer);
}

.game-id-value {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1px;
}

.player-name-label {
  color: var(--text);
  font-weight: 600;
}

.icon-btn {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-dim);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1.25rem;
  min-width: 44px;
  min-height: 44px;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.header-center {
  display: flex;
  justify-content: center;
}

.last-called {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--primary);
  text-shadow: 0 0 20px rgba(0, 198, 201, 0.5);
  min-width: 80px;
  text-align: center;
}

.header-action {
  display: flex;
  gap: var(--spacing-sm);
}

.roll-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: #000;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
  min-height: 48px;
}

.roll-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 0, 0.5);
}

.roll-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.cards-indicator {
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ============================================
   TABS
   ============================================ */

.game-tabs {
  display: flex;
  background: var(--bg-darker);
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  flex: 1;
  min-width: 120px;
  padding: var(--spacing-md);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

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

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(0, 198, 201, 0.1);
}

.tab-content {
  display: none;
  padding: var(--spacing-lg);
  flex: 1;
  overflow-y: auto;
}

.tab-content.active {
  display: block;
}

/* ============================================
   BINGO BOARD
   ============================================ */

.board-wrapper {
  display: flex;
  justify-content: center;
  padding: var(--spacing-lg) 0;
}

.bingo-board {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  max-width: 800px;
  width: 100%;
  background: var(--border);
  padding: 2px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bingo-board .header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
  font-weight: 900;
  font-size: clamp(1rem, 2vw, 1.5rem);
  padding: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: span 2;
}

.bingo-board .cell {
  background: var(--bg-card);
  color: var(--text);
  font-size: clamp(0.7rem, 1.5vw, 1rem);
  font-weight: 600;
  padding: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  transition: all 0.2s ease;
  cursor: default;
}

.bingo-board .cell.called {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
  font-weight: 900;
  animation: pulse 0.3s ease;
}

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

.bingo-board .empty {
  background: transparent;
}

/* ============================================
   PATTERN DISPLAY
   ============================================ */

.pattern-display {
  margin-top: var(--spacing-xl);
  text-align: center;
}

.pattern-label {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--spacing-md);
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  max-width: 200px;
  margin: 0 auto var(--spacing-lg);
  background: var(--border);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.pattern-grid .cell {
  aspect-ratio: 1;
  background: var(--bg-darker);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.pattern-grid .cell.win {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(0, 198, 201, 0.5);
}

.pattern-change-section {
  margin-top: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  align-items: center;
}

.pattern-change-section label {
  font-size: 0.875rem;
  color: var(--text-dim);
  font-weight: 600;
}

.pattern-change-select {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-darker);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 40px;
}

.pattern-change-select:focus {
  outline: none;
  border-color: var(--primary);
}

.pattern-change-select:hover {
  border-color: var(--primary);
}

/* ============================================
   PLAYER CARDS
   ============================================ */

.player-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.player-cards-grid.single-card {
  grid-template-columns: 1fr;
  max-width: 400px;
}

.player-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.card-id-label {
  text-align: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.player-card {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: var(--border);
  padding: 2px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.player-card .header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
  font-weight: 900;
  font-size: clamp(1rem, 3vw, 1.25rem);
  padding: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-card .cell {
  background: var(--bg-card);
  color: var(--text);
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  font-weight: 600;
  padding: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  transition: all 0.2s ease;
}

.player-card .cell.called {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
  font-weight: 900;
}

.player-card .cell.free {
  background: var(--accent);
  color: #000;
  font-weight: 900;
  font-size: clamp(0.7rem, 1.5vw, 0.875rem);
}

.cards-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.nav-arrow {
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 44px;
  min-height: 44px;
}

.nav-arrow:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ============================================
   PLAYERS LIST
   ============================================ */

.players-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  max-width: 600px;
  margin: 0 auto;
}

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.player-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.player-item.host-player {
  border-color: var(--accent);
  background: rgba(255, 215, 0, 0.1);
}

.player-item.winner {
  border-color: var(--success);
  background: rgba(0, 255, 0, 0.1);
}

.player-item .cardid {
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ============================================
   INFO SECTION
   ============================================ */

.info-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  max-width: 500px;
  margin: 0 auto var(--spacing-xl);
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
}

.info-label {
  color: var(--text-dimmer);
  font-weight: 600;
}

.info-value {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.125rem;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.stat-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.stat-value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--primary);
  display: block;
  margin-bottom: var(--spacing-sm);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ============================================
   GAME END SCREEN
   ============================================ */

.end-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.end-container h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--spacing-xl);
}

.winners-display {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  max-height: 400px;
  overflow-y: auto;
}

.winner-entry {
  padding: var(--spacing-md);
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid var(--success);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.end-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.end-stat {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
}

.end-stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  display: block;
  margin-bottom: var(--spacing-sm);
}

.end-stat-label {
  font-size: 0.875rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.end-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

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

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--bg-card);
  border-top: 2px solid var(--border);
  margin-top: auto;
}

.footer-btn {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-dim);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 44px;
  min-height: 44px;
}

.footer-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.footer-info {
  color: var(--text-dimmer);
  font-size: 0.875rem;
  font-weight: 600;
}

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

.toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-md);
  border: 2px solid var(--primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
  z-index: 10000;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 90vw;
  text-align: center;
  font-weight: 600;
}

.toast.show {
  bottom: var(--spacing-xl);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 39, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.show {
  display: flex;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--text-dim);
  min-height: 200px;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

.empty-description {
  font-size: 0.875rem;
  color: var(--text-dimmer);
}

/* ============================================
   WIN CELEBRATION
   ============================================ */

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  opacity: 0;
  animation: confetti-fall 3s ease-out forwards;
}

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

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 767px) {
  .game-header {
    grid-template-columns: auto 1fr;
    gap: var(--spacing-sm);
  }
  
  .header-center {
    grid-column: 1 / -1;
    justify-content: center;
  }
  
  .header-action {
    grid-column: 1 / -1;
  }
  
  .roll-btn {
    width: 100%;
  }
  
  .bingo-board {
    grid-template-columns: repeat(10, 1fr);
    gap: 1px;
    font-size: 0.7rem;
  }
  
  .player-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .player-card-wrapper {
    display: none;
  }
  
  .player-card-wrapper.active {
    display: flex;
  }
  
  .tab-btn {
    font-size: 0.75rem;
    padding: var(--spacing-sm);
    min-width: 80px;
  }
  
  .mode-buttons {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) {
  .game-header {
    grid-template-columns: auto 1fr auto auto;
  }
  
  .player-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .bingo-board {
    max-width: 600px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .mode-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   RESPONSIVE - DESKTOP
   ============================================ */

@media (min-width: 1024px) {
  .player-cards-grid:not(.single-card) {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .bingo-board {
    max-width: 800px;
  }
}

@media (min-width: 1440px) {
  .player-cards-grid:not(.single-card) {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   TOUR STYLES (Fixed v2.0)
   ============================================ */

.tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 39, 0.92);
  z-index: 11000;
  display: none;
  pointer-events: none;
}

.tour-overlay.active {
  display: block;
  pointer-events: auto;
}

.tour-spotlight {
  position: absolute;
  background: transparent;
  border: 3px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: 
    0 0 0 9999px rgba(10, 14, 39, 0.92),
    0 0 20px rgba(0, 198, 201, 0.6),
    inset 0 0 20px rgba(0, 198, 201, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 11001;
  pointer-events: none;
  will-change: transform;
}

.tour-spotlight.pulse {
  animation: pulse-spotlight 1s ease-in-out 3;
}

@keyframes pulse-spotlight {
  0%, 100% { 
    transform: scale(1);
    border-color: var(--primary);
  }
  50% { 
    transform: scale(1.02);
    border-color: var(--secondary);
    box-shadow: 
      0 0 0 9999px rgba(10, 14, 39, 0.92),
      0 0 30px rgba(0, 255, 0, 0.8),
      inset 0 0 30px rgba(0, 255, 0, 0.5);
  }
}

.tour-tooltip {
  position: absolute;
  background: linear-gradient(135deg, #1a1f3a, #2a2f4a);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
  z-index: 11002;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.tour-progress {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-sm);
  text-align: center;
}

.tour-content {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.tour-actions {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-end;
}

.tour-skip,
.tour-next {
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 44px;
  min-width: 80px;
}

.tour-skip {
  background: transparent;
  color: var(--text-dim);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.tour-skip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.tour-next {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
}

.tour-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 0, 0.4);
}

.tour-skip:active,
.tour-next:active {
  transform: scale(0.95);
}

@media (max-width: 767px) {
  .tour-tooltip {
    max-width: calc(100vw - 40px);
    left: 20px !important;
    right: 20px;
    bottom: 20px !important;
    top: auto !important;
  }
  
  .tour-progress {
    font-size: 0.8rem;
  }
  
  .tour-content {
    font-size: 0.95rem;
  }
  
  .tour-actions {
    flex-direction: row;
  }
  
  .tour-skip,
  .tour-next {
    flex: 1;
  }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .tour-spotlight,
  .tour-tooltip,
  .confetti {
    animation: none !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .game-header,
  .game-tabs,
  .game-footer,
  .tour-overlay,
  .toast,
  .loading-overlay {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .bingo-board,
  .player-card {
    border: 2px solid black;
  }
}
