/* ==========================================================================
   css/shojo.css — METÁLICO TORNASOLADO CHILLÓN + TRANSPARENCIA REAL
   - Paleta metálica viva: Cobre chillón, Acero inoxidable espejo, Hierro
     fundido tornasol, Cobre rosa neón, Latón dorado, Titanio turquesa, Cromo
   - CERO fondos opacos feos detrás de las letras: solo contorno metálico
     luminoso + interior transparente para ver la cocina anime debajo
   - Bocadillo manga solo en contorno y transparente pero 100 % legible
   ========================================================================== */

:root {
  --copper: #FF6E1A;
  --steel: #DFF0FF;
  --castiron: #00F0FF;
  --rosegold: #FF2E93;
  --brass: #FFD600;
  --titanium: #00F5D4;
  --chrome: #C77DFF;
  --danger: #FF3358;
  --ok: #00F59B;

  --text-bright: #FFFFFF;
  --text-halo: 0 1px 3px rgba(0, 0, 0, 0.96), 0 0 10px rgba(0, 0, 0, 0.78);
  --glass-clear: rgba(12, 14, 22, 0.22);
  --glass-soft: rgba(12, 14, 22, 0.34);
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

html[data-font="normal"] { font-size: 16.5px; }
html[data-font="large"]  { font-size: 19px; }
html[data-font="xlarge"] { font-size: 21.5px; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-bright);
  min-height: 100vh;
  background: #141720 url('../assets/kitchen-bg.jpg') center center / cover no-repeat fixed;
  overflow-x: hidden;
}

body[data-night="on"] .scene-wrapper {
  background: rgba(8, 10, 18, 0.72);
}
body[data-night="on"] .anime-theatre {
  filter: brightness(0.84);
}

.scene-wrapper {
  min-height: 100vh;
  background: transparent;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Destellos shojo muy sutiles */
.shojo-petals { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.petal { position: absolute; font-size: 1.2rem; opacity: 0.72; animation: petalDrift 14s linear infinite; }
@keyframes petalDrift {
  0%   { transform: translateY(-10vh) translateX(0) rotate(0deg); opacity: 0; }
  12%  { opacity: 0.78; }
  88%  { opacity: 0.72; }
  100% { transform: translateY(108vh) translateX(48px) rotate(300deg); opacity: 0; }
}

:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* ==================== BARRA SUPERIOR TRANSPARENTE CON CONTORNO METÁLICO ==================== */
.arcade-hud {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 12, 20, 0.34);
  backdrop-filter: blur(7px);
  border-bottom: 2.5px solid transparent;
  border-image: linear-gradient(90deg, #FF6E1A, #FF2E93, #FFFFFF, #00F0FF, #FFD600, #C77DFF) 1;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.hud-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.38rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  background: rgba(14, 16, 26, 0.28);
  border: 2.5px solid var(--copper);
  border-radius: 999px;
  padding: 0.22rem 0.85rem 0.22rem 0.5rem;
  cursor: pointer;
  color: #FFF;
  text-shadow: var(--text-halo);
  font-family: inherit;
  font-weight: 900;
  font-size: 0.94rem;
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.65), 0 0 12px rgba(255, 110, 26, 0.45);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.brand-btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 #FFF, 0 0 18px rgba(255, 110, 26, 0.78); }

.hud-stats { display: flex; align-items: center; gap: 0.38rem; flex-wrap: wrap; }

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.72rem;
  border-radius: 999px;
  border: 2.5px solid var(--steel);
  background: rgba(12, 14, 22, 0.28);
  color: #FFF;
  text-shadow: var(--text-halo);
  font-size: 0.84rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
}
.hud-chip.dishes { border-color: var(--titanium); box-shadow: inset 0 1px 0 rgba(200, 255, 248, 0.7), 0 0 10px rgba(0, 245, 212, 0.4); }
.hud-chip.streak { border-color: var(--brass);    box-shadow: inset 0 1px 0 rgba(255, 248, 190, 0.7), 0 0 10px rgba(255, 214, 0, 0.4); }
.hud-chip.timer  { border-color: var(--castiron); box-shadow: inset 0 1px 0 rgba(200, 252, 255, 0.7), 0 0 12px rgba(0, 240, 255, 0.5); font-variant-numeric: tabular-nums; font-size: 0.92rem; }

.hud-tools { display: inline-flex; align-items: center; gap: 0.28rem; flex-wrap: wrap; }

.tool-btn {
  min-height: 36px;
  padding: 0.2rem 0.62rem;
  border-radius: 999px;
  border: 2px solid rgba(223, 240, 255, 0.85);
  background: rgba(12, 14, 22, 0.24);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.1s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.tool-btn:hover {
  transform: translateY(-1px);
  border-color: var(--copper);
  box-shadow: inset 0 1px 0 #FFF, 0 0 12px rgba(255, 110, 26, 0.6);
}
.tool-btn[aria-pressed="true"] {
  border-color: var(--brass);
  background: rgba(14, 16, 26, 0.46);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 #FFF, 0 0 16px rgba(255, 214, 0, 0.78);
}

/* ==================== CONTENEDOR 100 % TRANSPARENTE ==================== */
.arcade-container {
  position: relative;
  z-index: 5;
  max-width: 1090px;
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 0.85rem 2.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* ==================== ESCENA ANIME UNIFICADA + BOCADILLO SOLO CONTORNO TRANSPARENTE ==================== */
.anime-theatre {
  position: relative;
  width: 100%;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.scene-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.8;
  max-height: 410px;
  border-radius: 26px;
  overflow: hidden;
  border: 3px solid var(--copper);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 22px rgba(255, 110, 26, 0.45), 0 8px 24px rgba(0, 0, 0, 0.35);
  background: transparent;
}

.anime-theatre.mood-happy .scene-stage {
  border-color: var(--titanium);
  box-shadow: 0 0 26px rgba(0, 245, 212, 0.65), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.anime-theatre.mood-burnt .scene-stage {
  border-color: var(--danger);
  box-shadow: 0 0 26px rgba(255, 51, 88, 0.72), 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: comicShake 0.45s ease;
}

.scene-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.scene-layer.active { opacity: 1; }

/* BOCADILLO MANGA: SOLO CONTORNO METÁLICO + TRANSPARENCIA TOTAL DEBAJO (SE VE LA COCINA) */
.scene-caption-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.95rem;
  border-radius: 22px;
  border: 3px solid var(--steel);
  background: rgba(10, 12, 20, 0.22);
  backdrop-filter: blur(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 0 16px rgba(223, 240, 255, 0.4),
    0 4px 14px rgba(0, 0, 0, 0.28);
}

.scene-caption-bar.mood-happy {
  border-color: var(--titanium);
  box-shadow: inset 0 1px 0 rgba(200, 255, 248, 0.8), 0 0 18px rgba(0, 245, 212, 0.55);
}
.scene-caption-bar.mood-burnt {
  border-color: var(--danger);
  box-shadow: inset 0 1px 0 rgba(255, 190, 200, 0.8), 0 0 18px rgba(255, 51, 88, 0.65);
}

.chef-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  color: #FFE49E;
  text-shadow: var(--text-halo);
  border: 2px solid var(--copper);
  border-radius: 999px;
  padding: 0.16rem 0.68rem;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(255, 110, 26, 0.45);
}

.chef-speech-text {
  margin: 0;
  flex: 1;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.35;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.98), 0 0 12px rgba(0, 0, 0, 0.85);
}

@keyframes comicShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px) rotate(-1deg); }
  50% { transform: translateX(6px) rotate(1deg); }
  75% { transform: translateX(-4px); }
}

/* ==================== TABLERO 100 % TRANSPARENTE (CERO CAJAS OPACAS DETRÁS DE LETRAS) ==================== */
.game-board {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.1rem 0;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

/* Textos de cabecera SIN caja de color chillón detrás: solo tipografía clara + contorno metálico sutil */
.mode-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: rgba(12, 14, 22, 0.22);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  border: 2.5px solid var(--rosegold);
  font-size: 0.94rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 220, 240, 0.65), 0 0 14px rgba(255, 46, 147, 0.45);
}

.floating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: rgba(12, 14, 22, 0.24);
  color: #FFF4B8;
  text-shadow: var(--text-halo);
  border: 2.5px solid var(--brass);
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(255, 214, 0, 0.38);
}

.helper-txt {
  display: inline-block;
  padding: 0.22rem 0.72rem;
  border-radius: 999px;
  background: transparent;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.98), 0 0 12px rgba(0, 0, 0, 0.9);
  font-size: 0.88rem;
  font-weight: 900;
}

.meter-bar {
  width: 100%;
  height: 12px;
  background: rgba(10, 12, 20, 0.28);
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(223, 240, 255, 0.8);
  margin-bottom: 0.85rem;
}
.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6E1A, #FF2E93, #FFFFFF, #00F0FF, #FFD600, #C77DFF);
  transition: width 0.25s linear;
}

/* ==================== BOTONES CON CONTORNO METÁLICO E INTERIOR TRANSPARENTE ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.52rem 1.15rem;
  border-radius: 999px;
  border: 2.5px solid var(--steel);
  background: rgba(12, 14, 24, 0.28);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 #FFF, 0 0 18px rgba(255, 255, 255, 0.55);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.48; cursor: not-allowed; }

.btn-sakura { border-color: var(--rosegold); box-shadow: inset 0 1px 0 rgba(255, 200, 230, 0.7), 0 0 14px rgba(255, 46, 147, 0.5); }
.btn-mint   { border-color: var(--titanium); box-shadow: inset 0 1px 0 rgba(200, 255, 248, 0.7), 0 0 14px rgba(0, 245, 212, 0.48); }
.btn-sky    { border-color: var(--castiron); box-shadow: inset 0 1px 0 rgba(200, 250, 255, 0.7), 0 0 14px rgba(0, 240, 255, 0.48); }
.btn-lemon  { border-color: var(--brass);    box-shadow: inset 0 1px 0 rgba(255, 248, 190, 0.7), 0 0 14px rgba(255, 214, 0, 0.5); }
.btn-violet { border-color: var(--chrome);   box-shadow: inset 0 1px 0 rgba(240, 215, 255, 0.7), 0 0 14px rgba(199, 125, 255, 0.5); }
.btn-ghost  { border-color: var(--steel);    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 0 12px rgba(223, 240, 255, 0.35); }
.btn-sm     { min-height: 36px; padding: 0.3rem 0.78rem; font-size: 0.84rem; }
.btn-row    { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* ==================== 31 BOTONES ILUSTRADOS METÁLICOS (TRANSPARENTES) ==================== */
.filter-strip { display: flex; flex-wrap: wrap; gap: 0.36rem; margin-bottom: 0.65rem; }

.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 0.85rem;
}

.level-card {
  position: relative;
  border-radius: 24px;
  border: 2.8px solid var(--card-border, var(--copper));
  background: linear-gradient(145deg, rgba(14, 16, 26, 0.34), rgba(14, 16, 26, 0.14));
  backdrop-filter: blur(2.5px);
  padding: 0.8rem 0.9rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  cursor: pointer;
  text-align: left;
  color: #FFFFFF;
  font-family: inherit;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.68),
    0 0 16px var(--card-glow, rgba(255, 110, 26, 0.42)),
    0 6px 18px rgba(0, 0, 0, 0.32);
  transition: transform 0.14s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.level-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(14, 16, 26, 0.24));
  box-shadow:
    inset 0 1.5px 0 #FFFFFF,
    0 0 26px var(--card-glow, rgba(255, 110, 26, 0.72)),
    0 10px 24px rgba(0, 0, 0, 0.4);
}
.level-card:active { transform: translateY(0) scale(0.99); }

/* 7 acabados metálicos chillones inspirados en la lámina tornasolada */
.metal-0 { --card-border: #FF6E1A; --card-glow: rgba(255, 110, 26, 0.55); }   /* Cobre chillón */
.metal-1 { --card-border: #E2F1FF; --card-glow: rgba(200, 232, 255, 0.55); }  /* Acero inoxidable espejo */
.metal-2 { --card-border: #00F0FF; --card-glow: rgba(0, 240, 255, 0.50); }    /* Hierro fundido tornasol */
.metal-3 { --card-border: #FF2E93; --card-glow: rgba(255, 46, 147, 0.55); }   /* Cobre rosa neón */
.metal-4 { --card-border: #FFD600; --card-glow: rgba(255, 214, 0, 0.55); }    /* Latón dorado vivo */
.metal-5 { --card-border: #00F5D4; --card-glow: rgba(0, 245, 212, 0.52); }    /* Titanio turquesa */
.metal-6 { --card-border: #C77DFF; --card-glow: rgba(199, 125, 255, 0.55); }  /* Cromo violeta */

.level-visual-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.cookware-svg {
  width: 78px;
  height: 62px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
  transition: transform 0.16s ease;
}
.level-card:hover .cookware-svg {
  transform: scale(1.1) rotate(-3deg);
}

.level-meta-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.level-num-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.14rem 0.56rem;
  border-radius: 999px;
  border: 1.8px solid var(--card-border, #FFF);
  background: transparent;
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  font-size: 0.74rem;
  font-weight: 900;
}

.level-title {
  margin: 0.1rem 0 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.24;
  color: #FFFFFF;
  text-shadow: var(--text-halo);
}

.level-sub {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: var(--text-halo);
}

.level-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.15rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.26);
}
.level-play-cue {
  font-size: 0.84rem;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: var(--text-halo);
}

/* ==================== 6 MINI-JUEGOS METÁLICOS TRANSPARENTES ==================== */
.cables-arena { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.cables-svg-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.cables-col { display: flex; flex-direction: column; gap: 0.65rem; position: relative; z-index: 3; }

.cable-node {
  min-height: 60px;
  padding: 0.7rem 0.95rem;
  border-radius: 18px;
  border: 2.8px solid var(--node-border, var(--copper));
  background: rgba(12, 14, 24, 0.30);
  backdrop-filter: blur(2.5px);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 14px var(--node-glow, rgba(255, 110, 26, 0.4));
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.cable-node:hover:not(:disabled) { transform: translateY(-2px) scale(1.015); background: rgba(255, 255, 255, 0.14); }
.cable-node.selected { border-color: var(--brass); box-shadow: 0 0 22px rgba(255, 214, 0, 0.85), inset 0 0 0 2px #FFF; transform: scale(1.03); }
.cable-node.matched { border-color: var(--ok); background: rgba(0, 245, 155, 0.18); }
.cable-node.wrong-mark { border-color: var(--danger) !important; background: rgba(255, 51, 88, 0.32) !important; animation: comicShake 0.4s ease; }
.cable-dot { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #FFF; background: rgba(12, 14, 22, 0.5); }

/* Ollas de Colores: cada olla es un dibujo metálico flotando con transparencia */
.falling-card {
  background: rgba(12, 14, 24, 0.30);
  backdrop-filter: blur(3px);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  border: 3px solid var(--brass);
  border-radius: 24px;
  padding: 0.9rem 1.2rem;
  text-align: center;
  margin: 0.25rem auto 1rem;
  max-width: 580px;
  cursor: grab;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.72), 0 0 20px rgba(255, 214, 0, 0.45);
}
.falling-card.wrong-mark { border-color: var(--danger); background: rgba(255, 51, 88, 0.28); animation: comicShake 0.4s ease; }
.falling-term { font-size: 1.28rem; font-weight: 900; margin: 0 0 0.2rem; }
.falling-hint { font-size: 0.94rem; font-weight: 800; margin: 0; opacity: 0.96; }

.pots-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 0.85rem; }
.anime-pot-btn {
  padding: 0.75rem 0.65rem 0.85rem;
  border-radius: 24px;
  border: 2.8px solid var(--pot-border, var(--copper));
  background: rgba(12, 14, 22, 0.22);
  backdrop-filter: blur(2px);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.65), 0 0 18px var(--pot-glow, rgba(255, 110, 26, 0.45));
  transition: transform 0.14s ease, box-shadow 0.16s ease;
}
.anime-pot-btn:hover { transform: translateY(-4px) scale(1.035); background: rgba(255, 255, 255, 0.12); }
.anime-pot-btn.drag-over { transform: scale(1.07); border-color: var(--brass); box-shadow: 0 0 26px rgba(255, 214, 0, 0.8); }
.anime-pot-btn .cookware-svg { width: 112px; height: 86px; }
.pot-cat-pill {
  padding: 0.18rem 0.72rem;
  border-radius: 999px;
  border: 2px solid var(--pot-border, #FFF);
  background: transparent;
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  font-size: 0.9rem;
  font-weight: 900;
}

/* Colorear el Plato */
.colorcode-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: center; }
.plate-svg-wrap { display: flex; justify-content: center; }
.plate-svg-wrap svg { width: 100%; max-width: 350px; height: auto; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5)); }
.plate-zone { cursor: pointer; }
.palette-list { display: flex; flex-direction: column; gap: 0.6rem; }
.paint-btn {
  min-height: 56px;
  padding: 0.6rem 0.9rem;
  border-radius: 18px;
  border: 2.8px solid var(--paint-hex, var(--copper));
  background: rgba(12, 14, 24, 0.30);
  backdrop-filter: blur(2.5px);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 14px rgba(0, 0, 0, 0.35);
}
.paint-btn.active-paint { transform: scale(1.035); box-shadow: 0 0 22px var(--paint-hex, #FFEA00), inset 0 0 0 2px #FFF; }
.paint-swatch { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid #FFF; box-shadow: inset 0 2px 6px rgba(255,255,255,0.85), 0 0 10px rgba(0,0,0,0.45); }

/* Speed Cups / Orden */
.cups-slots { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.85rem; }
.cup-slot {
  flex: 1 1 140px;
  min-height: 52px;
  padding: 0.4rem 0.7rem;
  border-radius: 16px;
  border: 2.5px dashed rgba(223, 240, 255, 0.85);
  background: rgba(12, 14, 24, 0.24);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 900;
}
.cup-slot.filled { border-style: solid; border-color: var(--slot-border, var(--titanium)); box-shadow: 0 0 14px var(--slot-glow, rgba(0, 245, 212, 0.45)); }
.cups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 0.78rem; }
.speed-cup-btn {
  min-height: 82px;
  padding: 0.65rem 0.85rem;
  border-radius: 22px;
  border: 2.8px solid var(--cup-border, var(--copper));
  background: rgba(12, 14, 24, 0.28);
  backdrop-filter: blur(2.5px);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.65), 0 0 16px var(--cup-glow, rgba(255, 110, 26, 0.42));
  text-align: center;
}
.speed-cup-btn .cookware-svg { width: 64px; height: 50px; }
.speed-cup-btn:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.14); }
.speed-cup-btn.wrong-mark { animation: comicShake 0.4s ease; border-color: var(--danger) !important; background: rgba(255, 51, 88, 0.30); }

/* El Intruso */
.intruder-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; margin-top: 0.65rem; }
.intruder-card {
  min-height: 98px;
  padding: 0.95rem;
  border-radius: 24px;
  border: 3px solid var(--intr-border, var(--copper));
  background: rgba(12, 14, 24, 0.30);
  backdrop-filter: blur(2.5px);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.65), 0 0 16px var(--intr-glow, rgba(255, 110, 26, 0.45));
}
.intruder-card .cookware-svg { width: 64px; height: 50px; }
.intruder-card:hover { transform: translateY(-3px) scale(1.02); background: rgba(255, 255, 255, 0.14); }
.intruder-card.wrong-mark { opacity: 0.46; text-decoration: line-through; border-color: var(--danger) !important; animation: comicShake 0.4s ease; }

/* Memory Relámpago */
.memory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(156px, 1fr)); gap: 0.78rem; margin-top: 0.65rem; }
.mem-card {
  min-height: 118px;
  padding: 0.65rem;
  border-radius: 22px;
  border: 2.8px solid var(--steel);
  background: rgba(12, 14, 24, 0.30);
  backdrop-filter: blur(2.5px);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.65), 0 4px 14px rgba(0, 0, 0, 0.35);
}
.mem-card.face-down { border-color: var(--chrome); box-shadow: inset 0 1.5px 0 rgba(245, 220, 255, 0.75), 0 0 16px rgba(199, 125, 255, 0.48); }
.mem-card.face-down .cookware-svg { width: 66px; height: 52px; }
.mem-card.mem-term  { border-color: var(--copper); box-shadow: inset 0 1.5px 0 #FFE2C2, 0 0 16px rgba(255, 110, 26, 0.55); }
.mem-card.mem-def   { border-color: var(--castiron); box-shadow: inset 0 1.5px 0 #C8FAFF, 0 0 16px rgba(0, 240, 255, 0.55); }
.mem-card.matched   { border-color: var(--ok); background: rgba(0, 245, 155, 0.20); cursor: default; box-shadow: 0 0 16px rgba(0, 245, 155, 0.5); }

/* ==================== TARJETA FINAL TRANSPARENTE CON CONTORNO METÁLICO ==================== */
.end-card {
  border: 3px solid var(--titanium);
  border-radius: 26px;
  padding: 1.15rem 1.25rem;
  background: rgba(12, 14, 24, 0.44);
  backdrop-filter: blur(5px);
  color: #FFFFFF;
  text-shadow: var(--text-halo);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.7), 0 0 24px rgba(0, 245, 212, 0.4);
}
.end-card.burnt-card {
  border-color: var(--danger);
  box-shadow: inset 0 1.5px 0 rgba(255, 200, 210, 0.7), 0 0 24px rgba(255, 51, 88, 0.5);
}

.mistake-card {
  background: rgba(12, 14, 24, 0.34);
  border: 2.5px solid var(--copper);
  border-radius: 18px;
  padding: 0.85rem 1rem;
  margin: 0.65rem 0;
  box-shadow: inset 0 1px 0 rgba(255, 225, 195, 0.65), 0 0 14px rgba(255, 110, 26, 0.35);
  text-align: left;
}

/* ==================== MODALES CRISTAL METÁLICO ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 10, 18, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem;
}
.modal-card {
  background: rgba(18, 22, 34, 0.88);
  color: #FFFFFF;
  border: 3px solid var(--copper);
  border-radius: 26px;
  max-width: 660px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.2rem 1.3rem;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.6), 0 0 28px rgba(255, 110, 26, 0.45);
}
.modal-card.mobile-modal { border-color: var(--titanium); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.6), 0 0 28px rgba(0, 245, 212, 0.45); }
.study-box { background: rgba(255, 255, 255, 0.08); border: 2px solid var(--steel); border-radius: 16px; padding: 0.85rem 1rem; margin: 0.65rem 0; }
.custom-textarea { width: 100%; min-height: 180px; padding: 0.75rem; font-family: ui-monospace, Consolas, monospace; font-size: 0.86rem; border: 2.5px solid var(--steel); border-radius: 14px; background: rgba(8, 10, 16, 0.85); color: #FFF; }
.custom-input { width: 100%; min-height: 44px; padding: 0.5rem 0.8rem; font-family: inherit; font-size: 0.95rem; font-weight: 800; border: 2.5px solid var(--steel); border-radius: 12px; margin-bottom: 0.6rem; background: rgba(8, 10, 16, 0.85); color: #FFF; }

@media (max-width: 720px) {
  .scene-stage { aspect-ratio: 16 / 9; max-height: 280px; }
  .scene-caption-bar { flex-wrap: wrap; padding: 0.48rem 0.7rem; }
  .cables-arena { gap: 1.15rem; }
  .colorcode-layout { grid-template-columns: 1fr; }
  .intruder-grid { grid-template-columns: 1fr; }
}
