* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #0f2027, #1a3a2a, #0f2027);
  color: #f0f0f0;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.game {
  width: min(760px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

h1 {
  margin: 0 0 4px;
  font-size: clamp(16px, 3vw, 26px);
  letter-spacing: 0.5px;
  color: #a8e6b8;
}

.hint {
  margin: 0 0 4px;
  color: #9dbfaa;
  font-size: clamp(12px, 2vw, 15px);
}

.image-wrap {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin: 6px 0;
  background: #000;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

#celebrityImage {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

.mosaic-canvas {
  position: absolute;
  pointer-events: none;
  image-rendering: pixelated;
}

.points-bar-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.points-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #1a5c35, #4ade80);
  transition: width 0.15s linear;
}

.points-bar-label {
  position: relative;
  z-index: 1;
  padding: 0 12px;
  font-weight: bold;
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.option {
  border: 1.5px solid #888;
  border-radius: 12px;
  background: #5a5a5a;
  color: #e8f5ec;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  font-size: clamp(13px, 2vw, 16px);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.option-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: #555;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

.option-label {
  flex: 1;
}

.option:hover:not(:disabled) {
  border-color: #888;
  background: #383838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,255,255, 0.07);
}

.option:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.option.wrong {
  border-color: #ff6b6b;
  background: #4d1f1f;
}

.option.wrong .option-badge {
  background: #c0392b;
}

.option.correct {
  border-color: #4ade80;
  background: #1a4d2b;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.option.correct .option-badge {
  background: #27ae60;
}

.status {
  min-height: 1.2em;
  font-size: clamp(13px, 2vw, 18px);
  margin-top: 4px;
}

.game-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0;
  gap: 8px;
}

.score {
  margin: 0;
  font-size: clamp(13px, 2vw, 18px);
  font-weight: bold;
  color: #a8e6b8;
}

.question-counter {
  font-size: clamp(13px, 2vw, 18px);
  font-weight: bold;
  color: #7abf90;
}

.restart {
  margin-top: 4px;
  border: 1.5px solid #2d6b45;
  border-radius: 12px;
  padding: 8px 20px;
  font-size: clamp(13px, 2vw, 15px);
  font-family: inherit;
  cursor: pointer;
  background: linear-gradient(135deg, #1a3d2b, #1f4d33);
  color: #e8f5ec;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.restart:hover {
  border-color: #5fc880;
  background: linear-gradient(135deg, #254f38, #2e6644);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  body {
    padding: 6px;
  }

  h1 {
    margin-bottom: 2px;
    font-size: 22px;
  }

  .hint {
    display: none;
  }

  .game-bar {
    margin: 2px 0;
  }

  .score,
  .question-counter {
    font-size: 18px;
  }

  .image-wrap {
    margin: 4px 0;
  }

  .option {
    font-size: 20px;
    padding: 10px 14px;
  }

  .status {
    font-size: 17px;
  }

  .restart {
    font-size: 17px;
    padding: 10px 18px;
  }

  .options {
    grid-template-columns: 1fr;
  }
}
