body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url('mudra.jpg') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: white;
}

/* Centered boxes */
#loginBox, #loadingBox {
  background: rgba(0, 51, 102, 0.8);
  padding: 2.5em;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 480px;
  display: none;
}

#experimentBox {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
}

.experimentCard {
  background: rgba(0, 51, 102, 0.8);
  padding: 3em 4em;
  border-radius: 28px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  max-width: 600px;
  width: 90%;
}

.experimentCard h1,
h1 {
  font-size: 2.2em;
  margin-bottom: 2em;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.experimentButtons {
  display: flex;
  gap: 2em;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5em;
  position: relative;
}

.experiment {
  font-size: 1.6em;
  padding: 1em 2em;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
  width: 265px;
  min-width: 120px;
  position: relative;
}

.experiment.active {
  background-color: #4CAF50;
  color: white;
}

.experiment.active:hover {
  background-color: #45a049;
}

.experiment.inactive {
  background-color: #888;
  color: #ccc;
  cursor: default;
}

.experiment.inactive::after {
  content: "Done";
  position: absolute;
  top: 6px;
  right: -20px;
  background: #ff4d4d;
  color: white;
  font-size: 0.7em;
  font-weight: bold;
  padding: 2px 6px;
  transform: rotate(45deg);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 1;
}

.experiment.comingsoon {
  background-color: #d37fea;
  color: white;
  cursor: default;
  pointer-events: none;
}

.experiment.comingsoon::after {
  content: "Coming soon!";
  position: absolute;
  top: 6px;
  right: -34px;
  background: #49b407;
  color: white;
  font-size: 0.7em;
  font-weight: bold;
  padding: 2px 6px;
  transform: rotate(35deg);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
  z-index: 0;
}

#phoneInput {
  font-size: 1.5em;
  padding: 0.6em 0.8em;
  width: 100%;
  max-width: 350px;
  border-radius: 12px;
  border: none;
  text-align: center;
  box-sizing: border-box;
  margin-bottom: 1em;
}

#submitBtn {
  padding: 0.7em 2em;
  font-size: 1.2em;
  border: none;
  border-radius: 12px;
  background-color: #2196F3;
  color: white;
  cursor: pointer;
}

#submitBtn:hover {
  background-color: #1976D2;
}

#error {
  margin-top: 1em;
  color: #ff9999;
}

#loadingBox p {
  font-size: 1.6em;
  font-weight: bold;
}

/* ✅ Video container and video style */
#loadingVideoContainer {
  display: block;
  margin-top: 20px;
  text-align: center;
  width: 100%;
}

#loadingVideo {
  width: 70vw;
  max-width: 500px;
  min-width: 280px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  object-fit: cover;
}

/* Explanations below experiment buttons */
.explanation {
  white-space: pre-line;
  font-size: 1.1em;
  color: #fff8f0;
  line-height: 1.4em;
  margin-top: 1.5em;
  text-align: left;
}

.explanation p {
  margin: 0.4em 0;
}

.explanation strong {
  color: white;
}

.flash-message {
  margin-top: 0.8em;
  font-size: 1em;
  font-weight: bold;
  color: #ff5555;
  animation: flash 1s ease-in-out 3;
}

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

@media (max-width: 480px) {
  body {
    font-size: 0.95em;
  }

  #loginBox,
  #loadingBox,
  .experimentCard {
    padding: 2em;
    margin: 0 16px;
    box-sizing: border-box;
  }

  .experiment {
    font-size: 1.4em;
    padding: 0.8em 1.5em;
    border-radius: 12px;
  }

  .experimentButtons {
    gap: 1.2em;
  }

  .experimentCard h1 {
    font-size: 2em;
    margin-bottom: 1.5em;
  }
}
