html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}
body {
  min-height: 100vh;
  min-width: 100vw;
  font-family: "Segoe UI", "Arial", sans-serif;
  background: linear-gradient(120deg, #23243a 0%, #2b5876 50%, #4e4376 100%)
    fixed;
  background-size: cover;
  color: #e3e3e3;
  overflow-x: hidden;
}
.top-right-controls {
  position: fixed;
  top: 18px;
  right: 32px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.top-controls {
  position: fixed;
  top: 18px;
  left: 32px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.7em;
}
#reset-btn {
  font-size: 1em;
  padding: 0.4em 1.1em;
  background: linear-gradient(90deg, #ff5f6d 0%, #ffc371 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px #ffb3b3aa;
  z-index: 11;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
#reset-btn:hover {
  background: linear-gradient(90deg, #ffc371 0%, #ff5f6d 100%);
  color: #23243a;
  box-shadow: 0 4px 16px #ffb3b3cc;
}
#back-btn {
  font-size: 1em;
  padding: 0.4em 1.1em;
  background: rgba(255, 255, 255, 0.12);
  color: #e3e3e3;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
#back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
#download-btn {
  font-size: 1em;
  padding: 0.4em 1.1em;
  background: linear-gradient(90deg, #43cea2 0%, #00eaff 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px #43cea2aa;
  z-index: 11;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
#download-btn:hover {
  background: linear-gradient(90deg, #00eaff 0%, #43cea2 100%);
  color: #23243a;
  box-shadow: 0 4px 16px #43cea2cc;
}
#timer {
  font-size: 1.3em;
  color: #00eaff;
  font-weight: bold;
  background: rgba(30, 34, 54, 0.85);
  padding: 0.4em 1em;
  border-radius: 8px;
  box-shadow: 0 2px 8px #00eaff55;
  z-index: 10;
  letter-spacing: 1px;
}
h1,
h2,
h3 {
  text-align: center;
  color: #00eaff;
  font-family: "Montserrat", "Arial Black", sans-serif;
  text-shadow: 0 2px 16px #000a, 0 0 2px #00eaff;
}
h1 {
  margin-top: 80px;
}
@media (max-width: 700px) {
  h1 {
    margin-top: 110px;
  }
}
.creators {
  margin-top: -10px;
  font-size: 1rem;
  opacity: 0.85;
  font-family: "Segoe UI", sans-serif;
  color: #b2eaff;
}
.container {
  max-width: 850px;
  margin: 40px auto 0 auto;
  background: rgba(34, 38, 54, 0.85);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 #000a, 0 1.5px 8px #00eaff33;
  padding: 2.5em 2.5em 2.5em 2.5em;
  backdrop-filter: blur(8px);
}
.progress-bar {
  width: 100%;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  margin-bottom: 1.5em;
  height: 80px; /* Increased height */
  position: relative;
  box-shadow: 0 2px 8px #00eaff33;
  border: 1px solid #00eaff;
  overflow: hidden;
}
.progress-fill {
  background: linear-gradient(90deg, #00eaff 0%, #43cea2 100%);
  height: 100%;
  width: 0%;
  border-radius: 8px 0 0 8px;
  transition: width 0.4s cubic-bezier(0.4, 2, 0.6, 1);
}
.progress-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: bold;
  font-size: 3em; /* Slightly larger text */
  letter-spacing: 1px;
  text-shadow: 0 1px 8px #23243a;
}
.clue {
  background: rgba(0, 234, 255, 0.08);
  padding: 1.2em 1em 1.2em 1em;
  margin: 1.2em 0;
  border-radius: 12px;
  border-left: 6px solid #00eaff;
  box-shadow: 0 0 10px #00eaff33;
  transition: all 0.3s cubic-bezier(0.4, 2, 0.6, 1);
}
.clue.correct {
  border-left: 6px solid #43cea2;
  box-shadow: 0 0 15px #43cea2aa;
  background: rgba(67, 206, 162, 0.13);
}
.clue.incorrect {
  border-left: 6px solid #ff5f6d;
  animation: shake 0.5s;
  background: rgba(255, 95, 109, 0.13);
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}
input[type="text"] {
  padding: 0.8em;
  width: 70%;
  margin-right: 0.5em;
  background: rgba(255, 255, 255, 0.13);
  border: 1.5px solid #00eaff;
  color: #00eaff;
  font-family: "Segoe UI", sans-serif;
  font-size: 1.8em; /* Increased font size */
  border-radius: 4px;
  outline: none;
  transition: border 0.2s, background 0.2s;
  height: 3.2em; /* Match button height */
  box-sizing: border-box;
}
input[type="text"]:focus {
  border: 1.5px solid #43cea2;
  background: rgba(67, 206, 162, 0.08);
}
button {
  padding: 0.8em 1.2em;
  background: linear-gradient(90deg, #00eaff 0%, #43cea2 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.8em; /* Match input font size */
  font-weight: bold;
  cursor: pointer;
  margin-left: 0.5em;
  box-shadow: 0 2px 8px #00eaff55;
  transition: background 0.2s, color 0.2s;
  height: 3.2em; /* Explicit height to match input */
  box-sizing: border-box;
}
button:hover {
  background: linear-gradient(90deg, #43cea2 0%, #00eaff 100%);
  color: #23243a;
}
.feedback {
  display: block;
  min-height: 1.2em;
  font-size: 0.98em;
  margin-top: 0.2em;
}
.feedback.correct {
  color: #43cea2;
  font-weight: bold;
}
.feedback.incorrect {
  color: #ff5f6d;
  font-weight: bold;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 20, 0.92); /* much darker overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden {
  display: none;
}
.modal-content {
  position: relative;
  background: #181a22; /* dark modal background */
  color: #fff;
  border-radius: 20px;
  padding: 32px 32px 24px 32px;
  width: min(90vw, 600px);
  max-width: 98vw;
  max-height: 90vh;
  min-height: unset;
  box-shadow: 0 8px 48px #000a;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  transform: none; /* remove scaling */
}
@media (max-width: 900px) {
  .modal-content {
    width: 98vw;
    max-width: 98vw;
    padding: 12px 2vw;
  }
}
.modal-content h2 {
  font-size: 2.8em;
  margin-bottom: 18px;
}
.modal-content img {
  max-width: 90vw;
  width: 600px;
  min-width: 320px;
  margin: 32px auto 24px auto;
  border-radius: 12px;
  box-shadow: 0 2px 16px #0004;
  display: block;
}
@media (max-width: 700px) {
  .modal-content img {
    width: 98vw;
    max-width: 98vw;
    min-width: 0;
  }
}
.modal-content p#completion-time {
  font-size: 3em;
  margin-top: 10px;
  text-align: center;
}
.close-modal-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.5em;
  background: none;
  border: none;
  cursor: pointer;
}

.completion-image {
  display: block;
  max-width: 220px;
  width: 100%;
  margin: 16px auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0002;
}
