/* =========================================================
   PANTHER STACK — WEB / LANDSCAPE
   ========================================================= */

:root {
  --bg: #060918;
  --panel: rgba(10, 18, 48, 0.92);
  --panel2: rgba(17, 27, 67, 0.94);

  --cyan: #24eaff;
  --blue: #2588ff;
  --pink: #ff42c8;
  --purple: #9c63ff;
  --yellow: #ffd447;
  --green: #42f5a4;
  --red: #ff5576;

  --text: #f4f8ff;
  --muted: #91a9d2;
  --border: rgba(36, 234, 255, 0.28);

  --shadow:
    0 0 18px rgba(36, 234, 255, 0.16),
    0 20px 45px rgba(0, 0, 0, 0.35);
}


/* ================= RESET ================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-width: 100%;
  min-height: 100%;
}

body {
  min-height: 100vh;

  font-family:
    "Segoe UI",
    Arial,
    sans-serif;

  color: var(--text);

  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(255, 66, 200, 0.20),
      transparent 27%
    ),
    radial-gradient(
      circle at 88% 18%,
      rgba(36, 234, 255, 0.18),
      transparent 30%
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(156, 99, 255, 0.20),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #050817,
      #090e25 45%,
      #080b1c
    );

  overflow-x: auto;
}


/* ================= MAIN SHELL ================= */

.game-shell {
  width: min(1500px, calc(100% - 32px));
  min-width: 980px;

  margin: 18px auto;

  border: 1px solid rgba(36, 234, 255, 0.20);
  border-radius: 28px;

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      rgba(10, 15, 40, 0.97),
      rgba(6, 9, 25, 0.98)
    );

  box-shadow:
    0 0 60px rgba(36, 234, 255, 0.08),
    0 30px 80px rgba(0, 0, 0, 0.45);
}


/* ================= HEADER ================= */

.topbar {
  min-height: 88px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 26px;

  border-bottom: 1px solid var(--border);

  background:
    linear-gradient(
      90deg,
      rgba(255, 66, 200, 0.10),
      rgba(36, 234, 255, 0.06),
      rgba(156, 99, 255, 0.12)
    );
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.paw-logo {
  width: 58px;
  height: 58px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(36, 234, 255, 0.45);
  border-radius: 18px;

  background:
    linear-gradient(
      145deg,
      rgba(36, 234, 255, 0.18),
      rgba(156, 99, 255, 0.18)
    );

  font-size: 30px;

  box-shadow:
    inset 0 0 18px rgba(36, 234, 255, 0.08),
    0 0 20px rgba(36, 234, 255, 0.12);
}

.brand-block h1 {
  margin: 0;

  font-size: clamp(24px, 2.3vw, 38px);
  line-height: 1;

  letter-spacing: 1.5px;

  background:
    linear-gradient(
      90deg,
      var(--cyan),
      #ffffff,
      var(--pink)
    );

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;
}

.brand-block p {
  margin: 7px 0 0;

  color: var(--muted);

  font-size: 13px;
  letter-spacing: 0.8px;
}


/* ================= LANGUAGE ================= */

.language-box {
  display: flex;

  padding: 4px;

  border: 1px solid rgba(36, 234, 255, 0.25);
  border-radius: 14px;

  background: rgba(2, 7, 25, 0.65);
}

.lang-btn {
  width: 52px;
  height: 36px;

  border: 0;
  border-radius: 10px;

  color: #9db2d8;
  background: transparent;

  font-weight: 800;

  cursor: pointer;
}

.lang-btn.active {
  color: #03111a;

  background:
    linear-gradient(
      135deg,
      var(--cyan),
      #8af5ff
    );

  box-shadow:
    0 0 16px rgba(36, 234, 255, 0.40);
}


/* =========================================================
   LANDSCAPE LAYOUT
   ========================================================= */

.game-layout {
  display: grid;

  grid-template-columns:
    minmax(220px, 0.82fr)
    minmax(420px, 1.55fr)
    minmax(220px, 0.82fr);

  gap: 18px;

  align-items: start;

  padding: 20px;
}


/* ================= PANELS ================= */

.panel {
  display: flex;
  flex-direction: column;

  gap: 15px;

  min-width: 0;
}

.mission-card,
.stats-card,
.tips-card,
.next-card,
.hold-card,
.power-card {
  position: relative;

  padding: 18px;

  border: 1px solid var(--border);
  border-radius: 20px;

  background:
    radial-gradient(
      circle at 100% 0,
      rgba(36, 234, 255, 0.09),
      transparent 35%
    ),
    linear-gradient(
      145deg,
      var(--panel2),
      var(--panel)
    );

  box-shadow: var(--shadow);
}

.section-label {
  display: inline-flex;

  padding: 5px 10px;

  border-radius: 999px;

  color: #fff;

  background:
    linear-gradient(
      90deg,
      var(--pink),
      var(--purple)
    );

  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;

  box-shadow:
    0 0 14px rgba(255, 66, 200, 0.28);
}


/* ================= MISSION ================= */

.mission-card h2 {
  margin: 15px 0 7px;

  font-size: 23px;
}

.mission-card p {
  min-height: 40px;

  margin: 0 0 17px;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.5;
}

.mission-progress {
  display: flex;
  align-items: center;

  gap: 10px;

  color: var(--cyan);

  font-size: 12px;
  font-weight: 800;
}

.progress-track {
  flex: 1;

  height: 9px;

  overflow: hidden;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  width: 0%;
  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      var(--cyan),
      var(--purple),
      var(--pink)
    );

  box-shadow:
    0 0 12px rgba(36, 234, 255, 0.55);

  transition: width 0.3s ease;
}


/* ================= STATS ================= */

.stats-card {
  padding: 8px 18px;
}

.stat-row {
  min-height: 51px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.06);
}

.stat-row:last-child {
  border-bottom: 0;
}

.stat-row span {
  color: var(--muted);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}

.stat-row strong {
  color: var(--cyan);

  font-size: 23px;
}


/* ================= TIP ================= */

.tips-card {
  border-color:
    rgba(255, 212, 71, 0.25);
}

.tips-card p {
  margin: 13px 0 0;

  color: #dce8ff;

  font-size: 13px;
  line-height: 1.5;
}


/* =========================================================
   CENTER BOARD
   ========================================================= */

.center-stage {
  width: 100%;

  display: flex;
  flex-direction: column;

  align-items: center;

  gap: 15px;
}

.board-frame {
  position: relative;

  width: min(100%, 550px);

  padding: 12px;

  border: 2px solid rgba(36, 234, 255, 0.55);
  border-radius: 25px;

  background:
    linear-gradient(
      145deg,
      rgba(22, 39, 91, 0.98),
      rgba(6, 13, 38, 0.98)
    );

  box-shadow:
    0 0 30px rgba(36, 234, 255, 0.18),
    0 25px 50px rgba(0, 0, 0, 0.40),
    inset 0 0 25px rgba(36, 234, 255, 0.05);
}

.board-top-glow {
  position: absolute;

  top: -2px;
  left: 15%;

  width: 70%;
  height: 2px;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--cyan),
      #fff,
      var(--pink),
      transparent
    );

  box-shadow:
    0 0 18px var(--cyan);
}


/*
   IMPORTANT:
   The board has its own aspect ratio.
   It is NOT forced to inherit the page height.
   This prevents the compressed-board problem.
*/

.game-board {
  width: 100%;

  aspect-ratio: 10 / 14;

  display: grid;

  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(14, 1fr);

  gap: 3px;

  padding: 5px;

  overflow: hidden;

  border-radius: 16px;

  background:
    linear-gradient(
      rgba(36, 234, 255, 0.025),
      rgba(156, 99, 255, 0.04)
    ),
    #07102b;

  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.55);
}


/* Cells will be created by game.js */

.cell {
  position: relative;

  min-width: 0;
  min-height: 0;

  display: grid;
  place-items: center;

  overflow: hidden;

  border:
    1px solid rgba(81, 129, 215, 0.16);

  border-radius: 6px;

  background:
    linear-gradient(
      145deg,
      rgba(25, 47, 102, 0.38),
      rgba(10, 21, 57, 0.38)
    );
}

.cell.filled {
  border-color:
    rgba(255, 255, 255, 0.25);

  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.07),
    0 0 10px rgba(36, 234, 255, 0.10);
}

.cell img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  border-radius: 5px;
}


/* Temporary colored pieces */

.tile-blue {
  background:
    linear-gradient(
      145deg,
      #36eaff,
      #1957dc
    ) !important;
}

.tile-pink {
  background:
    linear-gradient(
      145deg,
      #ff76df,
      #bb238f
    ) !important;
}

.tile-yellow {
  background:
    linear-gradient(
      145deg,
      #ffe66a,
      #dc8d00
    ) !important;
}

.tile-green {
  background:
    linear-gradient(
      145deg,
      #65ffc0,
      #069c68
    ) !important;
}

.tile-purple {
  background:
    linear-gradient(
      145deg,
      #c07cff,
      #6936d9
    ) !important;
}

.tile-red {
  background:
    linear-gradient(
      145deg,
      #ff7187,
      #c52248
    ) !important;
}


/* ================= CONTROLS ================= */

.controls {
  width: min(100%, 550px);

  display: grid;

  grid-template-columns:
    72px
    minmax(100px, 1fr)
    minmax(100px, 1fr)
    72px;

  gap: 9px;
}

.control-btn {
  min-height: 57px;

  border:
    1px solid rgba(36, 234, 255, 0.42);

  border-radius: 15px;

  color: #eafbff;

  background:
    linear-gradient(
      145deg,
      rgba(31, 53, 111, 0.95),
      rgba(13, 24, 61, 0.95)
    );

  font-size: 21px;
  font-weight: 900;

  cursor: pointer;

  box-shadow:
    0 9px 18px rgba(0, 0, 0, 0.22);

  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.control-btn:hover {
  transform: translateY(-2px);

  border-color: var(--cyan);

  box-shadow:
    0 0 18px rgba(36, 234, 255, 0.18);
}

.control-btn:active {
  transform: translateY(1px) scale(0.98);
}

.main-control {
  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  line-height: 1.05;
}

.main-control span {
  font-size: 13px;
  font-weight: 900;
}

.main-control small {
  margin-top: 4px;

  color: var(--cyan);

  font-size: 9px;
  font-weight: 800;
}

.drop-control {
  border-color:
    rgba(255, 66, 200, 0.48);
}

.drop-control small {
  color: #ff8cde;
}


/* =========================================================
   RIGHT PANEL
   ========================================================= */

.next-card,
.hold-card {
  text-align: center;
}

.mini-board {
  width: 110px;
  height: 88px;

  margin: 14px auto;

  display: grid;

  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);

  gap: 3px;

  padding: 7px;

  border:
    1px solid rgba(36, 234, 255, 0.22);

  border-radius: 13px;

  background:
    rgba(3, 9, 28, 0.75);
}

.mini-cell {
  border-radius: 4px;

  background:
    rgba(58, 86, 151, 0.15);
}

.secondary-btn {
  width: 100%;

  padding: 10px;

  border:
    1px solid rgba(156, 99, 255, 0.45);

  border-radius: 12px;

  color: #e7ddff;

  background:
    rgba(156, 99, 255, 0.12);

  font-size: 11px;
  font-weight: 900;

  cursor: pointer;
}


/* ================= POWER UPS ================= */

.power-grid {
  display: grid;

  gap: 9px;

  margin-top: 14px;
}

.power-btn {
  min-height: 48px;

  display: grid;

  grid-template-columns:
    34px
    1fr
    25px;

  align-items: center;

  gap: 8px;

  padding: 7px 9px;

  border:
    1px solid rgba(36, 234, 255, 0.20);

  border-radius: 12px;

  color: #dfeaff;

  background:
    rgba(6, 14, 40, 0.72);

  text-align: left;

  cursor: pointer;
}

.power-btn:hover {
  border-color: var(--cyan);

  background:
    rgba(36, 234, 255, 0.08);
}

.power-icon {
  font-size: 22px;
}

.power-btn span:nth-child(2) {
  font-size: 11px;
  font-weight: 800;
}

.power-btn b {
  width: 24px;
  height: 24px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  color: #06101c;

  background: var(--cyan);

  font-size: 11px;
}


/* ================= FOOTER ================= */

.game-footer {
  min-height: 62px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding: 12px 25px;

  border-top:
    1px solid rgba(36, 234, 255, 0.15);

  color: #a9bde0;

  background:
    rgba(3, 7, 21, 0.72);

  font-size: 12px;
  font-weight: 700;
}

.restart-btn {
  padding: 9px 18px;

  border:
    1px solid rgba(255, 66, 200, 0.40);

  border-radius: 11px;

  color: #ffd8f5;

  background:
    rgba(255, 66, 200, 0.10);

  font-size: 10px;
  font-weight: 900;

  cursor: pointer;
}


/* ================= MODAL ================= */

.modal {
  position: fixed;
  z-index: 1000;

  inset: 0;

  display: grid;
  place-items: center;

  padding: 20px;

  background:
    rgba(2, 5, 17, 0.78);

  backdrop-filter: blur(10px);
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(410px, 100%);

  padding: 30px;

  border:
    1px solid rgba(36, 234, 255, 0.42);

  border-radius: 25px;

  text-align: center;

  background:
    linear-gradient(
      145deg,
      #152354,
      #080e29
    );

  box-shadow:
    0 0 45px rgba(36, 234, 255, 0.18),
    0 30px 80px rgba(0, 0, 0, 0.60);
}

.modal-panther {
  font-size: 50px;
}

.modal-card h2 {
  margin: 10px 0;

  color: var(--pink);

  font-size: 32px;
}

.modal-card p {
  color: var(--muted);
}

.modal-score {
  margin: 20px 0;

  display: flex;
  flex-direction: column;

  gap: 4px;
}

.modal-score span {
  color: var(--muted);

  font-size: 11px;
  font-weight: 800;
}

.modal-score strong {
  color: var(--cyan);

  font-size: 36px;
}

.play-again-btn {
  width: 100%;

  padding: 14px;

  border: 0;
  border-radius: 14px;

  color: #06111a;

  background:
    linear-gradient(
      90deg,
      var(--cyan),
      var(--green)
    );

  font-size: 13px;
  font-weight: 900;

  cursor: pointer;

  box-shadow:
    0 0 22px rgba(36, 234, 255, 0.25);
}


/* =========================================================
   LAPTOP / SMALL LANDSCAPE
   We reduce surrounding UI, NOT the board into a pancake.
   ========================================================= */

@media (max-width: 1120px) {

  .game-shell {
    min-width: 900px;
  }

  .game-layout {
    grid-template-columns:
      200px
      minmax(400px, 1fr)
      200px;

    gap: 12px;

    padding: 14px;
  }

  .mission-card,
  .stats-card,
  .tips-card,
  .next-card,
  .hold-card,
  .power-card {
    padding: 13px;
  }

  .board-frame {
    width: min(100%, 500px);
  }

  .controls {
    width: min(100%, 500px);
  }
}
/* =========================================================
   PANTHER STACK — FIT ONE LANDSCAPE SCREEN
   ========================================================= */

@media (min-width: 900px) {

  body {
    overflow-y: hidden;
  }

  .game-shell {
    width: calc(100% - 24px);
    height: calc(100vh - 20px);
    min-height: 650px;
    margin: 10px auto;

    display: flex;
    flex-direction: column;
  }

  /* HEADER MÁS COMPACTO */
  .topbar {
    min-height: 68px;
    height: 68px;
    padding: 8px 22px;
    flex-shrink: 0;
  }

  .paw-logo {
    width: 46px;
    height: 46px;
    font-size: 24px;
  }

  .brand-block h1 {
    font-size: 27px;
  }

  .brand-block p {
    margin-top: 3px;
  }

  /* ZONA PRINCIPAL */
  .game-layout {
    flex: 1;
    min-height: 0;

    grid-template-columns:
      minmax(210px, 0.85fr)
      minmax(390px, 1.25fr)
      minmax(210px, 0.85fr);

    gap: 14px;

    padding: 12px 18px;
    overflow: hidden;
  }

  /* PANELES LATERALES */
  .panel {
    gap: 10px;
  }

  .mission-card,
  .stats-card,
  .tips-card,
  .next-card,
  .hold-card,
  .power-card {
    padding: 12px 14px;
    border-radius: 17px;
  }

  .mission-card h2 {
    margin: 9px 0 4px;
    font-size: 19px;
  }

  .mission-card p {
    min-height: 0;
    margin-bottom: 10px;
    font-size: 11px;
  }

  .stat-row {
    min-height: 40px;
  }

  .stat-row strong {
    font-size: 19px;
  }

  .tips-card p {
    margin-top: 8px;
    font-size: 11px;
  }

  /* CENTRO */
  .center-stage {
    height: 100%;
    min-height: 0;
    gap: 8px;
  }

  /*
     El tablero ahora depende de la ALTURA
     disponible de la pantalla.
  */
  .board-frame {
    width: auto;

    height: calc(100% - 64px);
    max-height: 690px;

    aspect-ratio: 10 / 11.5;

    padding: 9px;

    flex-shrink: 1;
  }

  .game-board {
    width: 100%;
    height: 100%;

    aspect-ratio: auto;
  }

  /* CONTROLES */
  .controls {
    width: min(100%, 520px);
    height: 56px;

    grid-template-columns:
      65px
      minmax(100px, 1fr)
      minmax(100px, 1fr)
      65px;

    flex-shrink: 0;
  }

  .control-btn {
    min-height: 52px;
  }

  /* NEXT / HOLD */
  .mini-board {
    width: 88px;
    height: 68px;
    margin: 8px auto;
  }

  .secondary-btn {
    padding: 7px;
  }

  .power-grid {
    margin-top: 8px;
    gap: 6px;
  }

  .power-btn {
    min-height: 39px;
    padding: 5px 8px;
  }

  .power-icon {
    font-size: 18px;
  }

  /* FOOTER */
  .game-footer {
    min-height: 46px;
    height: 46px;

    padding: 7px 22px;

    flex-shrink: 0;
  }
}
/* =========================================================
   PANTHER TILE IMAGES
   ========================================================= */

.cell img {
  width: 92%;
  height: 92%;

  object-fit: contain;

  object-position: center;

  border-radius: 6px;

  pointer-events: none;

  filter:
    drop-shadow(0 0 5px rgba(255,255,255,0.18))
    drop-shadow(0 0 8px rgba(36,234,255,0.14));
}

.mini-cell img {
  width: 100%;
  height: 100%;

  object-fit: contain;

  object-position: center;

  border-radius: 4px;

  pointer-events: none;
}
/* =========================================================
   SPECIAL PIECE EFFECTS
   ========================================================= */

.game-board.effect-bomb {
  animation: bombPulse 0.5s ease;
}

.game-board.effect-rainbow {
  animation: rainbowPulse 0.55s ease;
}

.game-board.effect-coin {
  animation: coinPulse 0.5s ease;
}

@keyframes bombPulse {

  0% {
    filter: brightness(1);
  }

  35% {
    filter:
      brightness(1.8)
      saturate(1.6);

    box-shadow:
      inset 0 0 45px rgba(255, 60, 70, 0.75),
      0 0 30px rgba(255, 60, 70, 0.55);
  }

  100% {
    filter: brightness(1);
  }

}

@keyframes rainbowPulse {

  0% {
    filter: hue-rotate(0deg);
  }

  50% {
    filter:
      hue-rotate(180deg)
      brightness(1.45)
      saturate(1.8);

    box-shadow:
      inset 0 0 40px rgba(255,255,255,0.32),
      0 0 32px rgba(180,90,255,0.5);
  }

  100% {
    filter: hue-rotate(360deg);
  }

}

@keyframes coinPulse {

  0% {
    filter: brightness(1);
  }

  45% {
    filter:
      brightness(1.6)
      saturate(1.5);

    box-shadow:
      inset 0 0 40px rgba(255,215,70,0.55),
      0 0 32px rgba(255,215,70,0.55);
  }

  100% {
    filter: brightness(1);
  }

}
.game-board.effect-bomb {
  animation: bombPulse 0.5s ease;
}

.game-board.effect-rainbow {
  animation: rainbowPulse 0.55s ease;
}

.game-board.effect-coin {
  animation: coinPulse 0.5s ease;
}

@keyframes bombPulse {
  0% {
    filter: brightness(1);
  }

  35% {
    filter:
      brightness(1.8)
      saturate(1.6);

    box-shadow:
      inset 0 0 45px rgba(255, 60, 70, 0.75),
      0 0 30px rgba(255, 60, 70, 0.55);
  }

  100% {
    filter: brightness(1);
  }
}

@keyframes rainbowPulse {
  0% {
    filter: hue-rotate(0deg);
  }

  50% {
    filter:
      hue-rotate(180deg)
      brightness(1.45)
      saturate(1.8);

    box-shadow:
      inset 0 0 40px rgba(255,255,255,0.32),
      0 0 32px rgba(180,90,255,0.5);
  }

  100% {
    filter: hue-rotate(360deg);
  }
}

@keyframes coinPulse {
  0% {
    filter: brightness(1);
  }

  45% {
    filter:
      brightness(1.6)
      saturate(1.5);

    box-shadow:
      inset 0 0 40px rgba(255,215,70,0.55),
      0 0 32px rgba(255,215,70,0.55);
  }

  100% {
    filter: brightness(1);
  }
}
/* POWER-UP IMAGE SIZE FIX */

.power-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
  border-radius: 8px;
}

.power-icon img {
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  object-fit: cover !important;
  display: block;
}
/* Left column cards only */
.mission-card,
.stats-card,
.tips-card {
  width: 72%;
  justify-self: start;
}
/* =========================================================
   PANTHER MASCOT
   Decorative only - does NOT affect game layout
   ========================================================= */

.panther-mascot-wrap {
  position: absolute;
  left: 250px;
  bottom: 18px;

  width: 300px;
  height: auto;

  display: flex;
  justify-content: center;
  align-items: flex-end;

  margin: 0;

  pointer-events: none;
  z-index: 2;
}

.panther-mascot {
  width: 210px;
  max-width: 100%;
  height: auto;
  display: block;

  filter:
    drop-shadow(0 0 12px rgba(36, 234, 255, 0.30))
    drop-shadow(0 0 24px rgba(217, 65, 255, 0.20));
}
/* Power-up descriptions */

.power-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.power-copy > span {
  font-weight: 800;
}

.power-copy small {
  font-size: 10px;
  line-height: 1.15;
  font-weight: 500;
  opacity: 0.72;
  white-space: nowrap;
}

/* =========================================================
   HOW TO PLAY — informational UI only
   ========================================================= */
.how-to-play-btn {
  align-self: flex-start;
  width: 180px;
  height: 44px;
  margin: 2px 0 0 18px;
  padding: 0 14px;
  border: 1px solid rgba(36, 234, 255, 0.95);
  border-radius: 14px;
  background: linear-gradient(135deg, #20d9f3 0%, #39efb4 100%);
  box-shadow:
    0 0 9px rgba(36, 234, 255, 0.55),
    0 0 20px rgba(36, 234, 255, 0.22);
  color: #071126;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.055em;
  cursor: pointer;
  position: relative;
  z-index: 5;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.how-to-play-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 0 13px rgba(36, 234, 255, 0.82),
    0 0 27px rgba(36, 234, 255, 0.34);
}

.how-to-play-btn:active {
  transform: translateY(0) scale(0.97);
}

.tutorial-card {
  width: min(520px, 100%);
  max-height: min(760px, 90vh);
  overflow-y: auto;
  text-align: left;
}

.tutorial-card .modal-panther,
.tutorial-card h2,
.tutorial-card .tutorial-intro,
.tutorial-card .tutorial-mission {
  text-align: center;
}

.tutorial-content {
  display: grid;
  gap: 7px;
  margin: 18px 0;
}

.tutorial-row {
  padding: 8px 10px;
  border: 1px solid rgba(36, 234, 255, 0.14);
  border-radius: 10px;
  background: rgba(10, 28, 67, 0.48);
  color: #eef8ff;
  font-size: 13px;
  line-height: 1.25;
}

.tutorial-mission {
  color: #22eaff;
  font-weight: 900;
}

.tutorial-card .play-again-btn {
  display: block;
  margin: 16px auto 0;
}


/* HOW TO PLAY button — final visual override only */
#how-to-play-btn.how-to-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: flex-start;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  height: 44px;
  min-height: 44px;
  margin: 2px 0 0 18px;
  padding: 0 14px;
  border: 1px solid #24eaff;
  border-radius: 14px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(135deg, #20d9f3 0%, #39efb4 100%);
  color: #071126;
  box-shadow: 0 0 9px rgba(36,234,255,.55), 0 0 20px rgba(36,234,255,.22);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .055em;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  z-index: 5;
}
#how-to-play-btn.how-to-play-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 0 13px rgba(36,234,255,.82), 0 0 27px rgba(36,234,255,.34);
}
#how-to-play-btn.how-to-play-btn:active {
  transform: scale(.97);
}


/* =========================================================
   HOW TO PLAY — compact modal refinement
   Presentation only. No gameplay/audio changes.
   ========================================================= */
#how-to-play-btn.how-to-play-btn {
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  height: 46px;
  min-height: 46px;
  margin-left: 18px;
  border-radius: 15px;
  font-size: 13px;
  letter-spacing: .07em;
}

#tutorial-modal.modal {
  padding: 16px 24px;
  overflow: hidden;
}

#tutorial-modal .tutorial-card {
  width: min(690px, calc(100vw - 48px));
  max-height: none;
  overflow: visible;
  padding: 22px 26px 24px;
  border-radius: 24px;
  box-sizing: border-box;
}

#tutorial-modal .tutorial-card h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
}

#tutorial-modal .tutorial-intro {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.25;
}

#tutorial-modal .tutorial-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 12px 0 14px;
}

#tutorial-modal .tutorial-row {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.2;
  box-sizing: border-box;
}

#tutorial-modal .tutorial-mission {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.2;
}

#tutorial-modal .tutorial-card .play-again-btn {
  width: 100%;
  margin: 14px auto 0;
  padding: 13px 14px;
}

@media (max-width: 620px) {
  #tutorial-modal.modal {
    padding: 12px;
    overflow-y: auto;
  }

  #tutorial-modal .tutorial-card {
    width: min(520px, calc(100vw - 24px));
    padding: 18px;
  }

  #tutorial-modal .tutorial-content {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #tutorial-modal .tutorial-row {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 12px;
  }
}


@media(min-width:900px){body{overflow:auto}.game-shell{height:calc(100dvh - 20px);min-height:600px;overflow:hidden}.game-layout{flex:1;min-height:0;overflow:hidden}.center-stage{height:100%;min-height:0;display:flex;flex-direction:column;align-items:center}.board-frame{height:calc(100% - 76px);max-height:690px;min-height:0;width:auto;aspect-ratio:10 / 11.5;flex:none}.controls{height:56px;flex:none;margin:0}.game-footer{flex:none;position:relative}.left-panel,.right-panel{max-height:100%;overflow-y:auto}.game-board{height:100%;width:100%}}
