/* Desktop Bingo App Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1a472a;
  --primary-light: #2d6a3e;
  --primary-dark: #0d2417;
  --secondary-color: #c9a961;
  --danger-color: #c0392b;
  --background: #f5f5dc;
  --card-bg: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --border-color: #ddd;
  --success-color: #27ae60;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, var(--background) 0%, #e8dcc4 100%);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Background image support for themed backgrounds */
body.has-background-image {
  background: var(--background);
}

body.has-background-image::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--background-image);
  background-size: cover;
  background-position: center;
  background-repeat: repeat;
  opacity: 1;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100vh;
}

/* Header */
.header {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 15px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  flex: 1;
}

.title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.language-selector,
.theme-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.language-selector label,
.theme-selector label {
  font-weight: 600;
}

.lang-select,
.theme-select {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: white;
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-select:hover,
.theme-select:hover {
  background: #f0f0f0;
}

.btn-icon {
  background: var(--secondary-color);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 300px 1fr 280px;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Panel Styles */
.left-panel,
.right-panel {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.panel-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.panel-header h2 {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin: 0;
}

/* Bingo Board */
.bingo-board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.board-number {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ecf0f1;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
  cursor: default;
}

.board-number.drawn {
  background: var(--primary-color);
  color: white;
  transform: scale(0.95);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.board-number.last-drawn {
  background: var(--secondary-color);
  color: var(--primary-dark);
  animation: highlight 1s ease-in-out;
}

@keyframes highlight {
  0%, 100% { transform: scale(0.95); }
  50% { transform: scale(1.1); }
}

/* Statistics */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-item {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: white;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
}

/* Center Panel */
.center-panel {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Extraction Display */
.extraction-display {
  text-align: center;
  padding: 2rem;
}

.number-display {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  border-radius: 50%;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 25px rgba(26, 71, 42, 0.4);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.number-display:hover {
  transform: scale(1.05);
}

.number-text {
  font-size: 5rem;
  font-weight: bold;
  line-height: 1;
  z-index: 1;
}

.number-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  min-height: 4rem;
  padding: 1rem;
  line-height: 1.5;
}

/* Mode Selector */
.mode-selector {
  text-align: center;
}

.mode-label {
  display: block;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.mode-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.mode-btn {
  padding: 1rem 2rem;
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-primary);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mode-btn:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mode-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(26, 71, 42, 0.3);
}

/* Italian dialect selector */
.italian-dialect-selector {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border-color);
}

.dialect-label {
  display: block;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-align: center;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dialect-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.dialect-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dialect-btn:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.dialect-btn.active {
  background: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
  box-shadow: 0 3px 8px rgba(201, 169, 97, 0.3);
}

/* Controls */
.controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 1.25rem 2.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  min-width: 150px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-dark);
}

.btn-secondary:hover {
  background: #d4b76a;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #e74c3c;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-large {
  font-size: 1.2rem;
  padding: 1.5rem 3rem;
}

/* Auto Settings */
.auto-settings {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}

.timer-label {
  display: block;
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.timer-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

#timerSlider {
  flex: 1;
  max-width: 300px;
}

#timerValue {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.5rem;
  min-width: 60px;
}

/* Right Panel - Last Numbers */
.last-numbers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.last-number {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: white;
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.last-number:hover {
  transform: scale(1.05);
}

.empty-state {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-secondary);
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: var(--shadow);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 35px;
  height: 35px;
  transition: transform 0.3s ease;
}

.modal-close:hover {
  transform: scale(1.2);
}

.modal-body {
  padding: 2rem;
}

.modal-body h3 {
  color: var(--primary-color);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.modal-body ul {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.modal-body li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.modal-actions .btn {
  flex: 1;
}

/* Animations */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.number-display.animate {
  animation: pulse 0.6s ease-in-out;
}

/* Avatar Overlay */
.avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border-radius: 50%;
  z-index: 2;
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s ease;
}

.avatar-overlay.show {
  opacity: 1;
  transform: scale(1);
}

.avatar {
  width: 160px;
  height: 160px;
  position: relative;
  transition: all 0.3s ease;
}

.avatar-face {
  width: 120px;
  height: 120px;
  background: linear-gradient(145deg, #ffeaa7 0%, #fdcb6e  100%);
  border-radius: 50%;
  position: relative;
  border: 4px solid var(--primary-color);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

/* Capelli bellissimi - contenuti nel cerchio */
.hair {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 105px;
  height: 60px;
  background: linear-gradient(135deg, #8B4513 0%, #D2691E  50%, #CD853F 100%);
  border-radius: 50% 50% 20% 20% / 60% 60% 40% 40%;
  border: 3px solid #654321;
  box-shadow: 
    inset 0 3px 6px rgba(255, 255, 255, 0.3),
    inset 0 -3px 6px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: -1;
  clip-path: circle(60px at 50% 75%);
}

/* Ciocche di capelli - più piccole e contenute */
.hair::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 8px;
  width: 22px;
  height: 28px;
  background: linear-gradient(45deg, #8B4513, #CD853F);
  border-radius: 50% 20% 50% 80%;
  transform: rotate(-15deg);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.hair::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 8px;
  width: 22px;
  height: 28px;
  background: linear-gradient(-45deg, #8B4513, #CD853F);
  border-radius: 20% 50% 80% 50%;
  transform: rotate(15deg);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Naso carino e realistico */
.nose {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -12px);
  width: 12px;
  height: 8px;
  background: linear-gradient(135deg, #ffcc80 0%, #ffb74d 50%, #ff9800 100%);
  border-radius: 50% 50% 60% 60% / 70% 70% 30% 30%;
  border: 1px solid rgba(255, 152, 0, 0.2);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1px 1px rgba(255, 152, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.15),
    0 2px 6px rgba(255, 152, 0, 0.2);
  transition: all 0.3s ease;
}

/* Highlight sul naso */
.nose::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-60%);
  width: 3px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  z-index: 1;
}

/* Narici del naso più realistiche */
.nose::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 152, 0, 0.4) 20%, 
    rgba(255, 152, 0, 0.6) 35%, 
    transparent 50%,
    rgba(255, 152, 0, 0.6) 65%, 
    rgba(255, 152, 0, 0.4) 80%, 
    transparent 100%);
  border-radius: 50%;
}

/* Animazione naso durante il parlato */
@keyframes noseBreathing {
  0%, 100% { 
    transform: translate(-50%, -12px) scale(1);
    filter: brightness(1);
  }
  50% { 
    transform: translate(-50%, -12px) scale(1.05);
    filter: brightness(1.1);
  }
}

.eyes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 16px 0;
}

.eye {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  border: 3px solid var(--primary-color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pupil {
  width: 10px;
  height: 10px;
  background: var(--primary-color);
  border-radius: 50%;
  transition: all 0.2s ease;
}

/* Ciglia bellissime */
.eyelashes {
  position: absolute;
  top: -6px;
  width: 24px;
  height: 8px;
  pointer-events: none;
}

.eyelashes.left {
  left: -3px;
  background: linear-gradient(45deg, transparent 20%, #333 30%, transparent 40%, #333 50%, transparent 60%, #333 70%, transparent 80%);
  transform: rotate(-10deg);
}

.eyelashes.right {
  right: -3px;
  background: linear-gradient(-45deg, transparent 20%, #333 30%, transparent 40%, #333 50%, transparent 60%, #333 70%, transparent 80%);
  transform: rotate(10deg);
}

/* Guance rosee */
.blush {
  position: absolute;
  top: 70%;
  width: 16px;
  height: 12px;
  background: radial-gradient(ellipse, rgba(255, 182, 193, 0.6) 0%, rgba(255, 182, 193, 0.3) 70%, transparent 100%);
  border-radius: 50%;
  pointer-events: none;
}

.blush.left {
  left: 12px;
}

.blush.right {
  right: 12px;
}

.mouth {
  width: 32px;
  height: 16px;
  border: 3px solid #ff6b6b;
  border-radius: 0 0 32px 32px;
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.4s ease;
  background: linear-gradient(to bottom, #ffb3ba 0%, #ff8a95 100%);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Labbro superiore femminile */
.mouth::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 5px;
  background: linear-gradient(to bottom, #ff6b6b 0%, #ff8a95 100%);
  border-radius: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}

/* Denti */
.mouth::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 4px;
  background: white;
  border-radius: 0 0 4px 4px;
  box-shadow: 
    inset 3px 0 0 #f0f0f0,
    inset 6px 0 0 #f0f0f0,
    inset 9px 0 0 #f0f0f0,
    inset 12px 0 0 #f0f0f0,
    inset 15px 0 0 #f0f0f0,
    inset 18px 0 0 #f0f0f0,
    inset 21px 0 0 #f0f0f0;
}

.avatar-body {
  width: 80px;
  height: 50px;
  background: var(--secondary-color);
  border-radius: 40px 40px 16px 16px;
  margin: -12px auto 0;
  position: relative;
  border: 4px solid var(--primary-color);
}

.hands {
  position: absolute;
  top: 10px;
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.hand {
  width: 16px;
  height: 16px;
  background: #ffeaa7;
  border-radius: 50%;
  border: 3px solid var(--primary-color);
  position: relative;
}

.hand.left {
  left: -14px;
}

.hand.right {
  right: -14px;
}

/* Avatar Animations */
@keyframes avatarBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.05); }
}

@keyframes avatarExcited {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-3deg) scale(1.03); }
  75% { transform: rotate(3deg) scale(1.03); }
}

@keyframes overlayPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

/* Animazione bocca parlante naturale e lenta */
@keyframes mouthTalking {
  0% { 
    transform: translateX(-50%) scaleY(1); 
    width: 24px; 
    height: 12px;
    border-radius: 0 0 24px 24px;
  }
  20% { 
    transform: translateX(-50%) scaleY(0.8); 
    width: 26px; 
    height: 8px;
    border-radius: 0 0 26px 26px;
  }
  40% { 
    transform: translateX(-50%) scaleY(1.1); 
    width: 22px; 
    height: 14px;
    border-radius: 0 0 22px 22px;
  }
  60% { 
    transform: translateX(-50%) scaleY(0.9); 
    width: 25px; 
    height: 10px;
    border-radius: 0 0 25px 25px;
  }
  80% { 
    transform: translateX(-50%) scaleY(1.05); 
    width: 23px; 
    height: 13px;
    border-radius: 0 0 23px 23px;
  }
  100% { 
    transform: translateX(-50%) scaleY(1); 
    width: 24px; 
    height: 12px;
    border-radius: 0 0 24px 24px;
  }
}

/* Animazione movimento pupille naturale */
@keyframes eyesBlinking {
  0%, 85%, 100% { transform: scaleY(1); }
  90% { transform: scaleY(0.1); }
}

@keyframes pupilsLookAround {
  0%, 100% { transform: translate(0, 0); }
  16% { transform: translate(1px, -1px); }
  32% { transform: translate(-1px, 1px); }
  48% { transform: translate(1px, 0); }
  64% { transform: translate(-1px, -1px); }
  80% { transform: translate(0, 1px); }
}

@keyframes eyeLidsNatural {
  0%, 100% { height: 16px; }
  94% { height: 16px; }
  97% { height: 2px; }
  99% { height: 16px; }
}

@keyframes eyeBlink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

@keyframes mouthHappy {
  0%, 100% { 
    border-radius: 0 0 32px 32px;
    transform: translateX(-50%) scaleY(1);
  }
  50% { 
    border-radius: 0 0 40px 40px;
    transform: translateX(-50%) scaleY(1.3);
  }
}

@keyframes handWave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-20deg); }
  75% { transform: rotate(20deg); }
}

@keyframes eyeLook {
  0%, 60%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-1px, -1px); }
  30% { transform: translate(1px, 1px); }
  45% { transform: translate(-1px, 0); }
  75% { transform: translate(1px, -1px); }
  90% { transform: translate(0, 1px); }
}

@keyframes fadeInUp {
  0% { 
    opacity: 0; 
    transform: translateY(30px) scale(0.8); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

@keyframes fadeOutDown {
  0% { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
  100% { 
    opacity: 0; 
    transform: translateY(-30px) scale(0.8); 
  }
}

.avatar-overlay.animate-in {
  animation: fadeInUp 0.5s ease-out;
}

.avatar-overlay.animate-out {
  animation: fadeOutDown 0.5s ease-in;
}

.avatar.drawing {
  animation: avatarBounce 0.8s ease-in-out !important;
}

.avatar.excited {
  animation: avatarExcited 1.2s ease-in-out !important;
}

.avatar.drawing .eye {
  animation: eyeBlink 1.5s infinite !important;
}

.avatar.excited .mouth {
  animation: mouthHappy 0.6s ease-in-out infinite alternate !important;
}

.avatar.excited .hand {
  animation: handWave 0.4s ease-in-out infinite !important;
}

.avatar.idle .pupil {
  animation: eyeLook 3s ease-in-out infinite !important;
}

/* Avatar parlante - animazioni naturali e lente */
.avatar.talking .mouth {
  animation: mouthTalking 0.8s ease-in-out infinite !important;
}

.avatar.talking .eye {
  animation: eyeLidsNatural 4s ease-in-out infinite !important;
}

.avatar.talking .pupil {
  animation: pupilsLookAround 6s ease-in-out infinite !important;
}

.avatar.talking .nose {
  animation: noseBreathing 1.2s ease-in-out infinite !important;
}

/* Miglioramenti per l'avatar eccitato */
.avatar.excited .mouth {
  animation: mouthTalking 0.6s ease-in-out infinite, mouthHappy 0.8s ease-in-out infinite alternate !important;
}

.avatar.excited .pupil {
  animation: pupilsLookAround 3s ease-in-out infinite !important;
}

.avatar.excited .hand {
  animation: handWave 0.3s ease-in-out infinite;
}

.avatar.idle .pupil {
  animation: eyeLook 8s ease-in-out infinite;
}

/* Responsive adjustments for smaller desktops */
@media (max-width: 1200px) {
  .main-layout {
    grid-template-columns: 250px 1fr 250px;
  }
  
  .bingo-board {
    gap: 0.3rem;
  }
  
  .board-number {
    font-size: 0.9rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  /* Future dark mode support */
}
