/* ELABORADO POR: ElMugiwar */

:root {
  --bg-leaf: #6ab75d;
  --ink-soft: #fff7ea;
  --wood-dark: #7a3e07;
  --wood-mid: #9b5a1a;
  --gold-soft: #f2c04d;
  --gold-deep: #d98a14;
  --shadow-deep: 0 18px 40px rgba(29, 18, 8, 0.28);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Nunito", "Trebuchet MS", sans-serif;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 246, 196, 0.35), transparent 30%),
    radial-gradient(circle at top right, rgba(129, 199, 132, 0.32), transparent 26%),
    linear-gradient(180deg, #9fd170 0%, var(--bg-leaf) 55%, #4f8f3d 100%);
  color: var(--ink-soft);
  overflow: hidden;
}

/* ===== FOOTER — solo texto, solo en home ===== */
.site-footer {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 30;
  color: #fff7ea;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  white-space: nowrap;
}

button {
  transition: transform 0.18s ease, background-color 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

button:hover:not(:disabled),
button:focus-visible:not(:disabled) {
  transform: scale(1.05);
  filter: brightness(1.08);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
}

.pantalla {
  width: 100vw;
  height: 100vh;
  display: flex;
  background-size: cover;
  background-position: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.pantalla::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.2), transparent 18%),
    radial-gradient(circle at 80% 12%, rgba(255, 237, 163, 0.12), transparent 16%),
    linear-gradient(180deg, rgba(10, 16, 8, 0.05), rgba(10, 16, 8, 0.18));
  pointer-events: none;
  z-index: 0;
}

.pantalla--inicio  { background-image: url("assets/fondo1.png"); }
.pantalla--info    { background-image: url("assets/fondo2.png"); }
.pantalla--level   { background-image: url("assets/fondo3.png"); }
.pantalla--gameover{ background-image: url("assets/fondo_Rip.png"); }

.oculta { display: none !important; }

/* ===== PANTALLA 1 ===== */
.hero-panel {
  position: absolute;
  top: 32px;
  left: 36px;
  z-index: 2;
  width: min(38vw, 460px);
  padding: 26px 28px;
  border: 2px solid rgba(255, 245, 220, 0.35);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(86, 58, 34, 0.72), rgba(63, 41, 23, 0.48));
  box-shadow: var(--shadow-deep);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease;
}

.hero-eyebrow {
  margin-bottom: 8px;
  color: #ffe8a4;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-title {
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.88;
  color: #fff8de;
  text-shadow: 0 6px 18px rgba(18, 12, 5, 0.4);
}

.hero-subtitle {
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(255, 248, 222, 0.9);
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 243, 205, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff8de;
  font-size: 14px;
  font-weight: 700;
}

.hero-tip {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: #dff5cb;
  font-size: 15px;
  font-weight: 700;
  min-height: 38px;
  transition: opacity 0.18s ease;
}

.contenedor-planta {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 550px;
  height: 550px;
  z-index: 1;
  transition: transform 0.25s ease;
}
.contenedor-planta img {
  position: absolute;
  left: 50%;
}
.imagen-maceta {
  bottom: 0;
  width: 510px;
  transform: translateX(-50%);
}
.imagen-planta {
  bottom: 30%;
  width: 80%;
  transform-origin: 50% 100%;
  animation: plant-sway 3s ease-in-out infinite;
}

.imagen-planta.planta-mediana {
  width: 43%;
  bottom: 36%;
}

.imagen-planta.planta-grande {
  width: 43%;
  bottom: 36%;
}

@keyframes plant-sway {
  0%   { transform: translateX(-50%) rotate(-2deg); }
  50%  { transform: translateX(-50%) rotate(2deg);  }
  100% { transform: translateX(-50%) rotate(-2deg); }
}

.contenedor-pantalla1 {
  position: absolute;
  right: 36px;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  z-index: 2;
  width: min(30vw, 280px);
}

/* ===== BOTONES BASE ===== */
.boton {
  padding: 12px 30px;
  border-radius: 20px;
  border: 3px solid var(--wood-mid);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  text-shadow: 1px 1px 0 var(--wood-mid);
  box-shadow: 0 10px 18px rgba(91, 52, 14, 0.25);
}
.boton--pequeno {
  font-size: 16px;
  padding: 8px 26px;
}

/* ===== PANTALLA 2 ===== */
.boton-name-plant {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.boton-name-plant:hover:not(:disabled),
.boton-name-plant:focus-visible:not(:disabled) {
  transform: translateX(-50%) scale(1.05);
}

/* ===== PANTALLA 3: FORM NOMBRE ===== */
.name-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70vw;
  max-width: 500px;
  padding: 30px 40px;
  background: linear-gradient(180deg, rgba(43, 32, 21, 0.7), rgba(26, 19, 11, 0.5));
  border: 1px solid rgba(255, 240, 206, 0.24);
  border-radius: 25px;
  box-shadow: var(--shadow-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 4;
  pointer-events: auto;
}
.name-panel > * { position: relative; z-index: 1; }
.name-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 25px;
  z-index: 0;
}
.name-panel .boton { position: relative; z-index: 2; }
.name-panel .name-input { position: relative; z-index: 2; }
#pantallaName1 .contenedor-planta,
#pantallaName2 .contenedor-planta {
  pointer-events: none;
}
#pantallaName2 .contenedor-planta {
  z-index: 1;
}
#pantallaName2 .imagen-planta {
  width: 48%;
  bottom: 32%;
}
#pantallaName2 .imagen-maceta {
  width: 360px;
}
.name-kicker {
  color: #ffe7aa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.name-label {
  align-self: flex-start;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}
.name-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid #fff;
  color: #fff;
  padding: 8px 4px;
  font-size: 18px;
  outline: none;
}
.name-input::placeholder { color: rgba(255,255,255,0.7); }
.name-next-button { margin-top: 10px; }

/* ===== PANTALLA 4 y 4B: PLANT INFO ===== */
.contenedor-cartel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  max-width: 700px;
  pointer-events: auto;
  filter: drop-shadow(0 20px 26px rgba(34, 18, 6, 0.25));
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.contenedor-cartel:hover {
  transform: translate(-50%, -50%) scale(1.01);
  filter: drop-shadow(0 24px 30px rgba(34, 18, 6, 0.3));
}
.cartel-img { display: block; width: 100%; height: auto; }
.cartel-texto {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 72%;
  text-align: center;
  color: #b3681e;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-height: 70%;
  overflow: hidden;
  padding: 0 4%;
}
.cartel-titulo-principal {
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  line-height: 1.25;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
}
.cartel-subtitulo {
  font-size: 15px;
  font-weight: 700;
  margin: 2px 0 12px 0;
  line-height: 1.3;
  opacity: 0.95;
}
.cartel-parrafo {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  overflow-y: auto;
  max-height: 50%;
  padding: 0 2%;
  text-shadow: 0 1px 2px rgba(255,255,255,0.2);
}

/* Botón NEXT (flujo normal) */
.boton-next {
  position: absolute;
  right: 40px;
  bottom: 30px;
}

/* Botón ✕ CLOSE (desde nivel o fin de info) */
.boton-info-close {
  position: absolute;
  right: 40px;
  bottom: 30px;
  background: linear-gradient(180deg, #e05a2b, #c0392b);
  border-color: #7b241c;
}
.boton-info-close:hover { background: linear-gradient(180deg, #e74c3c, #c0392b); }

/* ===== PANTALLA 5: PRIVACITY ===== */
.privacy-header {
  position: absolute;
  top: 10%; left: 50%;
  transform: translateX(-50%);
  color: #b3681e;
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  font-weight: 800;
  font-size: 30px;
}
.privacy-text {
  color: #b3681e;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}
.privacy-strong { font-weight: bold; }
.privacy-cartel-text {
  position: absolute;
  top: 22%; left: 50%;
  transform: translateX(-50%);
  width: 70%;
}
.boton-back { position: absolute; left: 40px; bottom: 30px; }
.boton-delete-data {
  position: absolute;
  right: 40px; bottom: 30px;
  background: #c0392b;
  border-color: #7b241c;
}
.boton-delete-data:hover { background: #e74c3c; }

/* ===== PANTALLA 6: HOW TO PLAY ===== */
#pantallaHowToPlay .contenedor-cartel { width: min(82vw, 480px); max-width: 480px; }
#pantallaHowToPlay .howto-header {
  position: absolute; top: 10%; left: 50%;
  transform: translateX(-50%);
  color: #b3681e; font-weight: 700; font-size: 18px; text-align: center;
}
#pantallaHowToPlay .howto-cartel-text {
  position: absolute; top: 26%; left: 50%;
  transform: translateX(-50%);
  width: 82%; text-align: center;
}
#pantallaHowToPlay .howto-line {
  color: #b3681e; font-size: 14px; font-weight: 700;
  line-height: 1.5; display: block; margin-bottom: 4px;
}
#pantallaHowToPlay .boton-home-howto {
  position: absolute; right: 22px; bottom: 20px;
  min-width: 84px; padding: 7px 16px; border-radius: 14px; z-index: 5;
}

/* ===== PANTALLA 7: LEVEL ===== */
.hud-left {
  position: absolute;
  top: 25px; left: 120px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.level-badge,
.player-name-badge {
  min-width: 84px;
  padding: 5px 13px;
  border-radius: 13px;
  border: 2px solid #7a3e07;
  background: linear-gradient(#d18930, #ae5f10);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  text-align: center;
  text-shadow: 1px 1px 0 #7b3f08;
  line-height: 1;
}
.player-name-badge { min-width: 118px; text-align: left; padding-left: 12px; }

.hud-clickable {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.hud-clickable:hover {
  transform: scale(1.07);
  filter: brightness(1.12);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.hud-clickable:active { transform: scale(0.96); }

/* ===== BOTÓN (?) INFO DE PLANTA ===== */
.btn-plant-info {
  position: absolute;
  top: 25px;
  left: 272px;
  z-index: 4;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #7a3e07;
  background: linear-gradient(180deg, #d18930, #ae5f10);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  text-shadow: 1px 1px 0 #7b3f08;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.btn-plant-info:hover {
  transform: scale(1.1);
  filter: brightness(1.15);
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}

.btn-menu {
  position: absolute; top: 0; left: 0;
  border: none; background: transparent; padding: 0;
  cursor: pointer; z-index: 5;
}
.btn-menu img { width: 120px; height: 120px; display: block; }

.btn-toggle-actions {
  position: absolute; top: 10px; right: 10px;
  border: none; background: transparent; padding: 0;
  cursor: pointer; z-index: 4;
}
.btn-toggle-actions img { width: 150px; height: 130px; display: block; }

.action-bar {
  position: absolute; top: 0; right: 0;
  width: 130px; height: 100%;
  background: url("assets/barra_tierra.png") center / cover no-repeat;
  padding: 110px 18px 20px;
  display: flex; flex-direction: column; gap: 16px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 3;
}
.action-bar.is-open { transform: translateX(0); }
.action-bar-slot {
  height: 98px; border: none; background: transparent; padding: 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.action-bar-slot img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.action-bar-slot:hover img {
  transform: scale(1.12);
  filter: brightness(1.15) drop-shadow(0 0 6px rgba(255,255,180,0.7));
}

/* ===== PANTALLA 8: MENU ===== */
.menu-panel {
  position: absolute; top: 22%; left: 50%;
  transform: translateX(-50%);
  width: min(86vw, 420px);
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(58, 35, 15, 0.6), rgba(95, 56, 22, 0.38));
  border: 1px solid rgba(255, 236, 195, 0.22);
  box-shadow: var(--shadow-deep);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(8px);
}
.menu-row {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
}
.menu-label { min-width: 128px; padding: 6px 16px; font-size: 28px; }
.menu-toggle-group { display: flex; gap: 8px; }
.menu-toggle {
  width: 54px; height: 46px; border-radius: 10px;
  border: 3px solid #7a3e07; background: #c77715;
  color: #fff; font-weight: 700; font-size: 16px;
  cursor: pointer; text-shadow: 1px 1px 0 #7a3e07;
}
.menu-toggle.is-active { background: #e7bb4e; }
.menu-main-btn { min-width: 230px; font-size: 30px; padding: 8px 20px; }
.menu-pot {
  position: absolute; left: 50%; bottom: 74px;
  transform: translateX(-50%); z-index: 2;
}
.menu-pot img { width: 270px; display: block; }

.btn-menu-close {
  position: absolute;
  right: 20px; bottom: 72px;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 3px solid #7a3e07;
  background: #f2a623;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  cursor: pointer;
  text-shadow: 1px 1px 0 #9b5a1a;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 5;
}
.btn-menu-close:hover {
  background: #e8421a;
  border-color: #7b1c0a;
}

/* ===== PANTALLA 9: ABOUT ===== */
.about-header { top: 10%; }
.about-cartel-text { top: 20%; width: 62%; }
.about-text { font-size: 15px; line-height: 1.45; overflow-wrap: break-word; }

/* ===== PANTALLA 10: MINIGAME ===== */
.btn-open-minigame {
  position: absolute; left: 14px; bottom: 18px;
  border: none; background: transparent; padding: 0; z-index: 4; cursor: pointer;
}
.btn-open-minigame img { width: 155px; height: 120px; display: block; }

.mini-layout {
  width: 100%; height: 100%;
  display: grid; grid-template-columns: 320px 1fr;
  gap: 24px; padding: 26px 28px 110px;
}
.mini-layout.oculta,
.mini-hub.oculta,
.mini-rain-wrap.oculta,
.mini-board-wrap.oculta,
.mini-score.oculta,
.mini-picker.oculta,
.mini-action.oculta,
.mini-bottom-btn.oculta {
  display: none !important;
}
.mini-hub {
  width: 100%;
  height: 100%;
  padding: 36px 32px 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}
.mini-hub-header {
  max-width: 560px;
  padding: 24px 26px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(70, 43, 18, 0.72), rgba(103, 60, 21, 0.45));
  border: 1px solid rgba(255, 236, 195, 0.25);
  box-shadow: var(--shadow-deep);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(8px);
}
.mini-hub-kicker {
  color: #ffe4a0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.mini-hub-title {
  margin-top: 4px;
  color: #fff5d7;
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.95;
}
.mini-hub-subtitle {
  margin-top: 12px;
  color: rgba(255, 244, 220, 0.92);
  font-size: 19px;
  line-height: 1.5;
}
.mini-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}
.mini-hub-card {
  min-height: 240px;
  padding: 24px 20px;
  border-radius: 28px;
  border: 2px solid rgba(255, 241, 207, 0.24);
  background: linear-gradient(180deg, rgba(251, 213, 99, 0.96), rgba(230, 149, 23, 0.94));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  text-align: left;
  box-shadow: 0 18px 26px rgba(72, 41, 11, 0.22);
}
.mini-hub-card--placeholder {
  background: linear-gradient(180deg, rgba(120, 90, 55, 0.76), rgba(88, 60, 32, 0.72));
  opacity: 0.78;
}
.mini-hub-icon { font-size: 42px; line-height: 1; }
.mini-hub-card-title { font-size: 28px; font-weight: 900; line-height: 1.05; text-shadow: 1px 2px 0 rgba(99, 61, 15, 0.35); }
.mini-hub-card-text { font-size: 16px; font-weight: 700; line-height: 1.5; color: rgba(255, 249, 236, 0.94); }

.mini-side {
  background: linear-gradient(180deg, rgba(68,36,16,0.72), rgba(100,54,20,0.45));
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 22px; padding: 13px;
  color: #fff; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-deep);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(6px);
}
.mini-title { color: #fff; font-size: 44px; line-height: 1; text-shadow: 2px 2px 0 #432617; }
.mini-score { display: flex; flex-direction: column; gap: 8px; }
.mini-score-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 22px; }
.mini-score-left { display: flex; align-items: center; gap: 8px; }
.mini-score-icon { width: 48px; height: 48px; object-fit: contain; }
.mini-score-name { font-size: 20px; color: #fff; text-shadow: 1px 1px 0 #3d220f; }
.mini-picker { display: flex; gap: 16px; }
.mini-difficulty { display: flex; gap: 8px; }
.mini-difficulty .mini-pick-btn { font-size: 14px; padding: 8px 10px; }
.mini-pick-btn {
  flex: 1; border: 3px solid #7a3e07; border-radius: 12px;
  background: #c77715; color: #fff; font-weight: 700; padding: 8px 10px; cursor: pointer;
}
.mini-pick-btn.is-active { background: #e7bb4e; }
.mini-action { width: 100%; font-size: 24px; }
.mini-side .mini-action + .mini-action { margin-top: 8px; }
.mini-board-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 26px 28px 22px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(91, 57, 24, 0.18), rgba(255, 241, 204, 0.08));
  box-shadow: 0 20px 36px rgba(58, 33, 12, 0.16);
}
.mini-board-wrap::before {
  content: "";
  position: absolute;
  inset: 16px 20px;
  border-radius: 28px;
  border: 2px solid rgba(255, 236, 191, 0.18);
  pointer-events: none;
}
.mini-turn {
  color: #fff7dc;
  font-size: 54px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-shadow: 0 4px 0 #6d3d17, 0 10px 18px rgba(48, 25, 7, 0.24);
}
.mini-board {
  width: min(72vmin, 760px); aspect-ratio: 1/1;
  display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr);
  gap: 12px; padding: 18px; border-radius: 28px;
  border: 4px solid rgba(113, 64, 25, 0.95);
  background:
    radial-gradient(circle at top, rgba(255, 220, 160, 0.2), transparent 30%),
    linear-gradient(180deg, #9a653d, #7d4b29 56%, #6d3d20 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 235, 195, 0.28),
    inset 0 -8px 18px rgba(67, 34, 11, 0.26),
    0 18px 28px rgba(0,0,0,0.28);
}
.mini-cell {
  position: relative; overflow: hidden;
  border: 3px solid #704224; border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 226, 178, 0.12), transparent 26%),
    linear-gradient(180deg, #bb855a, #a26f47 56%, #8a5e3a 100%);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 8px;
  box-shadow: inset 0 2px 0 rgba(255, 240, 208, 0.22), inset 0 -8px 12px rgba(91, 52, 18, 0.18);
}
.mini-cell::before {
  content: ""; position: absolute; inset: 10px 12px auto; height: 26%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  pointer-events: none;
}
.mini-cell.is-plant { color: #8aff73; }
.mini-cell.is-bee   { color: #ffe680; }
.mini-cell:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: inset 0 2px 0 rgba(255, 240, 208, 0.22), inset 0 -8px 12px rgba(91, 52, 18, 0.18), 0 14px 18px rgba(78, 41, 14, 0.22);
}
.mini-cell.placed   { animation: mini-pop 0.2s ease; }
.mini-cell.win { box-shadow: 0 0 0 4px rgba(255,240,148,0.7) inset; animation: mini-pulse 0.8s ease infinite; }
.mini-token-image { width: 80%; height: 80%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(58, 33, 12, 0.18)); }

.mini-rain-wrap { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.mini-close-to-level { top: 18px; right: 18px; bottom: auto; z-index: 8; }
.mini-rain-hud { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.mini-rain-pill {
  padding: 10px 18px; border-radius: 999px;
  border: 2px solid rgba(122, 62, 7, 0.9);
  background: linear-gradient(180deg, rgba(251, 223, 120, 0.95), rgba(230, 161, 38, 0.92));
  color: #5c2d09; font-size: 18px; font-weight: 900;
  box-shadow: 0 8px 18px rgba(54, 33, 16, 0.22);
}
.mini-rain-arena {
  position: relative; width: min(72vmin, 760px); height: min(84vh, 700px); min-height: 500px;
  overflow: hidden; border-radius: 28px; border: 4px solid rgba(255, 240, 198, 0.32);
  background: linear-gradient(180deg, rgba(255, 250, 236, 0.12), rgba(112, 154, 78, 0.18)), url("assets/minifondo.jpeg") center / cover no-repeat;
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.26);
}
.mini-rain-arena::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: linear-gradient(180deg, rgba(121, 82, 42, 0), rgba(92, 70, 34, 0.16) 30%, rgba(86, 62, 30, 0.46));
}
.mini-rain-cloud {
  position: absolute; top: 24px; width: 138px; height: 56px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.6); filter: blur(1px);
  box-shadow: 38px 10px 0 8px rgba(255, 255, 255, 0.45), 74px -4px 0 10px rgba(255, 255, 255, 0.38);
}
.cloud-left { left: 48px; }
.cloud-right { right: 112px; transform: scale(0.9); }
.mini-rain-message {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 10px 18px; border-radius: 999px; background: rgba(89, 51, 17, 0.72);
  color: #fff3d2; font-size: 18px; font-weight: 900; letter-spacing: 0.04em;
  text-align: center; box-shadow: 0 8px 18px rgba(55, 30, 11, 0.22);
}
.mini-rain-plant {
  position: absolute; bottom: 26px; left: 50%; width: 148px; height: 184px;
  transform: translateX(-50%); transition: left 0.04s linear; z-index: 3;
}
.mini-rain-plant img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(66, 44, 17, 0.3)); }
.mini-rain-item {
  position: absolute; top: -60px; width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center; z-index: 2; pointer-events: none;
}
.mini-rain-item--sun  { color: #ffb300; font-size: 48px; text-shadow: 0 0 12px rgba(255, 228, 89, 0.95); }
.mini-rain-item--metal { color: #7b8794; font-size: 42px; text-shadow: 0 0 10px rgba(77, 85, 95, 0.5); }
.mini-rain-controls { display: flex; justify-content: flex-end; gap: 14px; padding-right: 18px; margin-top: -6px; }
.mini-rain-control {
  width: 92px; height: 58px; border-radius: 18px; border: 3px solid #7a3e07;
  background: linear-gradient(180deg, #f7cc63, #e39b1b); color: #fff; font-size: 28px;
  font-weight: 900; cursor: pointer; text-shadow: 1px 1px 0 #7a3e07;
  box-shadow: 0 8px 16px rgba(88, 52, 16, 0.24);
}
.mini-bottom-actions { display: none; }
.mini-switch-btn {
  border: none; background: transparent; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; margin-top: 8px;
}
.mini-switch-btn img {
  width: 80px; height: 60px; display: block;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.mini-switch-btn:hover img { transform: scale(1.08); filter: brightness(1.12); }
.mini-switch-btn.oculta { display: none !important; }

@keyframes mini-pop   { 0% { transform: scale(0.3); } 100% { transform: scale(1); } }
@keyframes mini-pulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.24); } }

/* ===== PANTALLA 11: GAME OVER ===== */
.gameover-content {
  position: absolute; bottom: 8vh; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  width: 90vw; max-width: 500px; padding: 30px 24px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(54, 11, 5, 0.68), rgba(22, 5, 2, 0.42));
  border: 1px solid rgba(255, 221, 179, 0.2); box-shadow: var(--shadow-deep);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(6px);
}
.gameover-title {
  font-size: 52px; font-weight: 900; color: #fff; text-align: center; line-height: 1.1;
  text-shadow: 3px 3px 0 #3a1a00, -2px -2px 0 #3a1a00, 2px -2px 0 #3a1a00, -2px 2px 0 #3a1a00, 0 0 20px rgba(0,0,0,0.6);
  animation: gameover-title-in 0.7s cubic-bezier(0.34,1.56,0.64,1) both;
}
.gameover-subtitle { font-size: 18px; font-weight: 700; color: #ffe8b0; text-align: center; text-shadow: 1px 1px 4px rgba(0,0,0,0.8); animation: gameover-fade-in 0.5s ease 0.4s both; }
.gameover-buttons  { display: flex; gap: 16px; margin-top: 8px; animation: gameover-fade-in 0.5s ease 0.6s both; }
.gameover-btn { font-size: 22px; padding: 12px 32px; min-width: 150px; border-radius: 24px; box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.gameover-btn--continue { background: #27ae60; border-color: #1a6e3c; }
.gameover-btn--continue:hover { background: #2ecc71; }
.gameover-hint { font-size: 13px; color: rgba(255,240,200,0.8); text-align: center; text-shadow: 1px 1px 3px rgba(0,0,0,0.7); animation: gameover-fade-in 0.5s ease 0.8s both; }
@keyframes gameover-title-in { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes gameover-fade-in  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   SISTEMA DE STATS
   ============================================================ */
.stats-container {
  position: absolute; top: 115px; left: 14px; z-index: 5;
  display: flex; flex-direction: column; gap: 7px; width: 140px;
  background: rgba(80, 40, 10, 0.72); border: 2px solid #7a3e07;
  border-radius: 14px; padding: 10px 10px 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.stat-row { display: flex; align-items: center; gap: 5px; }
.stat-icon { font-size: 16px; width: 22px; text-align: center; filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.4)); flex-shrink: 0; }
.stat-bar-wrap { flex: 1; height: 10px; background: rgba(0,0,0,0.35); border-radius: 8px; border: 1.5px solid rgba(255,255,255,0.3); overflow: hidden; }
.stat-bar { height: 100%; border-radius: 8px; width: 70%; transition: width 0.4s ease, background-color 0.4s ease; }
.stat-bar--high { background: linear-gradient(90deg,#56d17a,#2ecc71); box-shadow: 0 0 6px rgba(46,204,113,0.6); }
.stat-bar--mid  { background: linear-gradient(90deg,#f5c842,#f39c12); box-shadow: 0 0 6px rgba(243,156,18,0.5); }
.stat-bar--low  { background: linear-gradient(90deg,#e74c3c,#c0392b); box-shadow: 0 0 6px rgba(231,76,60,0.7); animation: bar-pulse 0.8s ease infinite; }
@keyframes bar-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.65; } }

.action-feedback {
  position: absolute; bottom: 60%; font-size: 22px; font-weight: 900;
  text-shadow: 1px 2px 4px rgba(0,0,0,0.55);
  pointer-events: none; animation: feedback-float 1.2s ease forwards; z-index: 10; white-space: nowrap;
}
@keyframes feedback-float { 0% { opacity:1; transform:translateY(0) scale(1); } 60% { opacity:1; transform:translateY(-40px) scale(1.1); } 100% { opacity:0; transform:translateY(-70px) scale(0.9); } }

.stat-particle { position: absolute; font-size: 18px; pointer-events: none; animation: particle-burst 1s ease forwards; z-index: 9; }
@keyframes particle-burst { 0% { opacity:1; transform:translate(0,0) scale(1); } 100% { opacity:0; transform:translate(0,-60px) scale(0.5); } }

.imagen-planta { transition: filter 0.6s ease; }
.plant-happy   { filter: brightness(1.05) saturate(1.15) drop-shadow(0 0 10px rgba(100,255,100,0.35)); }
.plant-sad     { filter: brightness(0.88) saturate(0.7) hue-rotate(-10deg); }
.plant-critical{ filter: brightness(0.7) saturate(0.3) hue-rotate(-20deg); animation: plant-shake 0.5s ease infinite !important; }
@keyframes plant-shake { 0%,100% { transform:translateX(-50%) rotate(0deg); } 25% { transform:translateX(-50%) rotate(-3deg); } 75% { transform:translateX(-50%) rotate(3deg); } }

.effect-water     { animation: effect-water-anim     0.6s ease forwards !important; }
.effect-sun       { animation: effect-sun-anim       0.6s ease forwards !important; }
.effect-nutrients { animation: effect-nutrients-anim 0.6s ease forwards !important; }
.effect-health    { animation: effect-health-anim    0.6s ease forwards !important; }

@keyframes effect-water-anim     { 0% { transform:translateX(-50%); filter:brightness(1.05) saturate(1.15); } 40% { transform:translateX(-50%); filter:brightness(1.2) saturate(1.4) hue-rotate(180deg); } 100% { transform:translateX(-50%); filter:brightness(1.05) saturate(1.15); } }
@keyframes effect-sun-anim       { 0% { transform:translateX(-50%); filter:brightness(1); } 40% { transform:translateX(-50%); filter:brightness(1.4) saturate(1.5) sepia(0.4); } 100% { transform:translateX(-50%); filter:brightness(1.05); } }
@keyframes effect-nutrients-anim { 0% { transform:translateX(-50%); filter:saturate(1); } 40% { transform:translateX(-50%); filter:saturate(2) brightness(1.15) hue-rotate(60deg); } 100% { transform:translateX(-50%); filter:saturate(1.15); } }
@keyframes effect-health-anim    { 0% { transform:translateX(-50%) scale(1); } 40% { transform:translateX(-50%) scale(1.06); filter:brightness(1.3); } 100% { transform:translateX(-50%) scale(1); } }

.xp-row { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.xp-bar-wrap { width: 100%; height: 8px; background: rgba(0,0,0,0.35); border-radius: 8px; border: 1.5px solid rgba(255,255,255,0.3); overflow: hidden; cursor: pointer; }
.xp-bar { height: 100%; width: 0%; border-radius: 8px; background: linear-gradient(90deg,#FFD700,#FFA000); box-shadow: 0 0 6px rgba(255,215,0,0.7); transition: width 0.5s ease; }
.xp-label { font-size: 10px; font-weight: 700; color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.6); text-align: center; letter-spacing: 0.3px; cursor: pointer; }

@keyframes level-up-flash { 0% { transform:scale(1); filter:brightness(1); } 25% { transform:scale(1.25); filter:brightness(1.6) drop-shadow(0 0 8px #FFD700); } 50% { transform:scale(1.1); filter:brightness(1.3); } 75% { transform:scale(1.2); filter:brightness(1.5) drop-shadow(0 0 6px #FFD700); } 100% { transform:scale(1); filter:brightness(1); } }
.level-up-flash  { animation: level-up-flash 1s ease !important; }
.level-up-feedback { font-size: 28px !important; font-weight: 900 !important; text-shadow: 0 0 12px rgba(255,215,0,0.8), 1px 2px 4px rgba(0,0,0,0.6) !important; }

@keyframes plant-evolve-out { 0% { opacity:1; transform:translateX(-50%) scale(1); } 100% { opacity:0; transform:translateX(-50%) scale(1.3); } }
.plant-evolve { animation: plant-evolve-out 0.3s ease forwards !important; }

/* ============================================================
   MODALES FLOTANTES
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; animation: modal-fade-in 0.2s ease;
}
.modal-overlay.oculta { display: none !important; }
@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  position: relative;
  background: linear-gradient(160deg, #a0641a, #7a3e07);
  border: 3px solid #f2a623; border-radius: 22px;
  padding: 32px 36px 28px; width: min(88vw, 420px);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.55);
  animation: modal-pop-in 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modal-pop-in { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-close-x {
  position: absolute; top: 10px; right: 12px; width: 34px; height: 34px;
  border-radius: 50%; border: 2px solid #f2a623; background: rgba(0,0,0,0.3);
  color: #fff; font-size: 18px; font-weight: 900; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  transition: background 0.15s ease;
}
.modal-close-x:hover { background: #c0392b; border-color: #e74c3c; }

.modal-title { font-size: 22px; font-weight: 900; color: #fff; text-align: center; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
.modal-desc { font-size: 15px; color: #ffe8b0; text-align: center; line-height: 1.5; text-shadow: 1px 1px 2px rgba(0,0,0,0.4); }
.modal-input {
  width: 100%; background: rgba(255,255,255,0.15); border: 2px solid #f2a623;
  border-radius: 12px; color: #fff; padding: 10px 14px; font-size: 18px;
  font-weight: 700; outline: none; text-align: center;
}
.modal-input::placeholder { color: rgba(255,255,255,0.5); }
.modal-input:focus { border-color: #FFD700; background: rgba(255,255,255,0.22); }

.modal-buttons { display: flex; gap: 14px; margin-top: 4px; }
.modal-btn-cancel  { background: #7a3e07; border-color: #5a2d05; }
.modal-btn-cancel:hover  { background: #9b5a1a; }
.modal-btn-confirm { background: #27ae60; border-color: #1a6e3c; }
.modal-btn-confirm:hover { background: #2ecc71; }

/* ===== TOAST ===== */
.save-toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: rgba(40,80,20,0.92); color: #fff; font-size: 15px; font-weight: 700;
  padding: 10px 26px; border-radius: 20px; border: 2px solid #56d17a;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3); z-index: 999; pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease; opacity: 0;
}
.save-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .pantalla { min-height: 100dvh; }
  .hero-panel { top: 14px; left: 14px; right: 14px; width: auto; padding: 16px 16px 14px; border-radius: 22px; }
  .hero-eyebrow { font-size: 11px; }
  .hero-subtitle { margin-top: 8px; font-size: 14px; }
  .hero-highlights { gap: 7px; margin-top: 12px; }
  .hero-chip { padding: 6px 10px; font-size: 11px; }
  .hero-tip { margin-top: 12px; padding-top: 12px; font-size: 12px; min-height: 32px; }
  .contenedor-pantalla1 { bottom: 18px; left: 50%; right: auto; transform: translateX(-50%); width: min(70vw, 260px); align-items: center; }
  .boton { font-size: 14px; padding: 8px 22px; }
  .boton--pequeno { font-size: 13px; }
  .contenedor-planta { bottom: 12vh; width: 80vw; height: 80vw; }
  .imagen-maceta { width: 75vw; transform: translateX(-50%); }
  .imagen-planta { width: 60vw; bottom: 22vw; }
  .pantalla--level .contenedor-planta { bottom: 8vh; width: 62vw; height: 62vw; }
  .pantalla--level .imagen-maceta { width: 54vw; }
  .pantalla--level .imagen-planta { width: 36vw; bottom: 18vw; }
   .contenedor-cartel { width: 92vw; }
   .cartel-texto, .privacy-cartel-text, #pantallaHowToPlay .howto-cartel-text { width: 78%; top: 8%; }
   .cartel-parrafo, .privacy-text, #pantallaHowToPlay .howto-line { font-size: 11px; }
   .privacy-header, .cartel-titulo-principal, #pantallaHowToPlay .howto-header { font-size: 17px; }
  .boton-next, .boton-back, .boton-info-close { right: 16px; left: auto; bottom: 16px; }
  .boton-delete-data { right: 12px; left: auto; bottom: 60px; }
  #pantallaHowToPlay .boton-home-howto { right: 12px; left: auto; bottom: 12px; min-width: 80px; padding: 7px 14px; }
  .hud-left { top: 12px; left: 84px; gap: 6px; }
  .level-badge, .player-name-badge { font-size: 12px; min-width: 72px; padding: 4px 10px; }
  .player-name-badge { min-width: 110px; }
  .btn-plant-info { left: auto; top: 12px; width: 32px; height: 32px; font-size: 18px; }
  .btn-menu img { width: 42px; height: 42px; }
  .btn-toggle-actions { top: 6px; right: 6px; }
  .btn-toggle-actions img { width: 54px; height: 54px; }
  .action-bar { width: 86px; padding: 66px 10px 12px; }
  .action-bar-slot { height: 60px; }
  .menu-panel { width: min(82vw, 320px); top: 12%; gap: 10px; padding: 18px 14px; }
  .menu-label { min-width: 108px; font-size: 20px; }
  .menu-toggle { width: 44px; height: 38px; font-size: 13px; }
  .menu-main-btn { min-width: 190px; font-size: 22px; }
  .menu-pot { bottom: 44px; }
  .menu-pot img { width: 120px; }
  .about-text { font-size: 11px; }
  .btn-open-minigame { left: 10px; bottom: 12px; }
  .btn-open-minigame img { width: 58px; height: 58px; }
  .mini-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 12px; padding: 68px 10px 90px; }
  .mini-hub { padding: 72px 12px 90px; justify-content: flex-start; gap: 14px; }
  .mini-hub-header { padding: 18px 16px; border-radius: 22px; }
  .mini-hub-kicker { font-size: 11px; }
  .mini-hub-title { font-size: 44px; }
  .mini-hub-subtitle { font-size: 14px; }
  .mini-hub-grid { grid-template-columns: 1fr; gap: 12px; }
  .mini-hub-card { min-height: 150px; padding: 18px 16px; border-radius: 22px; gap: 10px; }
  .mini-hub-icon { font-size: 32px; }
  .mini-hub-card-title { font-size: 22px; }
  .mini-hub-card-text { font-size: 13px; }
  .mini-side { gap: 8px; padding: 12px; border-radius: 22px; }
  .mini-title { font-size: 26px; }
  .mini-score-row { font-size: 15px; }
  .mini-score-icon { width: 34px; height: 34px; }
  .mini-score-name { font-size: 14px; }
  .mini-action { font-size: 16px; }
  .mini-difficulty .mini-pick-btn { font-size: 12px; padding: 6px 8px; }
  .mini-board-wrap { width: 100%; padding: 12px 8px 18px; gap: 10px; border-radius: 22px; background: linear-gradient(180deg, rgba(91, 57, 24, 0.12), rgba(255, 241, 204, 0.06)); }
  .mini-board-wrap::before { inset: 10px 10px; border-radius: 18px; }
  .mini-turn { font-size: 26px; text-align: center; line-height: 1.05; }
  .mini-board { width: min(90vw, 360px); gap: 8px; padding: 12px; border-radius: 20px; }
  .mini-cell { border-radius: 14px; }
  .mini-rain-pill { font-size: 14px; padding: 8px 14px; }
  .mini-rain-arena { width: min(94vw, 420px); min-height: 430px; height: 62vh; border-radius: 22px; }
  .mini-rain-message { top: 18px; width: calc(100% - 28px); font-size: 13px; padding: 9px 12px; }
  .mini-rain-plant { width: 112px; height: 142px; bottom: 16px; }
  .mini-rain-item { width: 56px; height: 56px; }
  .mini-rain-item--sun { font-size: 36px; }
  .mini-rain-item--metal { font-size: 34px; }
  .mini-rain-controls { justify-content: flex-end; padding-right: 8px; gap: 8px; margin-top: -2px; }
  .mini-rain-control { width: 72px; height: 48px; font-size: 24px; }
  .mini-bottom-actions { gap: 8px; bottom: 68px; width: min(86vw, 260px); }
  .mini-bottom-btn { min-width: 140px; font-size: 15px; padding: 8px 12px; }
  .mini-close-to-level { width: 44px; height: 44px; font-size: 22px; top: 10px; right: 10px; }
  .stats-container { top: 70px; left: 6px; width: 108px; gap: 5px; }
  .stat-icon { font-size: 13px; width: 18px; }
  .stat-bar-wrap { height: 8px; }
  .action-feedback { font-size: 17px; }
  .stat-particle { font-size: 14px; }
  .xp-label { font-size: 9px; }
  .xp-bar-wrap { height: 6px; }
  .gameover-title { font-size: 9vw; }
  .gameover-subtitle { font-size: 4vw; }
  .gameover-btn { font-size: 5vw; padding: 3vw 7vw; min-width: 35vw; }
  .gameover-hint { font-size: 3vw; }
  .modal-box { padding: 28px 20px 22px; }
  .modal-title { font-size: 18px; }
  .modal-desc { font-size: 13px; }
  .modal-input { font-size: 16px; }
  .save-toast { bottom: 72px; padding: 10px 18px; font-size: 13px; }
  .btn-menu-close { width: 44px; height: 44px; font-size: 22px; right: 14px; top: 14px; bottom: auto; }
  .site-footer { bottom: 8px; font-size: 11px; }
}