/* ===================== HERRAMIENTAS GRATIS · jugarlasvegas.com ===================== */
:root {
  --az-oscuro: #020D26;
  --az-marino: #061A3A;
  --az-tarjeta: #082650;
  --az-tarjeta-2: #0B2F63;
  --az-electrico: #168BFF;
  --rojo: #F01636;
  --rojo-2: #FF2147;
  --dorado: #F5B82E;
  --verde: #22C77A;
  --blanco: #FFFFFF;
  --gris: #DCE7F5;
  --gris-2: #9FB2CE;
  --borde: rgba(255,255,255,.09);
  --radio: 18px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--az-oscuro); }
body {
  min-height: 100vh; color: var(--blanco); font-family: 'Montserrat', sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(22,139,255,.18), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(240,22,54,.14), transparent 60%),
    var(--az-oscuro);
  overflow-x: hidden;
}
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }
.contenedor { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ---- Cabecera (igual a la de la página principal) ---- */
.h-header { position: sticky; top: 0; z-index: 100; background: rgba(2,13,38,.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.h-header-cont { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.h-header-inner { display: flex; align-items: center; justify-content: space-between; height: 100px; }
.h-logo { position: relative; z-index: 5; display: flex; align-items: center; align-self: stretch; padding-top: 10px; flex-shrink: 0; }
.h-logo img { display: block; width: auto; height: 112px; transform: translateY(5px); }
.h-nav { display: flex; align-items: center; gap: 27px; margin: 0 28px; }
.h-nav a { position: relative; color: var(--gris); text-decoration: none; font-weight: 600; font-size: 15px; padding-bottom: 6px; white-space: nowrap; transition: color .2s ease; }
.h-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--rojo-2); border-radius: 2px; transform: scaleX(0); transition: transform .2s ease; }
.h-nav a:hover { color: #fff; }
.h-nav a:hover::after, .h-nav a.activo::after { transform: scaleX(1); }
.h-nav a.activo { color: var(--rojo-2); }
.h-nav-jugar-movil { display: none !important; }
.h-acciones { display: flex; align-items: center; flex-shrink: 0; }
.h-btn-jugar { display: inline-flex; align-items: center; padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 14px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #F01636, #FF2147); box-shadow: 0 0 22px rgba(255,33,71,.45); transition: transform .2s ease; white-space: nowrap; }
.h-btn-jugar:hover { transform: translateY(-2px); }
.h-menu-btn { display: none; position: relative; z-index: 102; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: rgba(255,255,255,.05); cursor: pointer; }
.h-menu-btn span { position: absolute; left: 11px; width: 20px; height: 2px; border-radius: 2px; background: #fff; transition: transform .25s ease, opacity .2s ease, top .25s ease; }
.h-menu-btn span:nth-child(1) { top: 13px; } .h-menu-btn span:nth-child(2) { top: 20px; } .h-menu-btn span:nth-child(3) { top: 27px; }
.h-menu-btn.activo span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.h-menu-btn.activo span:nth-child(2) { opacity: 0; }
.h-menu-btn.activo span:nth-child(3) { top: 20px; transform: rotate(-45deg); }
@media (min-width: 1041px) and (max-width: 1240px) {
  .h-nav { gap: clamp(14px, calc(6vw - 48px), 27px); }
  .h-nav a { font-size: 14px; }
  .h-logo img { height: 96px; }
}
@media (max-width: 1040px) {
  .h-header-cont { padding: 0 24px; }
  .h-header-inner { height: 88px; }
  .h-logo { padding-top: 7px; }
  .h-logo img { height: 90px; transform: translateY(4px); }
  .h-menu-btn { display: block; }
  .h-acciones { margin-left: auto; margin-right: 10px; }
  .h-nav { position: fixed; top: 88px; left: 0; right: 0; margin: 0; flex-direction: column; align-items: stretch; gap: 0; max-height: 0; padding: 0 24px;
    overflow: hidden; visibility: hidden; opacity: 0; background: rgba(2,13,38,.98); border-bottom: 1px solid rgba(22,139,255,.3); box-shadow: 0 18px 38px rgba(0,0,0,.38);
    transition: max-height .32s ease, padding .32s ease, opacity .22s ease, visibility .22s ease; }
  .h-nav.abierto { max-height: calc(100vh - 88px); padding-top: 14px; padding-bottom: 22px; overflow-y: auto; visibility: visible; opacity: 1; }
  .h-nav a { width: 100%; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 14px; }
  .h-nav a::after { display: none; }
  .h-nav-jugar-movil { display: flex !important; justify-content: center; margin-top: 12px; padding: 13px 18px !important; border-radius: 8px; border-bottom: 0 !important;
    background: linear-gradient(135deg,#F01636,#FF2147); color: #fff !important; }
}
@media (max-width: 560px) {
  .h-acciones { display: none; }
  .h-menu-btn { margin-left: auto; }
  .h-logo img { height: 74px; }
}

/* ---- Íconos SVG ---- */
.ico { width: 18px; height: 18px; flex-shrink: 0; }
.h-btn .ico { width: 17px; height: 17px; }
.h-btn.chico .ico { width: 15px; height: 15px; }

/* ---- Títulos ---- */
.h-titulo { font-family: 'Anton', sans-serif; font-size: clamp(32px, 4.4vw, 54px); text-transform: uppercase; line-height: 1; letter-spacing: .5px; }
.h-titulo span { color: var(--rojo-2); }
.h-sub { color: var(--gris-2); font-size: 15px; margin-top: 10px; line-height: 1.5; max-width: 640px; }
.h-cabeza { padding: 34px 0 22px; }
.h-etiqueta { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--dorado); margin-bottom: 10px; }

/* ---- Tarjetas y botones ---- */
.h-card { background: linear-gradient(160deg, var(--az-tarjeta), var(--az-marino)); border: 1px solid var(--borde); border-radius: var(--radio); padding: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.28); }
.h-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px;
  font-weight: 700; font-size: 14px; border: none; cursor: pointer; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.08); transition: transform .15s, background .2s, filter .2s; white-space: nowrap;
}
.h-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.14); }
.h-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.h-btn.rojo { background: var(--rojo); }
.h-btn.rojo:hover { background: var(--rojo-2); }
.h-btn.azul { background: var(--az-electrico); }
.h-btn.azul:hover { filter: brightness(1.1); }
.h-btn.dorado { background: var(--dorado); color: #1b1300; }
.h-btn.grande { padding: 16px 28px; font-size: 16px; border-radius: 12px; }
.h-btn.chico { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.h-btn svg { width: 17px; height: 17px; }
.h-btn.activo { background: var(--verde); }

.h-campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.h-campo label { font-size: 12.5px; font-weight: 700; color: var(--gris-2); text-transform: uppercase; letter-spacing: .5px; }
.h-campo input, .h-campo select, .h-campo textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25); color: #fff; font-size: 15px;
}
.h-campo textarea { resize: vertical; min-height: 120px; line-height: 1.45; }
.h-campo input:focus, .h-campo textarea:focus, .h-campo select:focus { outline: 2px solid var(--az-electrico); outline-offset: 1px; }
.h-check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--gris); cursor: pointer; margin-bottom: 10px; }
.h-check input { width: 18px; height: 18px; accent-color: var(--rojo); }
.h-nota { font-size: 12.5px; color: var(--gris-2); line-height: 1.5; }

/* ---- Portada de herramientas ---- */
.h-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 20px; align-items: center; padding: 30px 0 10px; }
.h-hero > div, .h-cabeza { min-width: 0; }
.h-hero-lobo { max-height: 360px; max-width: 100%; height: auto; width: auto; justify-self: center; filter: drop-shadow(0 20px 40px rgba(0,0,0,.5)); }
.h-grid-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 10px 0 50px; }
.h-tool { display: flex; flex-direction: column; gap: 12px; text-decoration: none; transition: transform .2s, border-color .2s; }
.h-tool:hover { transform: translateY(-4px); border-color: rgba(240,22,54,.5); }
.h-tool-icono { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.h-tool h2 { font-size: 20px; font-weight: 800; }
.h-tool p { color: var(--gris-2); font-size: 14px; line-height: 1.5; flex: 1; }
.h-tool .ir { color: var(--rojo-2); font-weight: 700; font-size: 14px; }
.h-usos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.h-usos span { background: rgba(255,255,255,.06); border: 1px solid var(--borde); padding: 6px 12px; border-radius: 20px; font-size: 13px; color: var(--gris); }

.h-footer { border-top: 1px solid var(--borde); padding: 22px 0 30px; color: var(--gris-2); font-size: 13px; text-align: center; }
.h-footer a { color: var(--gris); }

/* ---- Toast ---- */
.h-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: #0f2b57; border: 1px solid var(--borde); padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 200; transition: all .25s; pointer-events: none; }
.h-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Modal ---- */
.h-modal { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(1,6,20,.75); backdrop-filter: blur(4px); }
.h-modal[hidden] { display: none; }
.h-modal-caja { width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; background: linear-gradient(160deg, #0c2c5c, #051633); border: 1px solid var(--borde); border-radius: 20px; padding: 24px; position: relative; text-align: center; animation: modalIn .25s cubic-bezier(.2,1.4,.4,1); }
@keyframes modalIn { from { transform: scale(.9); opacity: 0; } }
.h-modal-cerrar { display: flex; align-items: center; justify-content: center; position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(255,255,255,.08); color: #fff; font-size: 16px; cursor: pointer; }

/* ---- Cartón (compartido por cantador / cartones / cartón virtual) ---- */
.carton { background: #fff; color: #0a1a3a; border-radius: 14px; padding: 12px; width: 100%; max-width: 340px; margin: 0 auto; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.carton-titulo { text-align: center; font-weight: 800; font-size: 14px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; color: #0a1a3a; min-height: 1em; }
.carton-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.carton-grid .letra { display: flex; align-items: center; justify-content: center; line-height: 1.15; text-align: center; font-family: 'Anton', sans-serif; font-size: 24px; color: #fff; border-radius: 6px; padding: 2px 0; }
.carton-grid .letra.b { background: #F01636; } .carton-grid .letra.i { background: #F5A300; } .carton-grid .letra.n { background: #22A95A; }
.carton-grid .letra.g { background: #168BFF; } .carton-grid .letra.o { background: #8B3DFF; }
.carton-grid .celda { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 2px solid #d5deec; border-radius: 6px; font-weight: 800; font-size: 20px; background: #fff; color: #0a1a3a; user-select: none; position: relative; }
.carton-grid .celda.libre { background: #FFF4D6; color: #b07a00; font-size: 11px; font-weight: 900; text-align: center; line-height: 1.1; }
.carton-grid .celda.marcada { background: #F01636; border-color: #F01636; color: #fff; }
.carton-grid .celda.marcada::after { content: ''; position: absolute; inset: 14%; border-radius: 50%; border: 3px solid rgba(255,255,255,.55); }
.carton-grid .celda.libre.marcada { background: #F5B82E; border-color: #F5B82E; color: #1b1300; }
.carton-pie { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: #51607a; margin-top: 6px; }

@media (max-width: 900px) {
  .h-grid-tools { grid-template-columns: 1fr; }
  .h-hero { grid-template-columns: minmax(0, 1fr); }
  .h-hero-lobo { max-height: 240px; order: -1; }
}
@media (max-width: 760px) {
  .contenedor { padding: 0 16px; }
  .h-titulo { font-size: clamp(30px, 9vw, 40px); overflow-wrap: break-word; }
}

/* ===== Luces tipo Las Vegas en el borde inferior del header (igual que la página principal) ===== */
.luces-vegas { position: absolute; top: calc(100% - 8px); left: 0; width: 100%; height: 16px; z-index: 4; pointer-events: none; }
.luces-vegas svg { display: block; width: 100%; height: 100%; overflow: visible; }
.luces-vegas .bombilla { fill: #fff4bd; filter: drop-shadow(0 0 4px #ffb700) drop-shadow(0 0 8px #ff4800); animation: parpadeoVegas 2s infinite alternate; }
@keyframes parpadeoVegas { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
.h-header:has(.h-nav.abierto) .luces-vegas { display: none; }
@media (max-width: 768px) { .luces-vegas { top: calc(100% - 7px); height: 14px; } }
@media (prefers-reduced-motion: reduce) { .luces-vegas .bombilla { animation: none; } }
