@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
  font-family: 'Press Start 2P', monospace;
  background: linear-gradient(135deg, #0b0f2f, #1a0b3d, #0a1b3f);
  color: #caa6ff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding-top: 60px;
}

/* Outer container */
.game-container {
  width: 460px;
  background: rgba(20, 10, 50, 0.85);
  border: 3px solid #7c4dff;
  box-shadow: 0 0 20px #7c4dff, 0 0 40px #00e5ff44;
  padding: 24px;
}

/* ── Pet section ── */
.pet-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(124, 77, 255, 0.3);
}

.pet-sprite {
  width: 68px;
  height: 68px;
  background: #0b0f2f;
  border: 2px solid #00e5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.pet-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pet-name {
  font-size: 10px;
  color: #00e5ff;
  text-shadow: 0 0 8px #00e5ff;
}

.hp-bar-bg {
  height: 10px;
  background: #0b0f2f;
  border: 1px solid #00e5ff;
  width: 100%;
}

.hp-bar-fill {
  height: 100%;
  width: 75%;
  background: #00e5ff;
  transition: width 0.5s ease;
}

.hp-label {
  font-size: 9px;
  color: rgba(0, 229, 255, 0.55);
}

/* ── Progress row ── */
.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.q-counter {
  font-size: 9px;
  color: rgba(202, 166, 255, 0.45);
}

.score-display {
  font-size: 9px;
  color: #caa6ff;
  text-shadow: 0 0 6px #7c4dff;
}

/* ── Type badge ── */
.type-badge {
  display: inline-block;
  font-size: 7px;
  padding: 5px 10px;
  margin-bottom: 14px;
  border: 1px solid;
}

.type-badge.mc   { background: rgba(0, 100, 255, 0.12); border-color: #4488ff; color: #4488ff; }
.type-badge.tf   { background: rgba(0, 229, 255, 0.10); border-color: #00e5ff; color: #00e5ff; }
.type-badge.fill { background: rgba(124, 77, 255, 0.10); border-color: #7c4dff; color: #caa6ff; }

/* ── Question box ── */
.question-box {
  background: rgba(10, 15, 50, 0.8);
  border: 2px solid #7c4dff;
  box-shadow: 0 0 10px #7c4dff44;
  padding: 16px 18px;
  margin-bottom: 18px;
  min-height: 90px;
}

.question-text {
  font-size: 9px;
  line-height: 1.9;
  color: #caa6ff;
  white-space: pre-line;
}

/* ── Result flash ── */
.result-flash {
  display: none;
  text-align: center;
  font-size: 9px;
  padding: 10px;
  margin-bottom: 14px;
  border: 1px solid;
}

.result-flash.correct { background: rgba(0, 229, 255, 0.08); border-color: #00e5ff; color: #00e5ff; }
.result-flash.wrong   { background: rgba(255, 77, 255, 0.08); border-color: #ff4dff; color: #ff4dff; }
.result-flash.show    { display: block; }

/* ── Choice buttons grid ── */
.choices-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.mc-grid { grid-template-columns: 1fr 1fr; }
.tf-grid { grid-template-columns: 1fr 1fr; }

.choice-btn {
  background: rgba(124, 77, 255, 0.1);
  border: 2px solid #7c4dff;
  padding: 14px 10px;
  color: #caa6ff;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  line-height: 1.5;
}

.choice-btn:hover {
  background: rgba(124, 77, 255, 0.25);
  border-color: #00e5ff;
  box-shadow: 0 0 10px #00e5ff55;
  color: #fff;
}

.choice-btn.selected {
  background: rgba(0, 229, 255, 0.12);
  border-color: #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 12px #00e5ff44;
}

.choice-btn.correct {
  background: rgba(0, 229, 255, 0.1);
  border-color: #00e5ff;
  color: #00e5ff;
}

.choice-btn.wrong {
  background: rgba(255, 77, 255, 0.08);
  border-color: #ff4dff;
  color: #ff4dff;
}

/* ── Fill in the blank ── */
.fill-section {
  margin-bottom: 16px;
}

.fill-label {
  font-size: 9px;
  color: rgba(202, 166, 255, 0.45);
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.fill-input {
  width: 100%;
  background: #0b0f2f;
  border: 2px solid #00e5ff;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 12px 14px;
  outline: none;
  caret-color: #00e5ff;
}

.fill-input:focus {
  border-color: #ff4dff;
  box-shadow: 0 0 10px #ff4dff;
}

.fill-input::placeholder {
  color: rgba(0, 229, 255, 0.3);
}

/* ── Submit button ── */
.submit-btn {
  width: 100%;
  background: linear-gradient(90deg, #7c4dff, #00e5ff);
  border: none;
  color: white;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 16px;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 0 15px #7c4dff;
  transition: 0.2s;
}

.submit-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px #00e5ff;
}

.hidden { display: none !important; }

/* Login page specific styles */
.container {
  background: rgba(20, 10, 50, 0.85);
  border: 3px solid #7c4dff;
  box-shadow: 0 0 20px #7c4dff, 0 0 40px #00e5ff;
  padding: 30px;
  padding-bottom: 50px;
  width: 350px;
  text-align: center;
}

input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  box-sizing: border-box;
  border: 2px solid #00e5ff;
  background: #0b0f2f;
  color: #fff;
  font-family: inherit;
  font-size: 10px;
  outline: none;
}

input:focus {
  border-color: #ff4dff;
  box-shadow: 0 0 10px #ff4dff;
}

button {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: linear-gradient(90deg, #7c4dff, #00e5ff);
  border: none;
  color: white;
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
  box-shadow: 0 0 15px #7c4dff;
  transition: 0.2s;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px #00e5ff;
}

h2 {
  color: #00e5ff;
  text-shadow: 0 0 10px #7c4dff, 0 0 20px #00e5ff;
}

hr {
  margin-top: 24px;
  border-color: #7c4dff;
}

.error-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a0b3d;
  border: 2px solid #ff4d4d;
  color: #ff4d4d;
  padding: 12px 20px;
  font-size: 10px;
  box-shadow: 0 0 15px #ff4d4d;
  z-index: 9999;
  text-align: center;
  animation: pop 0.2s ease;
}

@keyframes pop {
  from {
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

.pet-sprite {
  width: 100px;      /* or whatever size you want */
  height: 100px;
  overflow: hidden;  /* prevents overflow */
}

.pet-sprite img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* keeps full image visible */
}