* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6fb;
  color: #1f2937;
}

.site-header {
  background: #1e3a8a;
  color: white;
  padding: 2.5rem 1rem;
  text-align: center;
}

.site-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.2rem;
}

.site-header p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
}

.container {
  width: min(1100px, 92%);
  margin: 2rem auto;
}

.intro-card,
.practice-area {
  background: white;
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  margin-bottom: 1.5rem;
}

.intro-card h2,
.practice-area h2 {
  margin-top: 0;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.practice-card {
  background: white;
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.practice-card:hover {
  transform: translateY(-3px);
  border-color: #2563eb;
}

.practice-card span {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.practice-card small {
  color: #4b5563;
  line-height: 1.4;
}

.exercise-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
  margin-top: 1rem;
}

.exercise-question {
  font-weight: 700;
  margin-bottom: 1rem;
}

.option-list {
  display: grid;
  gap: 0.75rem;
}

.option-button {
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 12px;
  padding: 0.8rem;
  cursor: pointer;
  text-align: left;
}

.option-button:hover {
  border-color: #2563eb;
}

.feedback {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 12px;
  font-weight: 600;
}

.feedback.correct {
  background: #dcfce7;
  color: #166534;
}

.feedback.wrong {
  background: #fee2e2;
  color: #991b1b;
}

.solution {
  margin-top: 0.75rem;
  color: #374151;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .site-header h1 {
    font-size: 1.7rem;
  }

  .container {
    margin-top: 1rem;
  }
}

.text-answer {
  width: min(420px, 100%);
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0.8rem;
  font-size: 1rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.check-button,
.solution-button,
#clear-mistakes {
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-weight: 700;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.check-button {
  background: #2563eb;
  color: white;
}

.solution-button {
  background: #e5e7eb;
  color: #1f2937;
}

#clear-mistakes {
  background: #991b1b;
  color: white;
}

.check-button:hover,
.solution-button:hover,
#clear-mistakes:hover {
  opacity: 0.9;
}

.syllabus-card h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.syllabus-note {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  margin: 1rem 0;
}

.syllabus-note h5 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.example-list li {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.mistake-list li {
  margin-bottom: 0.4rem;
}

/* Botones más grandes y cómodos */
.menu-card,
.practice-card,
.option-button {
  min-height: 96px;
  padding: 1.35rem 1.45rem;
  font-size: 1rem;
}

.menu-card span,
.practice-card span {
  font-size: 1.2rem;
  line-height: 1.3;
}

.menu-card small,
.practice-card small {
  font-size: 0.95rem;
  line-height: 1.45;
}

.option-button {
  min-height: 58px;
  font-size: 1rem;
  line-height: 1.4;
}

.check-button,
.solution-button,
.secondary-button,
.back-button,
#clear-mistakes {
  font-size: 1rem;
  padding: 0.95rem 1.2rem;
  min-height: 48px;
}

.submenu-grid {
  gap: 1.15rem;
}

/* Menús principales y submenús */
.submenu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.menu-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 125px;
  width: 100%;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 18px;
  padding: 1.4rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.menu-card:hover {
  transform: translateY(-3px);
  border-color: #2563eb;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.menu-card span {
  display: block;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
  color: #111827;
}

.menu-card small {
  display: block;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.45;
}

.back-button,
.secondary-button {
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 1rem;
}

.back-button {
  background: #e5e7eb;
  color: #111827;
}

.secondary-button {
  background: #2563eb;
  color: white;
}

.back-button:hover,
.secondary-button:hover {
  opacity: 0.9;
}

.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.word-bank span {
  background: #e5e7eb;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-weight: 700;
  color: #111827;
}

.advanced-notes {
  margin-top: 2rem;
  border-top: 2px solid #e5e7eb;
  padding-top: 1.25rem;
}

.advanced-note {
  border-left: 5px solid #2563eb;
}

.level-tag {
  display: inline-block;
  background: #dbeafe;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-weight: 800;
  font-size: 0.85rem;
  margin: 0.25rem 0 0.75rem;
}

.frequency-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.frequency-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.frequency-table th,
.frequency-table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
}

.frequency-table th {
  background: #eff6ff;
  color: #1e3a8a;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
  margin: 1rem 0;
}

.rule-card {
  background: white;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 1rem;
}

.rule-card h6 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #1e3a8a;
}

.pattern {
  background: #f3f4f6;
  border-radius: 10px;
  padding: 0.6rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 700;
}

/* Limpieza visual del temario */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.vocab-card {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 1rem;
}

.vocab-card h5 {
  margin: 0 0 0.5rem;
  color: #1e3a8a;
  font-size: 1.05rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  background: #eef2ff;
  color: #1f2937;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  font-weight: 700;
  font-size: 0.92rem;
}

.chip-strong {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.practical-use {
  margin-bottom: 1.5rem;
}

.mistake-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
  margin: 1rem 0 1.5rem;
}

.mistake-card {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 1rem;
}

.mistake-card span {
  display: inline-block;
  font-weight: 800;
  color: #9a3412;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

.mistake-card p {
  margin: 0;
  line-height: 1.45;
}

.accordion-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.accordion-item {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  overflow: hidden;
}

.accordion-item summary {
  cursor: pointer;
  padding: 1rem;
  font-weight: 800;
  color: #1e3a8a;
  list-style-position: inside;
}

.accordion-content {
  border-top: 1px solid #e5e7eb;
  padding: 1rem;
  background: #f9fafb;
}

.accordion-content p:first-child {
  margin-top: 0;
}

.vocab-table-wrap {
  overflow-x: auto;
  margin-top: 0.9rem;
}

.vocab-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.vocab-table th,
.vocab-table td {
  border: 1px solid #e5e7eb;
  padding: 0.7rem;
  text-align: left;
  vertical-align: top;
}

.vocab-table th {
  background: #eff6ff;
  color: #1e3a8a;
}

.vocab-table td:first-child {
  font-weight: 800;
  color: #111827;
}

.irregular-actions {
  margin: 1rem 0;
}

.irregular-card {
  margin-top: 1rem;
}

.irregular-prompt {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.irregular-prompt span {
  display: block;
  color: #1e3a8a;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.irregular-prompt strong {
  font-size: 1.4rem;
}

.irregular-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.irregular-input-grid label {
  font-weight: 800;
}

.irregular-input-grid .text-answer {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
}

.irregular-table-wrap {
  overflow-x: auto;
  margin-top: 1.25rem;
}

.irregular-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 14px;
  overflow: hidden;
}

.irregular-table th,
.irregular-table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

.irregular-table th {
  background: #eff6ff;
  color: #1e3a8a;
}

.irregular-table td:nth-child(2),
.irregular-table td:nth-child(3),
.irregular-table td:nth-child(4) {
  font-weight: 800;
}

.exam-text {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  line-height: 1.8;
  margin: 1rem 0;
}

.exam-example {
  display: inline-block;
  background: #dbeafe;
  color: #1e3a8a;
  border-radius: 8px;
  padding: 0.1rem 0.35rem;
  font-weight: 800;
}

.exam-gap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.exam-gap-input {
  width: 90px;
  padding: 0.35rem 0.45rem;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-weight: 700;
}

.exam-gap-input.gap-correct {
  border-color: #16a34a;
  background: #dcfce7;
}

.exam-gap-input.gap-wrong {
  border-color: #dc2626;
  background: #fee2e2;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.2rem 0;
}

.quick-question-card {
  margin-bottom: 1rem;
}

.quick-reading-text {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  line-height: 1.7;
  margin: 1rem 0;
  font-weight: 600;
}

.quick-sheet-option.selected-option {
  outline: 3px solid #93c5fd;
}

.quick-sheet-option.answer-correct {
  border-color: #16a34a;
  background: #dcfce7;
}

.quick-sheet-option.answer-wrong {
  border-color: #dc2626;
  background: #fee2e2;
}

.quick-question-feedback {
  margin-top: 0.9rem;
}

.quick-question-solution {
  border-left: 4px solid #2563eb;
}

/* Marcado claro de respuestas */
.option-button.answer-correct,
.quick-sheet-option.answer-correct,
.exam-reading-option.answer-correct {
  border: 3px solid #15803d !important;
  background: #bbf7d0 !important;
  color: #14532d !important;
  font-weight: 900 !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18) !important;
}

.option-button.answer-wrong,
.quick-sheet-option.answer-wrong,
.exam-reading-option.answer-wrong {
  border: 3px solid #dc2626 !important;
  background: #fee2e2 !important;
  color: #7f1d1d !important;
  font-weight: 800 !important;
}

.option-button.selected-option,
.quick-sheet-option.selected-option,
.exam-reading-option.selected-option {
  outline: 3px solid #2563eb !important;
  outline-offset: 2px;
}

.option-button.answer-correct::before,
.quick-sheet-option.answer-correct::before,
.exam-reading-option.answer-correct::before {
  content: "✓ ";
  font-weight: 900;
}

.option-button.answer-wrong::before,
.quick-sheet-option.answer-wrong::before,
.exam-reading-option.answer-wrong::before {
  content: "✕ ";
  font-weight: 900;
}

.exam-true-false-block {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid #e5e7eb;
}

.exam-tf-item {
  margin-top: 1rem;
}

.exam-tf-feedback {
  margin-top: 0.8rem;
}

.exam-tf-option.selected-option {
  outline: 3px solid #93c5fd !important;
  outline-offset: 2px;
}

.exam-tf-option.answer-correct {
  border: 3px solid #15803d !important;
  background: #bbf7d0 !important;
  color: #14532d !important;
  font-weight: 900 !important;
}

.exam-tf-option.answer-wrong {
  border: 3px solid #dc2626 !important;
  background: #fee2e2 !important;
  color: #7f1d1d !important;
  font-weight: 800 !important;
}

/* Wordle de vocabulario */
.wordle-section {
  margin-top: 2rem;
}

.wordle-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.wordle-random-note {
  margin: 0;
  color: var(--muted-text, #64748b);
  font-size: 0.95rem;
}

#wordle-new-word {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.wordle-board {
  display: grid;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem auto;
}

.wordle-row {
  display: grid;
  grid-template-columns: repeat(5, 3rem);
  gap: 0.5rem;
}

.wordle-cell {
  width: 3rem;
  height: 3rem;
  border: 2px solid #cbd5e1;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #ffffff;
}

.wordle-cell.is-filled {
  border-color: #64748b;
}

.wordle-cell.is-correct {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.wordle-cell.is-present {
  background: #ca8a04;
  border-color: #ca8a04;
  color: #ffffff;
}

.wordle-cell.is-absent {
  background: #64748b;
  border-color: #64748b;
  color: #ffffff;
}

.wordle-message {
  text-align: center;
  font-weight: 700;
  margin: 1rem 0 0;
}

.wordle-result {
  margin: 1rem auto 0;
  max-width: 34rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.wordle-result strong {
  text-transform: uppercase;
}

@media (max-width: 520px) {
  .wordle-row {
    grid-template-columns: repeat(5, 2.45rem);
    gap: 0.35rem;
  }

  .wordle-cell {
    width: 2.45rem;
    height: 2.45rem;
    font-size: 1.15rem;
    border-radius: 0.45rem;
  }
}


/* Ajustes Wordle: tablero grande y letras descartadas */
.wordle-play-area {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 220px;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

.wordle-main {
  min-width: 0;
}

.wordle-board {
  margin-top: 0.5rem;
}

.wordle-row {
  grid-template-columns: repeat(5, 3.9rem);
}

.wordle-cell {
  width: 3.9rem;
  height: 3.9rem;
  font-size: 1.9rem;
}

.wordle-discarded {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem;
  background: #f8fafc;
}

.wordle-discarded h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.wordle-discarded-note {
  margin: 0 0 1rem;
  color: var(--muted-text, #64748b);
  font-size: 0.9rem;
}

.wordle-discarded-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.wordle-discarded-list li {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 0.5rem;
  background: #64748b;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
}

@media (max-width: 760px) {
  .wordle-play-area {
    grid-template-columns: 1fr;
  }

  .wordle-discarded {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .wordle-row {
    grid-template-columns: repeat(5, 2.7rem);
  }

  .wordle-cell {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1.25rem;
  }
}


/* Shoot de vocabulario */
.vocabulary-shoot-card {
  padding: 2rem;
}

.vocabulary-shoot-mode {
  margin: 0;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0.8;
}

.vocabulary-shoot-question {
  margin: 1.5rem 0 2rem;
  text-align: center;
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
}

.vocabulary-shoot-options {
  display: grid;
  gap: 1rem;
}

.vocabulary-shoot-option {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: clamp(1.35rem, 4vw, 2.3rem);
  font-weight: 700;
}

.vocabulary-shoot-feedback {
  min-height: 2rem;
  margin-top: 1.25rem;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
}

.vocabulary-shoot-example {
  min-height: 2rem;
  margin-top: 1rem;
  text-align: center;
  font-size: 1.15rem;
}

.shoot-next-button {
  display: block;
  margin: 1.5rem auto 0;
  font-size: 1.2rem;
}


.vocabulary-shoot-solution {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
}

.vocabulary-shoot-solution:empty {
  display: none;
}

.vocabulary-shoot-solution-title {
  margin: 0 0 0.5rem;
  font-weight: 800;
  text-align: center;
}

.vocabulary-shoot-solution-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 1.15rem;
  line-height: 1.6;
}


/* Colores claros para respuestas del Shoot de vocabulario */
.vocabulary-shoot-option.correct {
  background: #1f8f4d;
  color: #ffffff;
  border-color: #1f8f4d;
}

.vocabulary-shoot-option.incorrect {
  background: #b3261e;
  color: #ffffff;
  border-color: #b3261e;
}

.vocabulary-shoot-option:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.site-footer {
  margin: 3rem auto 1.5rem;
  padding: 1.5rem;
  max-width: 960px;
  text-align: center;
  color: #5f6b7a;
  font-size: 0.95rem;
  border-top: 1px solid rgba(95, 107, 122, 0.25);
}

.site-footer p {
  margin: 0.35rem 0;
}

.site-footer a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

