* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  font-family: 'Cinzel', 'Segoe UI', serif, sans-serif;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #030204;
  color: #ffffff;
}

#canvas-container {
  width: 100%;
  height: 100%;
  display: block;
}

/* Écran d'accueil */
#instructions {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(20, 10, 15, 0.85) 0%, rgba(5, 2, 5, 0.98) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: opacity 0.5s ease;
}

.card-prompt {
  text-align: center;
  background: rgba(25, 15, 20, 0.7);
  padding: 40px 50px;
  border-radius: 16px;
  border: 1px solid rgba(220, 38, 38, 0.4);
  box-shadow: 0 0 50px rgba(185, 28, 28, 0.3), inset 0 0 25px rgba(0, 0, 0, 0.8);
  max-width: 580px;
}

.card-prompt h1 {
  font-size: 3rem;
  letter-spacing: 8px;
  color: #f87171;
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
  margin-bottom: 4px;
}

.subtitle {
  font-size: 1rem;
  letter-spacing: 3px;
  color: #fca5a5;
  text-transform: uppercase;
  margin-bottom: 25px;
}

.quest-box {
  background: rgba(15, 5, 8, 0.6);
  border-left: 4px solid #ef4444;
  padding: 15px;
  text-align: left;
  margin-bottom: 25px;
  border-radius: 4px;
}

.quest-box h3 {
  font-size: 0.85rem;
  color: #ef4444;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.quest-box p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #e2e8f0;
}

.controls-hint {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.85rem;
  color: #cbd5e1;
  background: rgba(10, 5, 8, 0.5);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 25px;
}

.controls-hint b {
  color: #fca5a5;
}

.click-start {
  font-size: 0.95rem;
  color: #ef4444;
  letter-spacing: 2px;
  animation: pulse 1.8s infinite;
  text-transform: uppercase;
  font-weight: bold;
}

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

/* Interface HUD */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.stats-container {
  position: absolute;
  top: 25px;
  left: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 260px;
}

.bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fca5a5;
}

.bar {
  width: 100%;
  height: 12px;
  background: rgba(10, 5, 8, 0.85);
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.bar.health #health-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #991b1b, #ef4444);
  transition: width 0.2s ease;
}

.bar.stamina #stamina-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #d97706, #fbbf24);
  transition: width 0.1s linear;
}

.quest-tracker {
  position: absolute;
  top: 25px;
  right: 25px;
  background: rgba(15, 5, 8, 0.75);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 12px 20px;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  text-align: right;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.quest-title {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.quest-counter {
  font-size: 1.1rem;
  font-weight: bold;
  color: #f87171;
  letter-spacing: 1px;
}

.crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background-color: rgba(239, 68, 68, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(239, 68, 68, 1);
}

#notification {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 5, 8, 0.85);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1.1rem;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}