/* Movie Emoji Quiz - Responsive Mobile-First Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #333;
}

.quiz-container {
  background: white;
  border-radius: 20px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Header: Score & Round Counter */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.quiz-round {
  font-size: 14px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quiz-score {
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
}

/* Emoji Display - Story Arc Timeline */
.emoji-display {
  text-align: center;
  margin: 30px 0;
  font-size: 32px;
  line-height: 1.4;
  letter-spacing: 4px;
  word-break: break-word;
  word-spacing: 2px;
  white-space: normal;
  animation: pulse-in 0.5s ease-out;
  padding: 0 10px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes pulse-in {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hint Button - Above Options */
.hint-section {
  text-align: center;
  margin-bottom: 24px;
}

.hint-button {
  background: #f0f0f0;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hint-button:hover:not(:disabled) {
  background: #e0e0e0;
  color: #333;
}

.hint-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hint-text {
  font-size: 14px;
  color: #667eea;
  font-weight: 600;
  margin-top: 8px;
  display: none;
}

.hint-text.show {
  display: block;
}

/* Multiple Choice Buttons */
.choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-button {
  background: white;
  border: 2px solid #e0e0e0;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.choice-button:hover:not(:disabled) {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateX(4px);
}

.choice-button:active:not(:disabled) {
  transform: scale(0.98);
}

.choice-button:disabled {
  cursor: not-allowed;
}

/* Feedback Styles */
.choice-button.correct {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.choice-button.incorrect {
  background: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.choice-button.correct::before {
  content: '✓ ';
  font-weight: 700;
  margin-right: 8px;
  color: #28a745;
}

.choice-button.incorrect::before {
  content: '✗ ';
  font-weight: 700;
  margin-right: 8px;
  color: #dc3545;
}

/* Feedback Message */
.feedback {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  display: none;
}

.feedback.show {
  display: block;
  animation: slide-up 0.4s ease;
}

.feedback.correct {
  color: #28a745;
}

.feedback.incorrect {
  color: #dc3545;
}

@keyframes slide-up {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Correct Answer Display (on wrong guess) */
.correct-answer {
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: #666;
  display: none;
}

.correct-answer.show {
  display: block;
}

/* Loading State */
.quiz-loading {
  text-align: center;
  font-size: 16px;
  color: #666;
  padding: 40px 20px;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Tablet & Desktop */
@media (min-width: 768px) {
  .quiz-container {
    padding: 40px;
    max-width: 600px;
  }

  .emoji-display {
    font-size: 100px;
    letter-spacing: 16px;
  }

  .choice-button {
    font-size: 16px;
    min-height: 52px;
    padding: 16px 20px;
  }

  .quiz-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
  }
}

/* Accessibility */
.choice-button:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.hint-button:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
