/* Reset & Box Model Fix */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Load local font */
@font-face {
  font-family: 'Colossalis';
  src: url('colossalis.otf') format('opentype');
}

/* Base */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: 'Colossalis', sans-serif;

  background: linear-gradient(
    to right,
    #002868 0%,
    #002868 42%,
    #b22234 42%,
    #b22234 58%,
    #002868 58%,
    #002868 100%
  );

  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Layout wrapper */
.content {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Main card */
.challenge-container {
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 15px;

  width: 100%;
  max-width: 500px;
  max-height: 95vh;

  padding: clamp(25px, 5vw, 45px);

  display: flex;
  flex-direction: column;
  gap: 15px;

  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* Header */
.title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  width: 100%;
  padding: 0 10px; /* balances left/right visually */
}

/* NEW: text wrapper */
.title-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

/* Image */
.ega-img {
  width: clamp(70px, 12vw, 100px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

/* Title */
.title {
  font-size: clamp(2rem, 5vw, 4rem);
  margin: 0;
  line-height: 1.1;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  color: black;
}

/* Subtitle */
.subtitle {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  margin: 0;
  color: #333;
}

/* Image */
.challenge-img {
  width: 100%;
  max-height: 30vh;
  object-fit: contain;
  border-radius: 10px;
}

/* Question */
.challenge-question {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: #333;
  margin: 0;
  text-align: center;
}

/* Guess block */
.guess-block {
  background-color: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 15px;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Input row */
.guess-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: 100%;
  align-items: center;
}

/* Input */
.guess-input {
  flex: 1;
  font-size: 1rem;
  padding: 10px;

  border-radius: 5px;
  border: 1px solid #ddd;
  outline: none;
}

/* Button */
.guess-btn {
  font-size: 1rem;
  padding: 10px 20px;

  background-color: #002868;
  color: white;

  border: none;
  border-radius: 5px;
  cursor: pointer;

  white-space: nowrap;
  transition: background 0.3s ease;
}

.guess-btn:hover {
  background-color: #b22234;
}

/* Counter */
.guess-counter {
  font-size: 0.85rem;
  color: #444;
}

/* History */
.guess-history {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.9rem;
  color: #333;
}

.guess-entry {
  padding: 4px 6px;
  background: rgba(255,255,255,0.5);
  border-radius: 4px;
}

/* Status */
.guess-status {
  font-size: 0.9rem;
  color: #555;
}

/* Locked button */
.guess-btn.locked {
  background-color: gray;
  cursor: not-allowed;
}

/* Footer */
.disclaimer {
  font-size: 0.75rem;
  text-align: center;
  color: #111;
  margin-top: auto;
}

/* Confetti */
.confetti {
  position: fixed;
  top: -10px;
  width: 8px;
  height: 8px;
  opacity: 0.9;
  z-index: 9999;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}
