/*
  Los 4 tamaños de pantalla (se elige por el ancho de la ventana):
    320x240   TFT pequeña (ODROID)
    800x480   pantalla mediana
    1024x600  pantalla compacta
    1366x480  pantalla grande
  #app fija el tamaño del marco y el font-size base; el resto va en em (player.css).
  Inicio como en fe-player-screen-2: 800x480 = anillo + 2 botones apilados; 1024x600 = anillo + 2 botones
  apilados + cupones; 1366x480 = anillo + 2 botones lado a lado + cupones.
*/

/* ---------- 800x480 (base) ---------- */
#app {
  width: 800px;
  height: 480px;
  font-size: 16px;
}

/* ---------- 1024x600 ---------- */
@media (min-width: 1001px) and (max-width: 1279px) {
  #app {
    width: 1024px;
    height: 600px;
    font-size: 20px;
  }
  #banner { font-size: 24px; height: 56px; }
  #hdr { height: 60px; }
  #hdrBox { height: 60px; }
  #hdrMain { width: 916px; height: 60px; }
  #hdrInner { height: 60px; }
  #hdrRight { width: 60px; height: 60px; }
  #menuBtn { width: 60px; height: 60px; padding: 16px; border-radius: 13px; }
  #menuBtn .bar { margin-bottom: 7px; }
  #menuBtn .bar:last-child { margin-bottom: 0; }
  .btn-back { width: 38px; height: 38px; font-size: 32px; line-height: 34px; }
  #hdrIcon { width: 48px; height: 48px; line-height: 48px; }
  #hdrIcon img { height: 30px; }
  #hdrSub { font-size: 12px; line-height: 14px; }
  #hdrTitle { max-width: 480px; font-size: 34px; line-height: 36px; }
  #hdrLevel { font-size: 22px; line-height: 30px; }
  #hdrChip { padding: 5px 16px 5px 5px; }
  #hdrStar { width: 40px; height: 40px; line-height: 40px; }
  #hdrStar img { height: 24px; }
  #hdrPoints { font-size: 32px; line-height: 38px; }
  #body { height: 492px; }
  #dashLeft { width: 49%; }
  #dashSide { width: 49%; }
  #ringBox { width: 17em; height: 17em; }
  #actRow { height: 52%; }
  .act { height: 44%; margin-bottom: 12px; }
  .act-cta { display: block; }
  #cpnBox { display: block; height: 44%; margin-top: 12px; }
}

/* ---------- 1366x480 ---------- */
@media (min-width: 1280px) {
  #app {
    width: 1366px;
    height: 480px;
    font-size: 16px;
  }
  #banner { font-size: 24px; height: 64px; }
  #hdr { height: 60px; }
  #hdrBox { height: 60px; }
  #hdrMain { width: 1266px; height: 60px; }
  #hdrInner { height: 60px; }
  #hdrRight { width: 60px; height: 60px; }
  #menuBtn { width: 60px; height: 60px; padding: 15px; border-radius: 13px; }
  #menuBtn .bar { margin-bottom: 7px; }
  #menuBtn .bar:last-child { margin-bottom: 0; }
  .btn-back { width: 38px; height: 38px; font-size: 32px; line-height: 34px; }
  #hdrIcon { width: 50px; height: 50px; line-height: 50px; }
  #hdrIcon img { height: 30px; }
  #hdrSub { font-size: 12px; line-height: 14px; }
  #hdrTitle { max-width: 600px; font-size: 36px; line-height: 38px; }
  #hdrLevel { font-size: 23px; line-height: 30px; }
  #hdrChip { padding: 4px 16px 4px 4px; }
  #hdrStar { width: 41px; height: 41px; line-height: 41px; }
  #hdrStar img { height: 24px; }
  #hdrPoints { font-size: 34px; line-height: 40px; }
  #body { height: 380px; }
  #dashLeft { width: 45%; }
  #dashSide { width: 53%; }
  #ringBox { width: 21em; height: 21em; }
  #actRow { height: 44%; }
  .act { float: left; width: 48.5%; height: 100%; margin-bottom: 0; }
  .act-mini { float: right; }
  .act-cta { display: block; }
  #cpnBox { display: block; height: 52%; margin-top: 12px; }
  #wheelArea { width: 54%; }
  #roulPanel { width: 44%; }
}

/* ---------- 320x240 ---------- */
@media (max-width: 480px) {
  #app {
    width: 320px;
    height: 240px;
    font-size: 10px;
  }
  #banner { font-size: 0.85em; height: 28px; }

  #chrome { padding: 1em; }
  #hdr { height: 32px; }
  #hdrBox { height: 32px; }
  #hdrMain { width: 260px; height: 32px; }
  #hdrInner { height: 32px; }
  #hdrRight { width: 32px; height: 32px; }
  #menuBtn { width: 32px; height: 32px; padding: 7px; border-radius: 8px; }
  #menuBtn .bar { margin-bottom: 3px; }
  #menuBtn .bar:last-child { margin-bottom: 0; }
  .btn-back { width: 24px; height: 24px; font-size: 20px; line-height: 20px; }
  #hdrIcon { width: 26px; height: 26px; line-height: 26px; }
  #hdrIcon img { height: 16px; }
  #hdrSub { font-size: 8px; line-height: 10px; }
  #hdrTitle { max-width: 150px; font-size: 15px; line-height: 17px; }
  #hdrLevel { font-size: 14px; line-height: 18px; }
  #hdrChip { padding: 2px 8px 2px 2px; }
  #hdrStar { width: 20px; height: 20px; line-height: 20px; }
  #hdrStar img { height: 13px; }
  #hdrPoints { font-size: 15px; line-height: 20px; }
  #body { height: 180px; }
  #hdrLevel { display: none !important; }

  /* Inicio: solo el anillo (el resto está en el menú) */
  #dashSide { display: none; }
  #dashLeft { width: 100%; }
  #ringBox { width: 11.5em; height: 11.5em; }
  #sessPoints { font-size: 2.8em; }
  #sessPoints.digits-6 { font-size: 2.3em; }
  #sessPoints.digits-7 { font-size: 2em; }
  #sessPoints.digits-8 { font-size: 1.7em; }
  #sessPts { font-size: 0.9em; margin-top: 0.2em; }
  #sessLabel { font-size: 1em; }

  /* Menú: 4 columnas x 2 filas */
  #menu { padding: 1em; }
  #menuClose { width: 1.75em; height: 1.75em; font-size: 2em; line-height: 1.4em; margin-bottom: 0.4em; border-radius: 0.6em; }
  .menu-card { height: 7.8em; padding-top: 0.7em; border-radius: 1em; }
  .menu-ico { width: 3em; height: 3em; line-height: 3em; border-radius: 1em; margin-bottom: 0.3em; }
  .menu-ico img { height: 1.8em; }
  .menu-label { font-size: 1.1em; }

  /* Listas: en vertical, una fila por producto */
  .hscroll { overflow-x: hidden; overflow-y: auto; white-space: normal; }
  .pcard {
    display: block;
    width: auto;
    height: auto;
    min-height: 5em;
    margin: 0 0.4em 0.5em 0;
    padding: 0.5em 6.6em 0.5em 0.5em;
    text-align: left;
    border-radius: 1em;
  }
  .pcard-stock { position: static; display: inline-block; margin-top: 0.2em; font-size: 0.9em; }
  .pcard-photo { float: left; width: 4em; height: 4em; margin: 0 0.6em 0 0; line-height: 3.8em; }
  .pcard-name { height: auto; max-height: 2.3em; font-size: 1.4em; }
  .pcard-extra { font-size: 1.2em; margin-top: 0; }
  .pcard:after { content: ''; display: block; clear: both; }
  .pcard-btn {
    left: auto;
    right: 0.5em;
    top: 50%;
    bottom: auto;
    width: 5.6em;
    margin-top: -1.2em;
    padding: 0.3em 0.2em;
    font-size: 1.1em;
  }
  .promo-card { padding: 0.6em 0.7em; width: auto; }
  .promo-title { font-size: 1.4em; }
  .promo-text { margin-top: 0.3em; font-size: 1.1em; }
  .promo-extra { margin-top: 0.3em; }
  .cupon-card { min-height: 0; padding-right: 0.5em; }
  .cupon-qty { font-size: 2.4em; line-height: 1.1; }
  .mini-wheel { display: none; }
  .mini-badge { margin: 0; }
  .msg-title { font-size: 1.5em; }
  .msg-desc { font-size: 1.05em; }

  /* Ruleta */
  #wheelArea { width: 55%; }
  #roulPanel { width: 43%; padding: 0.3em; }
  #roulEyebrow { display: none; }
  #roulTitle { margin-top: 0.4em; font-size: 1.5em; }
  #roulSub { display: none; }
  #roulSpins { margin: 0.5em 0; font-size: 1.2em; }
  #roulBtn { width: 92%; font-size: 1.2em; padding: 0.35em 0.2em; }
  #wheelPointer { border-left-width: 0.6em; border-right-width: 0.6em; border-top-width: 1.2em; margin-left: -0.6em; }

  /* Modal y publicidad */
  #modalBox { width: 94%; padding: 0.8em 1em; }
  #modalTitle { font-size: 1.6em; }
  #modalText { font-size: 1.2em; }
  #ovLogo { max-height: 4.5em; max-width: 12em; }
  #ovSala { font-size: 1.6em; }
  #ovTitle { font-size: 1.2em; }

  /* Cupones totales: una fila compacta (nombre, cantidad y texto) */
  .cupon-card { padding: 0.6em 0.8em; min-height: 0; }
  .cupon-card div:nth-child(2) { display: none; }
  .cupon-name { font-size: 1.4em; margin-right: 3.6em; }
  .cupon-qty { float: right; margin-top: -0.35em; font-size: 2.4em; line-height: 1; }
  .cupon-label { font-size: 1em; }

  /* Minijuegos: botón con el texto en una línea */
  .mini-card { padding-right: 8.6em; min-height: 4.6em; }
  .mini-card .pcard-btn { width: 7.6em; margin-top: -1.2em; white-space: nowrap; }
}

/* ===== Menú 3 x 2 en los otros tamaños ===== */
/* 1024x600: ancho útil 984, alto útil 560; cerrar = 60 px */
@media (min-width: 1001px) and (max-width: 1279px) {
  #menuClose { width: 60px; height: 60px; border-radius: 13px; line-height: 58px; }
  #menuGrid { width: 992px; }
  .menu-card { width: 322.6px; height: 242px; padding-top: 52px; border-radius: 24px; }
  .menu-ico { width: 88px; height: 88px; margin-bottom: 12px; border-radius: 26px; line-height: 88px; }
  .menu-ico img { height: 50px; }
  .menu-label { font-size: 32px; }
}
/* 1366x480: ancho útil 1334, alto útil 448; cerrar = 56 px */
@media (min-width: 1280px) {
  #menuClose { width: 56px; height: 56px; border-radius: 12px; line-height: 54px; }
  #menuGrid { width: 1342px; }
  .menu-card { width: 439.3px; height: 188px; padding-top: 37px; }
}
/* 320x240: ancho útil 300, alto útil 220; cerrar = 32 px, separación 6 px */
@media (max-width: 480px) {
  #menuClose { width: 32px; height: 32px; margin: 0 0 6px 6px; border-radius: 8px; line-height: 30px; }
  #menuGrid { width: 306px; }
  .menu-card { width: 96px; height: 88px; margin: 0 6px 6px 0; padding-top: 18px; border-radius: 12px; }
  .menu-ico { width: 34px; height: 34px; margin: 0 auto 5px; border-radius: 10px; line-height: 34px; }
  .menu-ico img { height: 20px; }
  .menu-label { font-size: 11px; }
}

/* Jackpots en 320x240 */
@media (max-width: 480px) {
  .jack-row { height: 3.8em; margin-bottom: 0.4em; padding: 0 0.8em; border-radius: 1em; }
  .jack-ico { width: 2.4em; height: 2.4em; line-height: 2.4em; border-radius: 0.7em; }
  .jack-ico img { height: 1.4em; }
  .jack-cell-info { padding-left: 0.6em; }
  .jack-amount { font-size: 1.5em; }
  .jack-name { font-size: 0.8em; }
  .jack-cell-date { font-size: 0.9em; }
}
