/* IPL FanGrid - Modern Mobile-First Design System */

/* Design Tokens */
:root {
  /* Colors - Cricket-inspired warm palette */
  --primary-orange: #FF6B35;
  --primary-gold: #F7931E;
  --success-green: #00C853;
  --error-red: #FF1744;
  --warning-amber: #FFC107;
  
  /* Background Colors */
  --bg-primary: #0A0A0A;
  --bg-secondary: #1A1A1A;
  --bg-tertiary: #2A2A2A;
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-strong: rgba(255, 255, 255, 0.1);
  
  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #B0B0B0;
  --text-tertiary: #808080;
  --text-accent: var(--primary-gold);
  
  /* Interactive Colors */
  --interactive-primary: var(--primary-orange);
  --interactive-hover: #FF8A65;
  --interactive-active: #E64A19;
  
  /* Semantic Colors */
  --correct: var(--success-green);
  --incorrect: var(--error-red);
  --rare-gold: #FFD700;
  --rare-super: #9C27B0;
  --rare-rare: #2196F3;
  --rare-uncommon: #4CAF50;
  --rare-common: #757575;
  
  /* Spacing Scale (8px base) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Typography Scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 40px;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
  
  /* Grid Sizes */
  --grid-cell-size: min(calc((100vw - 80px) / 4), 70px);
  --grid-gap: var(--space-sm);
}

/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

/* Accessibility Improvements */
*:focus {
  outline: 2px solid var(--primary-gold);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

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

/* Skip to main content for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-gold);
  color: var(--bg-primary);
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 6px;
}

/* Screen reader only content */
.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;
}

/* App Layout */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-bottom: 1px solid var(--bg-glass);
  padding: var(--space-md) var(--space-md) var(--space-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.header-content {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-logo {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.player-count-display {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--bg-glass);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
}

.player-icon {
  font-size: var(--text-sm);
}

.streak-display {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--bg-glass);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.streak-fire {
  color: var(--primary-orange);
}

.help-button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-strong);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.help-button:hover {
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: var(--space-lg) var(--space-md);
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* Scoreboard */
.scoreboard {
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(10px);
}

.scoreboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.score-item {
  text-align: center;
}

.score-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.score-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  line-height: 1;
}

.score-value.highlight {
  color: var(--primary-gold);
}

.score-attempts {
  color: var(--text-secondary);
  font-size: var(--text-lg);
}

/* Game Grid */
.game-grid {
  margin-bottom: var(--space-2xl);
}

.grid-header {
  display: grid;
  grid-template-columns: var(--grid-cell-size) repeat(3, 1fr);
  gap: var(--grid-gap);
  margin-bottom: var(--grid-gap);
}

.grid-row {
  display: grid;
  grid-template-columns: var(--grid-cell-size) repeat(3, 1fr);
  gap: var(--grid-gap);
  margin-bottom: var(--grid-gap);
}

.grid-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.grid-cell:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.grid-cell:active {
  transform: translateY(0);
}

/* Header Cells */
.header-cell {
  background: linear-gradient(135deg, var(--bg-glass), var(--bg-glass-strong));
  border: 1px solid var(--bg-glass-strong);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  padding: var(--space-xs);
  line-height: 1.2;
  gap: 2px;
  min-height: var(--grid-cell-size);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.header-cell.empty {
  background: transparent;
  border: none;
  padding: 0;
}

.header-cell .team-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.header-cell .stat-text {
  font-size: 13px;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  text-align: center;
  font-weight: var(--font-semibold);
}

.header-cell .team-name {
  font-size: 12px;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
  margin-top: 2px;
  color: var(--text-primary);
  font-weight: var(--font-semibold);
}

/* Team Cells */
.team-cell {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border: 1px solid var(--bg-glass-strong);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-xs);
  text-align: center;
  min-height: var(--grid-cell-size);
  box-shadow: var(--shadow-sm);
}

.team-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.team-name {
  font-size: 12px;
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
  margin-top: 2px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-text {
  font-size: 13px;
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Input Cells */
.input-cell {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border: 2px solid var(--bg-glass);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  min-height: var(--grid-cell-size);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.input-cell:hover {
  border-color: var(--bg-glass-strong);
}

.input-cell.correct {
  background: linear-gradient(135deg, var(--correct), #00E676);
  border-color: var(--correct);
  box-shadow: 0 0 20px rgba(0, 200, 83, 0.3);
}

.input-cell.incorrect {
  background: linear-gradient(135deg, var(--incorrect), #FF5252);
  border-color: var(--incorrect);
  box-shadow: 0 0 20px rgba(255, 23, 68, 0.3);
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.cell-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  text-align: center;
  width: 100%;
  height: 100%;
  padding: var(--space-xs);
  outline: none;
}

.cell-input::placeholder {
  color: var(--text-tertiary);
  font-size: var(--text-lg);
}

.cell-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: all 0.2s ease;
}

.input-cell:hover .cell-placeholder {
  color: var(--primary-gold);
  transform: scale(1.1);
}

/* Rarity Badge */
.rarity-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: var(--font-bold);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.rarity-badge.gold { background: var(--rare-gold); }
.rarity-badge.super_rare { background: var(--rare-super); }
.rarity-badge.rare { background: var(--rare-rare); }
.rarity-badge.uncommon { background: var(--rare-uncommon); }
.rarity-badge.common { background: var(--rare-common); }

/* Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
}

.search-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.search-header {
  padding: var(--space-lg) var(--space-md) var(--space-md);
  border-bottom: 1px solid var(--bg-glass);
}

/* Search Context Styling */
.search-context {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-glass-strong);
}

.context-cell {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
  font-weight: var(--font-medium);
}

.context-requirements {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
  flex-wrap: wrap;
}

.context-row,
.context-col {
  background: var(--bg-tertiary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  border: 1px solid var(--bg-glass);
  flex: 1;
  min-width: 0;
  text-align: center;
}

.context-intersection {
  color: var(--primary-gold);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.context-count {
  font-size: var(--text-sm);
  color: var(--primary-gold);
  font-weight: var(--font-semibold);
  text-align: center;
}

.search-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 2px solid var(--bg-glass);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: var(--text-lg);
  color: var(--text-primary);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-gold);
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-md) var(--space-md);
}

.search-result {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: var(--font-medium);
}

.search-result:hover {
  background: var(--bg-glass);
}

.search-result:active {
  background: var(--bg-glass-strong);
  transform: scale(0.98);
}

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bg-glass);
  border-top-color: var(--primary-gold);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

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

/* Toast Notifications - Bottom Stacking */
#toast-container {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-sm);
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-glass-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  z-index: 200;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.3s ease;
  max-width: 100%;
  pointer-events: auto;
  text-align: center;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast.success {
  border-color: var(--correct);
  box-shadow: 0 0 20px rgba(0, 200, 83, 0.1);
}

.toast.error {
  border-color: var(--incorrect);
  box-shadow: 0 0 20px rgba(255, 23, 68, 0.1);
}

.toast.gold {
  border-color: var(--primary-gold);
  box-shadow: 0 0 20px rgba(247, 147, 30, 0.2);
}

.toast.info {
  border-color: var(--primary-orange);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.1);
}

/* Viral celebration toasts */
.toast.viral-toast {
  border-width: 2px;
  transform: scale(1.02);
  animation: viralPulse 0.5s ease-out;
}

@keyframes viralPulse {
  0% {
    transform: translateY(20px) scale(0.9);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
  }
  50% {
    transform: translateY(0) scale(1.05);
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.5);
  }
  100% {
    transform: translateY(0) scale(1.02);
    box-shadow: 0 0 35px rgba(255, 107, 53, 0.4);
  }
}

/* Team Name Overlay */
.team-name-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-secondary);
  border: 2px solid var(--primary-orange);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  z-index: 2000;
  backdrop-filter: blur(20px);
  text-align: center;
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--text-primary);
  box-shadow: var(--shadow-xl);
  animation: teamNamePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes teamNamePop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Hide team names - show only logos */
.team-name {
  display: none;
}

/* Make team logos clickable */
.clickable-team-logo {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.clickable-team-logo:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

/* Interactive Help Modal */
.help-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  backdrop-filter: blur(10px);
  animation: helpFadeIn 0.3s ease;
}

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

.help-content {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border: 2px solid var(--primary-orange);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: helpSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes helpSlideIn {
  0% {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--bg-glass-strong);
}

.help-header h2 {
  margin: 0;
  font-size: var(--text-xl);
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.help-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: var(--text-2xl);
  cursor: pointer;
  padding: var(--space-xs);
  line-height: 1;
  transition: color 0.2s ease;
}

.help-close:hover {
  color: var(--text-primary);
}

.help-steps {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.help-step {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.step-number {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.step-content h3 {
  margin: 0 0 var(--space-xs) 0;
  font-size: var(--text-lg);
  color: var(--text-primary);
}

.step-content p {
  margin: 0 0 var(--space-sm) 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.help-example {
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-strong);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  font-family: monospace;
  font-size: var(--text-sm);
  text-align: center;
}

.example-team {
  background: var(--primary-orange);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.example-stat {
  background: var(--primary-gold);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.rarity-guide {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.rarity {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
}

.rarity.gold {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #FFD700;
}

.rarity.rare {
  background: rgba(156, 39, 176, 0.1);
  border: 1px solid rgba(156, 39, 176, 0.3);
  color: #9C27B0;
}

.rarity.common {
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.3);
  color: #2196F3;
}

.help-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--bg-glass-strong);
  text-align: center;
}

.help-tip {
  margin-bottom: var(--space-md);
  padding: var(--space-sm);
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.help-start-playing {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-base);
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.help-start-playing:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* Mobile responsiveness for help */
@media (max-width: 480px) {
  .help-content {
    margin: var(--space-sm);
    max-height: 95vh;
  }
  
  .help-header,
  .help-steps,
  .help-footer {
    padding: var(--space-md);
  }
  
  .help-step {
    gap: var(--space-sm);
  }
  
  .rarity-guide {
    flex-direction: column;
  }
}

/* Footer */
.app-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--bg-glass);
  padding: var(--space-lg) var(--space-md);
  margin-top: auto;
}

.footer-content {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

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

.countdown-value {
  background: var(--bg-tertiary);
  border: 1px solid var(--bg-glass-strong);
  border-radius: var(--radius-md);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--primary-gold);
  margin-bottom: var(--space-xs);
}

.countdown-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Floating Share Button - WhatsApp style */
.floating-share-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
  border: none;
  border-radius: var(--radius-full);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: floatingPulse 2s infinite;
}

@keyframes floatingPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.6);
  }
}

.floating-share-button:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.6);
  animation: none;
}

.floating-share-button:active {
  transform: scale(1.05);
}

.floating-share-button .share-icon {
  font-size: var(--text-xl);
}

.floating-share-button .share-text {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
}

.share-button {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: var(--space-lg);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: var(--shadow-md);
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.share-button:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (min-width: 320px) {
  :root {
    --grid-cell-size: min(calc((100vw - 96px) / 4), 72px);
  }
}

@media (min-width: 375px) {
  :root {
    --grid-cell-size: min(calc((100vw - 96px) / 4), 80px);
  }

  .team-logo {
    width: 60px;
    height: 60px;
  }

  .header-cell .team-logo {
    width: 52px;
    height: 52px;
  }

  .stat-text {
    font-size: 14px;
  }

  .header-cell .stat-text {
    font-size: 14px;
  }
}

@media (min-width: 414px) {
  :root {
    --grid-cell-size: min(calc((100vw - 96px) / 4), 88px);
  }
  
  .app-logo {
    font-size: var(--text-3xl);
  }
  
  .score-value {
    font-size: var(--text-3xl);
  }
}

@media (min-width: 768px) {
  :root {
    --grid-cell-size: 100px;
    --grid-gap: var(--space-md);
  }

  .main-content {
    max-width: 700px;
    padding: var(--space-xl) var(--space-lg);
  }

  .scoreboard-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .search-modal {
    align-items: center;
    justify-content: center;
  }

  .search-content {
    max-width: 500px;
    max-height: 600px;
    border-radius: var(--radius-lg);
  }

  .team-logo {
    width: 64px;
    height: 64px;
  }

  .header-cell .team-logo {
    width: 56px;
    height: 56px;
  }

  .stat-text {
    font-size: 15px;
  }

  .header-cell .stat-text {
    font-size: 15px;
    line-height: 1.3;
  }

  .header-cell {
    font-size: var(--text-base);
    padding: 6px;
  }
}

@media (min-width: 1024px) {
  .main-content {
    max-width: 800px;
  }
  
  :root {
    --grid-cell-size: 100px;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --bg-primary: #000000;
    --bg-secondary: #1A1A1A;
    --bg-tertiary: #333333;
    --text-primary: #FFFFFF;
    --text-secondary: #CCCCCC;
    --primary-gold: #FFFF00;
    --primary-orange: #FF6600;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .app-header,
  .app-footer,
  .search-modal,
  .toast {
    display: none !important;
  }
  
  .main-content {
    max-width: none;
    padding: 0;
  }
  
  body {
    background: white;
    color: black;
  }
}