* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: radial-gradient(circle at top, #2b1a4d 0%, #120a24 60%, #0a0614 100%);
  color: #f2eefc;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 60px;
}

.top-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.coin-badge, .streak-badge, .best-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  position: relative;
}

.coin-icon, .streak-icon, .best-icon {
  font-size: 16px;
}

.streak-label, .best-label {
  color: rgba(242, 238, 252, 0.6);
  font-weight: 500;
  font-size: 12px;
}

.coin-gain {
  position: absolute;
  top: -18px;
  right: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #6dffb0;
  opacity: 0;
  pointer-events: none;
}

.coin-gain.show {
  animation: floatUp 0.9s ease-out forwards;
}

@keyframes floatUp {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-24px); }
}

.stage {
  max-width: 560px;
  width: 100%;
  text-align: center;
  margin-top: 40px;
}

h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.hint {
  color: rgba(242, 238, 252, 0.65);
  font-size: 14px;
  margin: 0 0 28px;
}

.game-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.round-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.round-icon {
  font-size: 22px;
}

.round-name {
  font-weight: 700;
  font-size: 18px;
}

.round-payout {
  font-size: 12px;
  color: #ffd76d;
  background: rgba(255, 215, 109, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
  margin-left: 6px;
}

.round-question {
  color: rgba(242, 238, 252, 0.8);
  margin: 0 0 20px;
  font-size: 15px;
}

.visual-stage {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  perspective: 400px;
}

.visual-object {
  font-size: 64px;
  transition: transform 0.15s ease;
}

.visual-object.spinning {
  animation: spinObject 0.9s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes spinObject {
  0% { transform: rotateY(0deg) scale(1); }
  60% { transform: rotateY(1080deg) scale(1.15); }
  100% { transform: rotateY(1440deg) scale(1); }
}

.result-message {
  min-height: 26px;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 18px;
}

.result-message.correct {
  color: #6dffb0;
}

.result-message.wrong {
  color: #ff7d7d;
}

.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.option-button {
  flex: 1 1 120px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f2eefc;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.option-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.option-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.option-button.chosen-correct {
  background: rgba(109, 255, 176, 0.25);
  border-color: #6dffb0;
  opacity: 1;
}

.option-button.chosen-wrong {
  background: rgba(255, 125, 125, 0.25);
  border-color: #ff7d7d;
  opacity: 1;
}

.option-button.reveal-correct {
  border-color: #6dffb0;
  opacity: 1;
}

.history-panel {
  margin-top: 28px;
  text-align: left;
}

.history-title {
  font-size: 13px;
  color: rgba(242, 238, 252, 0.55);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
}

.reset-button {
  margin-top: 32px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(242, 238, 252, 0.6);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}

.reset-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f2eefc;
}
