    * { box-sizing: border-box; margin: 0; padding: 0; }
    body { overflow: hidden; background: #0a0a0f; }
    @keyframes bounce { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(5px); opacity: 0.5; } }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.8; } }

/* ===== STYLES MOBILE ===== */

/* Conteneur principal - position fixed pour éviter scroll sur mobile */
.game-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0f;
  font-family: 'Crimson Text', Georgia, serif;
  overflow: hidden;
}

/* Background */
.background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.5s ease;
}

.background-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.7) 100%);
}

/* Conteneur personnages */
.characters-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
  overflow: hidden;
}

/* Personnage individuel */
.character {
  position: absolute;
  bottom: 0;
  height: 60%;
  width: auto;
  transition: all 0.3s ease;
}

.character.full {
  height: 70%;
}

.character.eirik {
  height: 84%; /* 60% * 1.4 */
}

.character.eirik.full {
  height: 98%; /* 70% * 1.4 */
}

.character.left {
  left: 0;
}

.character.right {
  right: 0;
}

.character.center {
  left: 50%;
  transform: translateX(-50%);
}

/* Quand 2+ personnages, les pousser vers l'extérieur */
.characters-container.multi .character.left {
  left: -15%;
}

.characters-container.multi .character.right {
  right: -15%;
}

/* Image du personnage */
.character img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 0 30px rgba(0,0,0,0.6));
}

/* Boîte de dialogue */
.dialog-box {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.dialog-content {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 20, 50, 0.95) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 16px;
  padding: 14px 22px 18px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Speaker */
.speaker {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

/* Texte */
.dialog-text {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: #f1f5f9;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7), 0 0 12px rgba(0,0,0,0.4);
}

/* Boutons */
.btn-audio, .btn-language, .btn-fullscreen {
  position: absolute;
  top: 15px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  color: #a78bfa;
  cursor: pointer;
  z-index: 20;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-audio { left: 15px; }
.btn-fullscreen { left: 70px; }
.btn-language { right: 15px; font-size: 12px; }

.btn-audio:hover, .btn-language:hover, .btn-fullscreen:hover {
  opacity: 1;
}

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

@media (max-width: 768px) {
  .dialog-content {
    padding: 12px 16px 16px;
    border-radius: 12px;
  }
  
  .dialog-text {
    font-size: 16px;
  }
  
  .speaker {
    font-size: 13px;
  }
}

@media (max-width: 500px) {
  .dialog-box {
    padding: 10px;
  }
  
  .dialog-content {
    padding: 10px 14px 14px;
    border-radius: 10px;
  }
  
  .dialog-text {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .speaker {
    font-size: 12px;
    padding: 3px 10px;
  }
  
  .btn-audio, .btn-fullscreen {
    padding: 6px 10px;
    font-size: 14px;
  }
}

/* ===== MODE PORTRAIT MOBILE ===== */
@media (max-width: 768px) and (orientation: portrait) {
  /* Personnages plus grands en portrait */
  .character {
    height: 55%;
  }
  
  .character.full {
    height: 65%;
  }
  
  .character.eirik {
    height: 77%; /* 55% * 1.4 */
  }
  
  .character.eirik.full {
    height: 91%; /* 65% * 1.4 */
  }
  
  /* Pousser plus fort vers l'extérieur en portrait */
  .characters-container.multi .character.left {
    left: -20%;
  }
  
  .characters-container.multi .character.right {
    right: -20%;
  }
  
  /* Dialog box collée en bas */
  .dialog-box {
    padding: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
