body {
  width: 100%;
  height: 100%;
  position: absolute;
  background: #000000;
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
  font-family: 'IM Fell French Canon', serif;
}

.container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Combat UI - Pokemon Style */
.combat-ui {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  display: block;
  z-index: 1000;
  transition: all 0.3s ease;
  pointer-events: none;
}

.combat-ui.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.combat-ui:not(.hidden) {
  animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.combat-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.85);
  border: 3px solid #ffffff;
  border-radius: 15px;
  padding: 20px;
  width: 400px;
  max-width: 45vw;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  animation: slideUp 0.3s ease;
  pointer-events: all;
  font-family: 'Courier New', monospace;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
  .combat-panel {
    bottom: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 0.9em;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes fadeInScale {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Health overlay at top of screen */
.health-overlay {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 50px;
  z-index: 1001;
  pointer-events: all;
}

/* Mobile health overlay adjustments */
@media screen and (max-width: 768px) {
  .health-overlay {
    top: 10px;
    gap: 20px;
    flex-direction: column;
    align-items: center;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
  }
}

.health-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.8);
  padding: 15px 20px;
  border: 2px solid #ffffff;
  border-radius: 10px;
  animation: slideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
}

@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.health-bar-container span {
  color: white;
  font-weight: bold;
  font-size: 1.1em;
  font-family: 'Courier New', monospace;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.health-bar {
  width: 200px;
  height: 20px;
  background: rgba(50, 50, 50, 0.8);
  border: 2px solid #ffffff;
  border-radius: 5px;
  overflow: hidden;
}

.health-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4444, #ff6666);
  width: 100%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.health-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: healthShine 3s infinite;
}

.player-health .health-fill {
  background: linear-gradient(90deg, #44ff44, #66ff66);
}

@keyframes healthShine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Action Menu */
.action-menu {
  margin-bottom: 15px;
}

.menu-title {
  color: white;
  font-size: 1.2em;
  margin-bottom: 15px;
  font-weight: bold;
  border-bottom: 2px solid #ffffff;
  padding-bottom: 8px;
}

.menu-options, .quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-option, .quiz-option {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  background: rgba(20, 20, 20, 0.9);
  border: 2px solid #333333;
  border-radius: 8px;
  color: white;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Courier New', monospace;
  position: relative;
  overflow: hidden;
}

.menu-option:hover, .quiz-option:hover {
  background: rgba(40, 40, 40, 0.9);
  border-color: #ffffff;
  transform: translateX(5px);
}

.menu-option.selected, .quiz-option.selected {
  background: rgba(60, 60, 60, 0.9);
  border-color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.1);
  transform: translateX(8px);
}

.menu-option.selected::before, .quiz-option.selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.arrow {
  color: #ffff00;
  font-weight: bold;
  margin-right: 10px;
  font-size: 1.2em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.menu-option.selected .arrow, .quiz-option.selected .arrow {
  opacity: 1;
}

.option-text {
  flex: 1;
}

/* Quiz Section */
.quiz-section {
  margin-bottom: 15px;
}

.quiz-question {
  color: white;
  font-size: 1.2em;
  margin-bottom: 15px;
  font-weight: bold;
  border-bottom: 2px solid #ffffff;
  padding-bottom: 8px;
  font-family: 'Courier New', monospace;
}

.quiz-option.correct {
  background: rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.8);
  animation: correctPulse 0.6s ease;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

.quiz-option.incorrect {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.8);
  animation: incorrectShake 0.6s ease;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

@keyframes correctPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes incorrectShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Combat Log */

.combat-log {
  background: rgba(10, 10, 10, 0.9);
  border: 2px solid #333333;
  border-radius: 8px;
  padding: 10px;
  height: 80px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
}

.combat-log p {
  color: white;
  margin: 3px 0;
  font-size: 0.9em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.xp-notification {
  /* Interface de code */
  .code-interface {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #00ff88;
    border-radius: 15px;
    padding: 20px;
    width: 600px;
    max-width: 90vw;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
  }
  
  .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .code-header h3 {
    color: #00ff88;
    margin: 0;
    font-size: 1.2em;
  }
  
  .timer {
    background: #ff4444;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1em;
  }
  
  .code-question {
    background: rgba(0, 255, 136, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
  }
  
  .code-question p {
    color: #ffffff;
    margin: 0;
    font-size: 1.1em;
  }
  
  #code-input {
    width: 100%;
    height: 200px;
    background: #0a0a0a;
    color: #00ff88;
    border: 1px solid #00ff88;
    border-radius: 8px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
  }
  
  .code-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
  }
  
  .code-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
  }
  
  .code-actions button:first-child {
    background: #00ff88;
    color: #000;
  }
  
  .code-actions button:first-child:hover {
    background: #00cc6a;
    transform: scale(1.05);
  }
  
  .code-actions button:last-child {
    background: #ff4444;
    color: white;
  }
  
  .code-actions button:last-child:hover {
    background: #cc3333;
    transform: scale(1.05);
  }
  
  .code-hints {
    margin-top: 15px;
  }
  
  .code-hints summary {
    color: #00ff88;
    cursor: pointer;
    font-weight: bold;
  }
  
  .code-hints ul {
    margin: 10px 0;
    padding-left: 20px;
  }
  
  .code-hints li {
    color: #cccccc;
    margin: 5px 0;
  }
  
  .super-attack-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    color: #ff6600;
    text-shadow: 0 0 20px #ff6600;
    animation: superAttackPulse 3s ease-in-out;
    z-index: 2000;
    pointer-events: none;
  }
  
  @keyframes superAttackPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; }
  }
  
  @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
  }
  background: rgba(10, 10, 10, 0.9);
  border: 2px solid #333333;
  border-radius: 8px;
  padding: 10px;
  height: 80px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
}

.combat-log p {
  color: white;
  margin: 3px 0;
  font-size: 0.9em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.xp-notification.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes xpPop {
  0% {
    transform: translate(-50%, -50%) scale(0.3) rotate(-10deg);
    opacity: 0;
  }
  30% {
    transform: translate(-50%, -50%) scale(1.15) rotate(5deg);
    opacity: 1;
  }
  60% {
    transform: translate(-50%, -50%) scale(0.95) rotate(-2deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Styles pour les particules de victoire */
.victory-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #ffd700, #ffed4e);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1200;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
}

.hidden {
  display: none !important;
}

.ui {
  width: 100%;
  height: 100%;            
  position: absolute;
  top: 0;
  left: 0;
  font-family: 'IM Fell French Canon', serif;
}

.quest-ui-layout {
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.quest-ui {
  background: rgba(1.0, 1.0, 1.0, 0.75);
  padding: 20px 20px;
  width: 700px;
  z-index: 2;
}

.quest-title {
  font-size: 3em;
  color: white;
  text-shadow: 4px 4px black;
}

.quest-text-title {
  font-size: 3em;
  color: white;
  padding-bottom: 10px;
}

.quest-text {
  font-size: 1em;
  color: white;
}

.quest-journal-layout {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-end;
}

.quest-journal {
  display: flex;
  flex-direction: column;
  background: rgba(1.0, 1.0, 1.0, 0.75);
  margin: 30px;
  padding: 20px 20px;
  padding-top: 5px;
  width: 300px;
  height: 600px;
  z-index: 1;
}

.quest-entry {
  font-size: 2em;
  color: white;
  border: black;
  border-style: solid;
  border-width: thick;
  padding: 5px;
}

.icon-ui {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
}

.icon-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  z-index: 1;
}

.icon-bar-item {
  background-size: cover;
  width: 75px;
  height: 75px;
  margin: 2px;
}

.health-ui {
  background-image: url('./resources/icons/ui/health-bar.png');
  width: 500px;
  height: 300px;
  z-index: 1;
}

.health-bar {
  background: greenyellow;
  width: 200px;
  max-width: 200px;
  height: 40px;
  position: relative;
 
  border-style: solid;
  border-width: 2px;
  border-color: black;
  border-radius: 5px;
}

.stats-tooltip {
  position: relative;
  display: inline-block;
  z-index: 100;
}

.stats-tooltip .stats-tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: black;
  opacity: 0.75;
  text-align: center;
  padding: 1em;
  border-radius: 6px;
  color: white;
  font-size: medium;
  position: absolute;
  z-index: 1;
  top: -5px;
  right: 105%;
}

.stats-tooltip:hover .stats-tooltiptext {
  visibility: visible;
}

.stats-title {
  font-size: 3em;
  color: white;
  text-shadow: 4px 4px black;
}

.stats {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  margin: 30px;
  z-index: 1;
}

.stats-inner {
  display: flex;
  flex-direction: column;
  background: rgba(1.0, 1.0, 1.0, 0.75);
  padding: 20px 20px;
  width: 250px;
  padding-top: 5px;
}

.stats-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  font-size: 2em;
  color: white;
  text-shadow: 4px 4px black;
}

.inventory-title {
  font-size: 3em;
  color: white;
  text-shadow: 4px 4px black;
}

.inventory {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  margin: 30px;
  z-index: 1;
}

.inventory-inner {
  display: flex;
  flex-direction: column;
  background: rgba(1.0, 1.0, 1.0, 0.75);
  padding: 20px 20px;
  padding-top: 5px;
}

.inventory-row {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}

.inventory-column {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.inventory-character {
  background-image: url('./resources/icons/ui/inventory-character.png');
  background-size: cover;
  width: 200px;
  height: 350px;
}

.inventory-item {
  border: black;
  border-style: solid;
  border-radius: 10%;
  background-color: black;
  width: 50px;
  height: 50px;
  margin: 2px;
  background-size: cover;
}
