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

:root {
  --bg: #f4f1ea;
  --ink: #1a1a1a;
  --accent: #c8102e;
  --muted: #6b6b6b;
  --card: #ffffff;
  --border: #e5e0d5;
  --green: #2e7d32;
  --red: #c62828;
  --gold: #b8860b;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  padding: 20px 12px 40px;
  font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

h1 {
  font-family: "Inter", sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -2.5px;
  margin-bottom: 4px;
}

h1 .accent { color: var(--accent); }

.subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
}

.puzzle-info {
  text-align: center;
  margin-bottom: 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.puzzle-info strong { color: var(--ink); }

.intro {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  margin-bottom: 22px;
  font-size: 0.95rem;
}

.intro b { color: var(--accent); }

.frases-list { display: flex; flex-direction: column; gap: 14px; }

.frase {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  transition: border-color 0.2s;
}

.frase.answered { opacity: 0.95; }
.frase.correct { border-color: var(--green); border-width: 2px; }
.frase.wrong   { border-color: var(--red);   border-width: 2px; }

.frase-num {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.frase-texto {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 14px;
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: -0.2px;
}

.frase-texto::before { content: "« "; color: var(--muted); }
.frase-texto::after  { content: " »"; color: var(--muted); }

.botones { display: flex; gap: 10px; }

.btn {
  flex: 1;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}

.btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }

.btn.selected-rajoy {
  background: var(--ink); color: var(--bg);
}
.btn.selected-no {
  background: #888; color: white; border-color: #888;
}

.frase-result {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 0.88rem;
}

.frase-result.is-real { color: var(--green); }
.frase-result.is-fake { color: var(--red); }

.frase-result .label { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.frase-result .fuente { color: var(--muted); font-style: italic; margin-top: 4px; display: block; }

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
.icon-lg { width: 1.15em; height: 1.15em; }

.result-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.result-icon svg { width: 14px; height: 14px; color: white; }
.result-icon.ok { background: var(--green); }
.result-icon.ko { background: var(--red); }

.acciones {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { background: #a00d24; }

.resultado {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 22px;
  margin-top: 22px;
  text-align: center;
}

.resultado.hidden { display: none; }

.score-num {
  font-family: "Inter", sans-serif;
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: -2px;
  color: var(--accent);
  line-height: 1;
}

.score-max {
  font-size: 1.4rem;
  color: var(--muted);
  font-weight: 500;
}

.score-label {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  margin: 10px 0 14px;
  font-style: italic;
  color: var(--ink);
}

.cuadritos {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 14px 0;
}

.cuadrito {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}
.cuadrito.ok { background: var(--green); }
.cuadrito.ko { background: var(--red); }

.share-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.share-btn {
  border: 2px solid var(--ink);
  background: transparent;
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.share-btn:hover { background: var(--ink); color: var(--bg); }
.share-btn svg { width: 16px; height: 16px; }

.copied-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.copied-toast.show { opacity: 1; }

footer {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.rules-toggle {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  font-size: 0.85rem;
}

.rules {
  display: none;
  margin-top: 10px;
  font-size: 0.85rem;
  text-align: left;
  background: var(--card);
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.rules.show { display: block; }

.rules ul { margin-left: 18px; margin-top: 6px; }

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  .frase-texto { font-size: 1.05rem; }
  .btn { font-size: 0.9rem; padding: 9px 8px; }
}
