*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #0a0a12;
  --bg-card: #14141f;
  --accent-red: #e63946;
  --accent-purple: #7b2cbf;
  --accent-blue: #4cc9f0;
  --accent-gold: #ffd60a;
  --text-primary: #f1f1f1;
  --text-muted: #9a9ab0;
  --correct: #2dc653;
  --wrong: #e63946;
  --timer: #4cc9f0;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(123, 44, 191, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(230, 57, 70, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(76, 201, 240, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  padding: 1.5rem;
}

.screen {
  display: none;
  animation: fadeIn 0.4s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tela inicial */
.logo {
  text-align: center;
  margin-bottom: 1rem;
}

.logo-jp {
  display: block;
  font-size: 2.5rem;
  color: var(--accent-red);
  letter-spacing: 0.3em;
  text-shadow: 0 0 30px rgba(230, 57, 70, 0.5);
}

.logo h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.rules {
  list-style: none;
  background: var(--bg-card);
  border: 1px solid rgba(123, 44, 191, 0.3);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.rules li {
  padding: 0.5rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.rules li strong {
  color: var(--text-primary);
}

.btn {
  display: block;
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-purple));
  color: white;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(230, 57, 70, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Quiz */
.quiz-header {
  margin-bottom: 1.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timer-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--timer), var(--accent-blue));
  border-radius: 3px;
  transition: width 0.1s linear;
}

.timer-fill.warning {
  background: linear-gradient(90deg, var(--accent-gold), #ff9f1c);
}

.timer-fill.danger {
  background: linear-gradient(90deg, var(--accent-red), #ff6b6b);
}

.timer-text {
  display: block;
  text-align: right;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  color: var(--timer);
  margin-top: 0.35rem;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid rgba(76, 201, 240, 0.2);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
}

.question-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.25rem;
}

.emoji-display {
  font-size: 4rem;
  line-height: 1.3;
  margin-bottom: 2rem;
  min-height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-btn {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--accent-purple);
  background: rgba(123, 44, 191, 0.15);
  transform: scale(1.02);
}

.option-btn:disabled {
  cursor: default;
}

.option-btn.correct {
  border-color: var(--correct);
  background: rgba(45, 198, 83, 0.2);
}

.option-btn.wrong {
  border-color: var(--wrong);
  background: rgba(230, 57, 70, 0.2);
}

.option-btn.reveal-correct {
  border-color: var(--correct);
  background: rgba(45, 198, 83, 0.15);
}

/* Resultado */
.result-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 214, 10, 0.3);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
}

.result-jp {
  font-size: 2rem;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 0.5rem;
}

.result-card h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.score-circle {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.final-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 5rem;
  color: var(--accent-gold);
  line-height: 1;
  text-shadow: 0 0 40px rgba(255, 214, 10, 0.4);
}

.score-total {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.result-message {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.result-details {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  max-height: 200px;
  overflow-y: auto;
  text-align: left;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-item:last-child {
  border-bottom: none;
}

.result-item .emoji-small {
  font-size: 1.2rem;
}

.result-item.hit {
  color: var(--correct);
}

.result-item.miss {
  color: var(--wrong);
}

@media (max-width: 480px) {
  .emoji-display {
    font-size: 3rem;
  }

  .logo-jp {
    font-size: 2rem;
  }

  .final-score {
    font-size: 4rem;
  }
}
