body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  color: white;
  background: url('Sans titre.jpeg') no-repeat center center fixed;
  background-size: cover;
}

.overlay {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 9.26vh 0; /* ≈ 50px */
}

.container {
  background-color: #1e1e1e;
  padding: 5.56vh; /* ≈ 30px */
  border-radius: 2.22vh; /* ≈ 12px */
  max-width:100vh;
  width: 90%;
  box-shadow: 0 0 3.7vh rgba(0,0,0,0.8); /* ≈ 20px */
}

input, select, button {
  padding: 1.85vh; /* ≈ 10px */
  margin-top: 1.85vh;
  font-size: 2.96vh; /* ≈ 16px */
  width: 100%;
  border: none;
  border-radius: 0.93vh; /* ≈ 5px */
}

input, select {
  background-color: #2c2c2c;
  color: #ffffff;
}

button {
  background-color: #3b82f6;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background-color: #2563eb;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 3.7vh; /* ≈ 20px */
  background: #2a2a2a;
  border-radius: 1.48vh; /* ≈ 8px */
  overflow: hidden;
}

th, td {
  border: 0.19vh solid #444; /* ≈ 1px */
  padding: 1.85vh;
  text-align: center;
}

th {
  background-color: #333;
}

a {
  display: inline-block;
  margin-top: 3.7vh;
  color: #3b82f6;
  text-decoration: none;
  text-align: center;
  width: 100%;
}

a:hover {
  text-decoration: underline;
}

#result img {
  margin-top: 3.7vh;
  border-radius: 2.22vh;
  max-width: 100%;
}

.timer {
  margin-top: 2.78vh; /* ≈ 15px */
  font-size: 2.59vh; /* ≈ 14px */
  color: #ccc;
}

.qrcode {
  width: 18vh; /* ≈ 250px */
  height: 18vh;
  z-index: 1000;
}

.qrcode-container {
  position: fixed;
  bottom: 3.7vh;
  right: 3.7vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qrcode-text {
  margin-bottom: 1.48vh;
  font-size: 2.59vh;
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 1.11vh 1.85vh;
  border-radius: 1.48vh;
  text-align: center;
  max-width: 40.74vh;
}

.fixed-character {
  position: fixed;
  bottom: -1vh;
  left: 0vh;
  width: 47vh; /* ≈ 500px */
  height: auto;
  z-index: 999;
  pointer-events: none;
  animation: fadeIn 1s ease-in-out;
}

.speech-bubble {
  position: fixed;
  bottom: 52vh;
  left: 1vh;
  background: rgba(255, 255, 255, 0.75);
  color: #000;
  padding: 2.78vh 2.22vh;
  border-radius: 9.26vh;
  border: 0.37vh solid #333;
  font-size: 2.59vh;
  font-weight: bold;
  max-width: 22vh;
  z-index: 1000;
  box-shadow: 0 0.74vh 1.85vh rgba(0,0,0,0.3);
  animation: bubbleFade 1s ease-in-out;
  text-align: center;
  overflow: visible;
}

.speech-bubble::before {
  width: 1.48vh;
  height: 1.48vh;
  bottom: -3.7vh;
  right: 4.63vh;
}

.speech-bubble::after {
  width: 1.11vh;
  height: 1.11vh;
  bottom: -5.56vh;
  right: 2.78vh;
}

.speech-bubble span.dot {
  width: 0.74vh;
  height: 0.74vh;
  bottom: -7.04vh;
  right: 1.3vh;
}

.fixed-bottom-right {
  position: fixed;
  bottom: 3.7vh;
  right: 3.7vh;
  width: 83.3vh; /* ≈ 450px */
  height: auto;
  z-index: 999;
  pointer-events: none;
  animation: fadeIn 1s ease-in-out;
}

.new-character {
  position: fixed;
  left: 3.7vh;
  top: 70%;
  transform: translateY(-50%);
  width: 92.59vh;
  height: auto;
  z-index: 999;
  pointer-events: none;
  animation: fadeIn 1s ease-in-out;
}

.speech-bubble-under {
  position: fixed;
  left: 9.26vh;
  top: 60vh;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  color: #000;
  padding: 2.22vh 2.96vh;
  border-radius: 3.7vh;
  border: 0.37vh solid #333;
  font-size: 2.59vh;
  font-weight: bold;
  max-width: 37.03vh;
  z-index: 1000;
  box-shadow: 0 0.74vh 1.85vh rgba(0,0,0,0.3);
  text-align: center;
  animation: bubbleDrop 0.8s ease-out forwards;
  opacity: 0;
}

.speech-bubble-under::after {
  content: none;
}