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

:root {
  --bg: #FAFAF8;
  --text: #1A1A1A;
  --text-secondary: #6B6B6B;
  --accent: #2D6A4F;
  --accent-light: #D8F3DC;
  --error: #C1121F;
  --border: #E0E0E0;
  --serif: 'Libre Baskerville', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

/* Header */

.header {
  max-width: 640px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  text-align: center;
}

.meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.header h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Main */

.main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* Quiz: Welcome */

.welcome {
  text-align: center;
  padding: 2rem 0;
}

.welcome p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.btn {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #245A42;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

/* Quiz: Round */

.progress-bar {
  height: 2px;
  background: var(--border);
  margin-bottom: 1.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.round-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.question {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 1.25rem;
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.image-option {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
  aspect-ratio: 1;
  background: #F0F0EE;
}

.image-option:hover {
  border-color: var(--text-secondary);
}

.image-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-option .label {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.image-option.selected {
  border-color: var(--accent);
  border-width: 2px;
}

.image-option.correct {
  border-color: var(--accent);
  border-width: 2px;
}

.image-option.wrong {
  border-color: var(--error);
  border-width: 2px;
}

.image-option.locked {
  pointer-events: none;
}

.image-option .badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.image-option.correct .badge,
.image-option.wrong .badge {
  display: block;
}

.badge.real {
  background: var(--accent-light);
  color: var(--accent);
}

.badge.fake {
  background: #FDDDE1;
  color: var(--error);
}

.hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Tip */

.tip {
  background: var(--accent-light);
  border-radius: 6px;
  padding: 1.25rem;
  margin-top: 1.25rem;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.tip-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.tip h3 {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.tip p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Results */

.results {
  text-align: center;
  padding: 2.5rem 0;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.results-score {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.results-score span {
  color: var(--text-secondary);
  font-size: 1.25rem;
}

.results-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Verdict label */

.verdict {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.verdict.correct {
  color: var(--accent);
}

.verdict.wrong {
  color: var(--error);
}

/* Footer */

.footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
}

.footer-heading {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.footer p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}

.footer a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Animation */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */

@media (max-width: 480px) {
  .header {
    padding: 2.5rem 1.25rem 1.5rem;
  }

  .main {
    padding: 0 1.25rem 2rem;
  }

  .image-grid {
    gap: 0.5rem;
  }

  .footer {
    padding: 1.5rem 1.25rem 2rem;
  }
}
