/* Estilo consistente con el resto de juegos */
:root {
  --bg1: #e0f7fa;
  --bg2: #b2ebf2;
  --text: #004F66;
  --white: #ffffff;

  --teal: #5EC0CF;
  --teal-hover: #4AA8B6;
  --orange: #ff7043;
  --orange-hover: #ff5722;
  --ok: #37c36a;
  --err: #e76666;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Gotham Rounded', 'Nunito Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:linear-gradient(135deg,#fff 0%,#e0e0e0 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: var(--text);
}

.header {
  text-align: center;
  margin-bottom: 18px;
  width: 100%;
  max-width: 900px;
}

.title {
  color: #9A8BC2;
  font-size: 2.2rem;
  font-weight: 900;
  text-shadow: 1px 1px 0 rgba(0,0,0,.05);
  margin-bottom: 12px;
}

.stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: nowrap;
  margin-bottom: 14px;
}

.stat {
  background: var(--white);
  padding: 12px 18px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  min-width: 130px;
  text-align: center;
}

.stat-label { font-weight: 800; font-size: .95rem; margin-bottom: 4px; }
.stat-value { font-weight: 900; font-size: 1.4rem; color: var(--teal); }

.game-container{
  background: rgba(255,255,255,.2);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.10);
  padding: 22px;
  width: 100%;
  max-width: 760px;
  margin-bottom: 18px;
}

.question {
  font-size: 1.6rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 14px;
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 520px;
  margin: 0 auto 8px;
}

.answer-btn {
  background: #fff;
  color: var(--text);
  border: 2px solid rgba(94,192,207,.45);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}
.answer-btn:hover { transform: translateY(-2px); background:#f4feff; border-color: var(--teal); }
.answer-btn.correct{ background: var(--ok); border-color: var(--ok); color:#fff; }
.answer-btn.incorrect{ background: var(--err); border-color: var(--err); color:#fff; }
.answer-btn:disabled{ opacity:.85; cursor:not-allowed; }

.feedback{
  min-height: 24px;
  text-align: center;
  font-weight: 900;
  margin: 6px 0 2px;
}
.feedback.ok{ color:#188a4e; }
.feedback.err{ color:#a53e3e; }

.bottom-buttons{
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.reset-btn{
  background: var(--orange);
  color:#fff;
  border:none;
  padding:12px 22px;
  border-radius:22px;
  font-weight:900;
  cursor:pointer;
  font-size:1rem;
  transition:transform .15s ease, background .15s ease, box-shadow .15s ease;
  box-shadow:0 4px 14px rgba(255,112,67,.3);
  min-height:42px;
  text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center;
}
.reset-btn:hover{ background:var(--orange-hover); transform:translateY(-2px); }

/* Modal resultados */
.results-modal{
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.7);
  display: none;
  justify-content: center; align-items: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}
.results-modal.show{ display: flex; animation: modalFadeIn .3s ease-out; }
@keyframes modalFadeIn { 0%{ opacity:0; transform: scale(.95);} 100%{opacity:1; transform: scale(1);} }

.modal-content{
  background: #fff;
  padding: 24px;
  border-radius: 18px;
  max-width: 90%; width: 520px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.modal-content h3{ font-size: 1.6rem; margin-bottom: 10px; font-weight: 900; color: var(--text); }
.result-stats{ color: #333; font-weight: 800; margin-bottom: 12px; }
.wrong-list{ color: #333; max-height: 45vh;;max-height: 45dvh; overflow: auto; padding-right: 6px; }
.wrong-item{ background: #fff; border-left: 4px solid var(--err); padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.wrong-item .phrase{ font-weight: 900; margin-bottom: 4px; }
.wrong-item .explanation{ opacity: .9; }

.modal-buttons{ display:flex; gap:12px; justify-content:center; margin-top: 14px; flex-wrap: wrap; }
.modal-btn{ padding: 10px 20px; border: none; border-radius: 20px; cursor: pointer; font-weight: 900; font-size: 1rem; min-height: 42px; }
.modal-btn.primary{ background: var(--teal); color:#fff; box-shadow: 0 4px 15px rgba(94, 192, 207, 0.3); }
.modal-btn.primary:hover{ background: var(--teal-hover); transform: translateY(-2px); }
.modal-btn.secondary{ background: var(--orange); color:#fff; box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3); }
.modal-btn.secondary:hover{ background: var(--orange-hover); transform: translateY(-2px); }

footer{ position: fixed; bottom: 16px; right: 16px; font-weight: 700; font-size: .9rem; opacity: .85; z-index: 10; }
footer p{ margin:0; padding:8px 12px; background: rgba(255,255,255,.35); border-radius: 14px; backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0,0,0,.1); }

@media (max-width: 768px){
  body{ padding: 15px; }
  .title{ font-size: 2rem; }
  .stat{ min-width: 120px; padding: 10px 16px; }
  .question{ font-size: 1.4rem; }
}
@media (max-width: 480px){
  .title{ font-size: 1.8rem; }
  .answers{ grid-template-columns: 1fr; }
  .reset-btn{ padding: 10px 18px; font-size: .95rem; border-radius: 18px; }
  footer{ bottom: 10px; right: 10px; font-size: .78rem; }
  footer p{ padding: 6px 10px; border-radius: 12px; }
}
@media (max-width: 360px){
  .title{ font-size: 1.6rem; }
  .question{ font-size: 1.25rem; }
}

/* ---------- Responsive: PANTALLA GRANDE (≈52 pulgadas, 4K) ---------- */
@media (min-width: 3800px) {
  html { font-size: 2.1rem; }

  .header { max-width: 4200px; margin-bottom: 72px; }
  .title { font-size: 4.2rem; margin-bottom: 40px; }

  .stats { gap: 80px; margin-bottom: 56px; }
  .stat { min-width: 320px; padding: 40px 56px; border-radius: 32px; }
  .stat-label { font-size: 1.8rem; margin-bottom: 14px; }
  .stat-value { font-size: 3.2rem; }

  .game-container { padding: 72px; max-width: 2200px; border-radius: 38px; }

  .question { font-size: 3.2rem; margin-bottom: 50px;}

  .answers { gap: 40px; max-width: 1600px; grid-template-columns: repeat(2, minmax(360px, 1fr)); }
  .answer-btn {
    padding: 32px 52px;
    font-size: 2.2rem;
    border-radius: 32px;
    min-height: 120px;
    font-weight: 900;
  }

  .feedback { font-size: 2rem; margin-top: 36px; min-height: 72px; }

  .bottom-buttons { gap: 44px; margin-top: 60px; }
  .reset-btn {
    padding: 30px 64px;
    font-size: 2.1rem;
    min-height: 110px;
    border-radius: 34px;
    font-weight: 900;
  }

  /* Modal resultados – grande para TV */
  .results-modal .modal-content {
    width: 2800px;
    padding: 150px;
    border-radius: 32px;
  }
  .results-modal h3 { font-size: 3rem; margin-bottom: 28px; }
  .result-stats { font-size: 2rem; margin-bottom: 36px; }
  .wrong-list { font-size: 1.6rem; max-height: 50vh;max-height: 50dvh; }
  .modal-buttons { gap: 28px; }
  .modal-btn {
    padding: 22px 36px;
    font-size: 1.7rem;
    min-width: 240px;
    min-height: 100px;
    border-radius: 32px;
  }

  footer { bottom: 48px; right: 48px; font-size: 1.6rem; }
  footer p { padding: 20px 150px; border-radius: 24px; }
}

/* ---------- Responsive: Pantalla vertical MUY grande (4K vertical) ---------- */
@media (max-width: 2160px) and (min-height: 3800px) {

  html {
    font-size: 1.8rem;
  }

  html,
  body {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    padding: 0;
    margin: 0;
  }

  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2vh 2vw;
    min-height: 100dvh;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    gap: 2vh;
  }

  .header {
    width: 100%;
    max-width: 1800px;
    margin: 0;
    text-align: center;
    flex-shrink: 0;
  }

  .title {
    font-size: clamp(4rem, 6vw, 8rem);
    line-height: 1.1;
    margin: 0 0 2vh 0;
    color: #9A8BC2;
    font-weight: 900;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
  }

  .stats {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 4vw;
    width: 100%;
    max-width: 1400px;
    margin: 2vh auto;
    flex-wrap: nowrap;
  }

  .stat {
    flex: 1;
    min-width: 0;
    padding: 3vh 2vw;
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stat-label {
    font-size: clamp(1.8rem, 3vw, 3.5rem);
    margin-bottom: 1vh;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
  }

  .stat-value {
    font-size: clamp(2.5rem, 4vw, 5rem);
    font-weight: 900;
    color: var(--teal);
    text-align: center;
  }

  .game-container {
    width: 100%;
    max-width: 1600px;
    margin: 0;
    padding: 4vh 4vw;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-height: 0;
  }

  .question {
    font-size: clamp(3rem, 5vw, 6.5rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 4vh;
    color: var(--text);
    line-height: 1.2;
    padding: 0 2vw;
  }

  .answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(24px, 3vw, 40px);
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 3vh;
  }

  .answer-btn {
    background: #fff;
    color: var(--text);
    border: 3px solid rgba(94, 192, 207, 0.3);
    border-radius: 28px;
    padding: 3vh 2vw;
    font-size: clamp(2.8rem, 4.5vw, 5.5rem);
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-height: clamp(120px, 12vh, 180px);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .answer-btn:hover {
    transform: translateY(-4px);
    background: #f4feff;
    border-color: var(--teal);
    box-shadow: 0 6px 20px rgba(94, 192, 207, 0.2);
  }

  .answer-btn.correct {
    background: var(--ok);
    border-color: var(--ok);
    color: #fff;
    transform: scale(1.05);
  }

  .answer-btn.incorrect {
    background: var(--err);
    border-color: var(--err);
    color: #fff;
  }

  .answer-btn:disabled {
    opacity: 0.85;
    cursor: not-allowed;
  }

  .feedback {
    font-size: clamp(2.5rem, 4vw, 5rem);
    min-height: 5vh;
    text-align: center;
    font-weight: 900;
    margin: 3vh 0 2vh 0;
  }

  .feedback.ok {
    color: var(--ok);
  }

  .feedback.err {
    color: var(--err);
  }

  .bottom-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
    padding-bottom: 200px;
    width: 100%;
    max-width: 1200px;
    flex-shrink: 0;
    padding-bottom: 200px;
  }

  .reset-btn {
    z-index: 1;
    padding: 0 0 0 0;
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 1.0vh 0;
    border-radius: 28px;
    font-weight: 900;
    cursor: pointer;
    font-size: clamp(2rem, 3.5vw, 4rem);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 112, 67, 0.3);
    min-height: clamp(70px, 6vh, 100px);
    width: 100%;
    z-index: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .reset-btn:hover {
    background: var(--orange-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(255, 112, 67, 0.4);
  }

  /* Modal resultados adaptado para pantalla vertical grande */
  .results-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
    padding: 4vh 4vw;
  }

  .results-modal.show {
    display: flex;
    animation: modalFadeIn 0.4s ease-out;
  }

  @keyframes modalFadeIn {
    0% {
      opacity: 0;
      transform: scale(0.95);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }

  .modal-content {
    background: #fff;
    padding: 4vh 4vw;
    border-radius: 32px;
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .modal-content h3 {
    font-size: clamp(3rem, 5vw, 6rem);
    margin-bottom: 3vh;
    font-weight: 900;
    color: var(--text);
    text-align: center;
  }

  .result-stats {
    font-size: clamp(2.2rem, 3.5vw, 4.5rem);
    color: #333;
    font-weight: 800;
    margin-bottom: 3vh;
    text-align: center;
  }

  .wrong-list {
    color: #333;
    max-height: 40vh;
    max-height: 40dvh;
    overflow: auto;
    padding-right: 2vw;
    flex: 1;
  }

  .wrong-item {
    background: #fff;
    border-left: 6px solid var(--err);
    padding: 2vh 2vw;
    border-radius: 16px;
    margin-bottom: 2vh;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .wrong-item .phrase {
    font-weight: 900;
    margin-bottom: 1vh;
    font-size: clamp(1.8rem, 2.8vw, 3.5rem);
  }

  .wrong-item .explanation {
    opacity: 0.9;
    font-size: clamp(1.6rem, 2.5vw, 3rem);
    line-height: 1.4;
  }

  .modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 2.5vh;
    justify-content: center;
    margin-top: 3vh;
    flex-shrink: 0;
  }

  .modal-btn {
    padding: 2.5vh 0;
    border: none;
    border-radius: 28px;
    cursor: pointer;
    font-weight: 900;
    font-size: clamp(2rem, 3.5vw, 4rem);
    min-height: clamp(80px, 8vh, 120px);
    width: 100%;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .modal-btn.primary {
    background: var(--teal);
    color: #fff;
    box-shadow: 0 4px 20px rgba(94, 192, 207, 0.3);
  }

  .modal-btn.primary:hover {
    background: var(--teal-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(94, 192, 207, 0.4);
  }

  .modal-btn.secondary {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 112, 67, 0.3);
  }

  .modal-btn.secondary:hover {
    background: var(--orange-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(255, 112, 67, 0.4);
  }

  footer {
    position: fixed;
    right: 4vw;
    bottom: 3vh;
    z-index: 10;
    width: auto;
    text-align: center;
    font-size: clamp(1.8rem, 2.5vw, 3rem);
    margin-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }

  footer p {
    border-radius: 28px;
    line-height: 1;
    font-size: clamp(2rem, 2.8vw, 3.5rem);
    min-width: 0;
    min-height: 0;
    width: auto;
    height: auto;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
  }

  .watermark-logo{ height: clamp(28px, 4.2vh, 4.2vh); }
}



/* ====== Watermark de fondo ====== */
:root {
  --wm-size: 1100px;       /* tamaño de la marca */
  --wm-rotate: -22deg;     /* inclinación */
  --wm-opacity: 0.14;      /* transparencia */
}

body {
  position: relative; /* necesario para el pseudo-elemento */
}

body::before {
  content: "";
  position: fixed; /* fijo en pantalla */
  top: 12vh;
  left: calc(-0.25 * var(--wm-size)); /* lo empuja hacia la izquierda */
  width: var(--wm-size);
  height: var(--wm-size);
  background: url("../statics/img/flor.png") no-repeat center / contain;
  opacity: var(--wm-opacity);
  transform: rotate(var(--wm-rotate));
  pointer-events: none; /* no bloquea clicks */
  z-index: 0; /* al fondo */
}

.container,
footer {
  position: relative;
  z-index: 1; /* el contenido queda por encima */
}

/* Responsivo */
@media (max-width: 1024px) {
  :root { --wm-size: 780px; }
  body::before {
    top: 18vh;
    left: calc(-0.35 * var(--wm-size));
  }
}

@media (max-width: 600px) {
  :root { --wm-size: 560px; }
  body::before {
    top: 24vh;
    left: calc(-0.40 * var(--wm-size));
  }
}
