/* Fuentes locales (subconjunto latin de Google Fonts, licencia OFL en fonts/) */
@font-face {
    font-family: 'Black Ops One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/black-ops-one-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Una regla por peso, como Google Fonts: así font-bold (700) sigue usando 800 */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/inter-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(../fonts/inter-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(../fonts/inter-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url(../fonts/inter-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
    --neon-red: #ff1e42;
    --neon-blue: #00d2ff;
    --neon-green: #00ff66;
    --neon-yellow: #ffea00;
    --neon-purple: #b829ff;
}
/* Online room browser */
.room-browser { min-height: 0; padding: 22px 18px 36px; }
.rooms-shell { width: 100%; max-width: 900px; margin: 0 auto; }
.rooms-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rooms-heading { margin: 30px 0; }
.rooms-eyebrow { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: #f87171; }
.rooms-heading h1 { font-family: 'Black Ops One', cursive; font-size: clamp(28px, 5vw, 44px); line-height: 1.2; margin: 8px 0; }
.rooms-heading p, .rooms-help { font-size: 12px; line-height: 1.6; color: #a1a1aa; }
.rooms-list-toolbar { margin-bottom: 16px; flex-wrap: wrap; }
.rooms-list-toolbar h2, .room-create-panel h2 { font-size: 14px; font-weight: 800; }
.rooms-count { display: inline-block; margin-left: 6px; padding: 2px 8px; background: #450a0a; border-radius: 7px; color: #fca5a5; }
.rooms-primary, .rooms-secondary, .kick-button { border-radius: 10px; padding: 10px 14px; font-size: 12px; font-weight: 800; transition: background .15s, transform .15s; }
.rooms-primary { color: #fff; background: #dc2626; border: 1px solid #ef4444; }
.rooms-primary:hover { background: #b91c1c; }
.rooms-secondary { background: #18181b; color: #d4d4d8; border: 1px solid #3f3f46; }
.rooms-secondary:hover { background: #27272a; }
.rooms-primary:active, .rooms-secondary:active, .kick-button:active { transform: scale(.97); }
.rooms-primary:disabled, .rooms-secondary:disabled, .kick-button:disabled { opacity: .4; cursor: default; transform: none; }
.rooms-primary:disabled { background: #27272a; border-color: #3f3f46; color: #a1a1aa; }
.rooms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.room-card { min-width: 0; padding: 20px; border: 1px solid #7f1d1d80; border-radius: 18px; background: linear-gradient(145deg, #1c0c0e, #09090b); }
.room-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; }
.room-lock { color: #a1a1aa; filter: grayscale(1); }
.room-status { color: #a1a1aa; font-weight: 700; }
.room-status.available { color: #fca5a5; }
.room-card h3 { font-size: 20px; font-weight: 900; line-height: 1.3; margin: 18px 0 5px; overflow-wrap: anywhere; }
.room-host { font-size: 11px; color: #a1a1aa; overflow-wrap: anywhere; }
.room-host span { color: #71717a; }
.room-rules { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.room-rule { font-size: 10px; padding: 5px 7px; border-radius: 6px; background: #18181b; border: 1px solid #303036; color: #a1a1aa; }
.room-rule.enabled { color: #fecaca; background: #dc26261a; border-color: #ef444450; }
.room-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid #ffffff10; font-size: 11px; color: #a1a1aa; }
.room-card-footer b { color: #fff; font-size: 18px; }
.room-create-panel, .room-join-panel { padding: 22px; border: 1px solid #dc262680; border-radius: 18px; background: #0c0a0b; box-shadow: 0 12px 40px #0008; }
.room-create-panel { margin: 16px 0; }
.room-join-panel { width: 100%; max-width: 380px; }
.room-join-panel h2 { font-size: 24px; font-weight: 900; margin: 10px 0 4px; overflow-wrap: anywhere; }
.room-join-panel .rooms-field { margin-top: 22px; }
.rooms-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 8px; }
.rooms-field { display: block; font-size: 11px; font-weight: 800; color: #d4d4d8; }
.rooms-field input { display: block; width: 100%; min-width: 0; padding: 12px; margin-top: 7px; border: 1px solid #52525b; border-radius: 10px; color: #fff; background: #09090b; font-size: 14px; user-select: text; -webkit-user-select: text; }
.rooms-field input:focus { outline: 2px solid #ef4444; outline-offset: 2px; }
.rooms-create-rules { margin: 14px 0; }
.rooms-error { min-height: 18px; margin: 10px 0; color: #fda4af; font-size: 12px; line-height: 1.5; }
.rooms-footnote { margin-top: 24px; padding-top: 18px; border-top: 1px solid #ffffff10; }
.kick-button { color: #fda4af; background: #4c05194d; border: 1px solid #9f1239; padding: 6px 9px; font-size: 10px; }
.kick-button:hover { background: #881337; }
@media (max-width: 600px) {
    .rooms-grid, .rooms-form-grid { grid-template-columns: 1fr; }
    .room-browser { padding: 16px 14px 28px; }
    .rooms-heading { margin: 24px 0; }
    .room-card { padding: 17px; }
    .rooms-toolbar { gap: 8px; }
    .rooms-primary, .rooms-secondary { padding: 9px 11px; }
}
* {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: #070709;
    color: #ffffff;
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
    position: fixed;
}
.font-brutal {
    font-family: 'Black Ops One', cursive;
    letter-spacing: 0.05em;
}
/* Fondos y efectos neón */
.bg-mercy-mesh {
    background: radial-gradient(circle at 50% 42%, rgba(180, 0, 30, 0.25) 0%, rgba(10, 10, 15, 0.95) 65%, #050507 100%) #070709;
}
.neon-border-red {
    box-shadow: 0 0 15px rgba(255, 30, 66, 0.6), inset 0 0 10px rgba(255, 30, 66, 0.3);
    border: 2px solid #ff1e42;
}
.neon-border-gold {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), inset 0 0 10px rgba(255, 215, 0, 0.4);
    border: 2px solid #ffd700;
}
/* Estilo de las Cartas */
.uno-card {
    width: 86px;
    height: 130px;
    border-radius: 14px;
    position: relative;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, margin 0.2s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.85), inset 0 0 0 3px rgba(255,255,255,0.85);
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
}
.uno-card-lg {
    width: 106px;
    height: 158px;
    border-radius: 16px;
}
.uno-card-sm {
    width: 58px;
    height: 88px;
    border-radius: 9px;
}
.uno-card.playable {
    transform: translateY(-14px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 255, 255, 0.65), inset 0 0 0 3px #ffffff;
    z-index: 10;
}
.uno-card.playable:active {
    transform: translateY(-28px) scale(1.08);
}
.uno-card.disabled-card {
    filter: brightness(0.45) saturate(0.75);
    transform: translateY(6px) scale(0.95);
}
/* Colores de cartas No Mercy (estética metálica oscura) */
.card-red {
    background: linear-gradient(135deg, #ff1e42 0%, #99001b 100%);
}
.card-blue {
    background: linear-gradient(135deg, #00c3ff 0%, #0044aa 100%);
}
.card-green {
    background: linear-gradient(135deg, #00e65c 0%, #006622 100%);
}
.card-yellow {
    background: linear-gradient(135deg, #ffe600 0%, #cc7a00 100%);
}
.card-wild {
    background: linear-gradient(135deg, #1f1f27 0%, #09090c 100%);
    box-shadow: 0 8px 20px rgba(0,0,0,0.9), inset 0 0 0 3px #fbbf24;
}
.card-inner-oval {
    position: absolute;
    inset: 7px;
    border-radius: 50% / 38%;
    transform: rotate(26deg);
    background: rgba(0, 0, 0, 0.42);
    border: 2px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.card-wild .card-inner-oval {
    background: conic-gradient(from 45deg, #ff1e42, #ffe600, #00e65c, #00c3ff, #ff1e42);
    border: 2px solid #ffffff;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.8);
}
.card-wild-center {
    background: rgba(10, 10, 14, 0.9);
    width: 82%;
    height: 82%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-26deg);
}
/* Símbolos de la carta: escalan con el tamaño (normal 86px, -lg 106px, -sm 58px) */
.card-val {
    display: inline-block;
    font-family: 'Black Ops One', cursive;
    font-size: 32px;
    line-height: 1;
    white-space: nowrap;
    color: #fff;
    text-shadow: 0 3px 2px rgba(0, 0, 0, 0.85);
}
.card-wild-center .card-val { font-size: 25px; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9); }
.card-val.val-long { font-size: 21px; letter-spacing: -1px; }
.card-wild-center .card-val.val-long { font-size: 17px; }
.uno-card-lg .card-val { font-size: 40px; }
.uno-card-lg .card-wild-center .card-val { font-size: 31px; }
.uno-card-lg .card-val.val-long { font-size: 26px; }
.uno-card-lg .card-wild-center .card-val.val-long { font-size: 21px; }
.uno-card-sm .card-val { font-size: 22px; }
.uno-card-sm .card-wild-center .card-val { font-size: 17px; }
.uno-card-sm .card-val.val-long { font-size: 14px; letter-spacing: -0.5px; }
.uno-card-sm .card-wild-center .card-val.val-long { font-size: 11px; }
.card-corner {
    position: absolute;
    font-family: 'Black Ops One', cursive;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    z-index: 1;
}
.card-corner.top { top: 7px; left: 8px; }
.card-corner.bottom { bottom: 6px; right: 8px; transform: rotate(180deg); }
.card-corner.val-long { font-size: 10px; letter-spacing: -0.5px; }
.uno-card-lg .card-corner { font-size: 15px; }
.uno-card-lg .card-corner.val-long { font-size: 12px; }
.uno-card-sm .card-corner { font-size: 9px; }
.uno-card-sm .card-corner.top { top: 4px; left: 5px; }
.uno-card-sm .card-corner.bottom { bottom: 4px; right: 5px; }
.uno-card-sm .card-corner.val-long { font-size: 7px; }
.card-sub {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 20px;
    text-align: center;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.75);
    color: #fcd34d;
    border-radius: 4px;
    padding: 2px 2px;
    z-index: 1;
}
.uno-card-lg .card-sub { font-size: 9px; bottom: 24px; }
.uno-card-sm .card-sub { display: none; }
/* Scrollbar oculta para el carrusel de cartas */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
/* Animaciones */
@keyframes pulse-danger {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 30, 66, 0.7), inset 0 0 15px rgba(255, 30, 66, 0.5); }
    50% { box-shadow: 0 0 25px 8px rgba(255, 30, 66, 0.9), inset 0 0 25px rgba(255, 30, 66, 0.8); }
}
.danger-20 {
    animation: pulse-danger 1.2s infinite;
    border-color: #ff1e42 !important;
}
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes spin-slow-rev {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}
.spin-cw {
    animation: spin-slow 12s linear infinite;
}
.spin-ccw {
    animation: spin-slow-rev 12s linear infinite;
}
@keyframes pop-in {
    0% { transform: scale(0.4); opacity: 0; }
    80% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.animate-pop {
    animation: pop-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes float-stack {
    0%, 100% { transform: scale(1) rotate(-3deg); }
    50% { transform: scale(1.12) rotate(3deg); }
}
.stack-badge {
    animation: float-stack 0.8s ease-in-out infinite;
    scale: var(--stack-scale, 1);
    transition: scale 0.3s ease;
}
@keyframes stack-pop {
    0% { scale: 1.9; filter: brightness(2); }
    100% { scale: var(--stack-scale, 1); filter: none; }
}
.stack-badge.stack-pop {
    animation: float-stack 0.8s ease-in-out infinite, stack-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.stack-badge.stack-hot {
    box-shadow: 0 0 45px 10px rgba(255, 30, 66, 1);
}

/* ===== FX: cartas en vuelo, robos, cortes ===== */
.card-back {
    background: linear-gradient(135deg, #18181b 0%, #000 50%, #450a0a 100%);
    border: 2px solid #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-back::after {
    content: 'UNO';
    font-family: 'Black Ops One', cursive;
    color: #fff;
    font-size: 14px;
    transform: rotate(-12deg);
}
@keyframes card-drawn-in {
    0% { opacity: 0; transform: translateY(-60px) scale(0.5) rotate(-12deg); }
    70% { opacity: 1; transform: translateY(4px) scale(1.06); }
    100% { opacity: 1; transform: none; }
}
.card-drawn {
    animation: card-drawn-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.uno-card.just-drawn-playable {
    box-shadow: 0 0 24px 6px rgba(251, 191, 36, 0.95), inset 0 0 0 3px #fde047;
}
@keyframes jumpin-pulse {
    from { transform: translateY(-10px); }
    to { transform: translateY(-22px) scale(1.05); }
}
.uno-card.jumpin-ready {
    box-shadow: 0 0 24px 6px rgba(34, 211, 238, 0.95), inset 0 0 0 3px #67e8f9;
    animation: jumpin-pulse 0.5s ease-in-out infinite alternate;
    z-index: 12;
}
@keyframes slam {
    0% { transform: scale(1.4); filter: brightness(1.9); }
    55% { transform: scale(0.92); }
    100% { transform: scale(1); filter: none; }
}
.slam { animation: slam 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.discard-ghost {
    position: absolute;
    pointer-events: none;
    filter: brightness(0.55);
}

/* Sacudidas de pantalla */
@keyframes shake-sm {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-5px, 2px); }
    40% { transform: translate(5px, -2px); }
    60% { transform: translate(-3px, 1px); }
    80% { transform: translate(3px, -1px); }
}
@keyframes shake-lg {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    10% { transform: translate(-14px, 7px) rotate(-1.2deg); }
    20% { transform: translate(12px, -8px) rotate(1deg); }
    30% { transform: translate(-10px, 5px) rotate(-0.8deg); }
    45% { transform: translate(9px, -4px) rotate(0.6deg); }
    60% { transform: translate(-6px, 3px) rotate(-0.4deg); }
    75% { transform: translate(4px, -2px); }
    90% { transform: translate(-2px, 1px); }
}
@keyframes shake-tiny {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 0); }
    75% { transform: translate(2px, 0); }
}
.shake-sm { animation: shake-sm 0.35s ease-out; }
.shake-lg { animation: shake-lg 0.65s ease-out; }
.timer-panic { animation: shake-tiny 0.25s linear infinite; }

/* Texto gigante de impacto */
#fxSplash {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 70;
}
.splash-text {
    font-family: 'Black Ops One', cursive;
    font-size: clamp(40px, 13vw, 92px);
    color: var(--c, #fff);
    -webkit-text-stroke: 2px #000;
    text-shadow: 0 0 30px var(--c, #fff), 0 6px 0 #000;
    text-align: center;
    line-height: 1;
    padding: 0 16px;
    animation: splash-in 1.15s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
}
.splash-sub {
    display: block;
    font-size: 0.32em;
    -webkit-text-stroke: 1px #000;
    margin-top: 6px;
}
@keyframes splash-in {
    0% { transform: scale(3) rotate(-10deg); opacity: 0; }
    14% { transform: scale(0.9) rotate(-4deg); opacity: 1; }
    24% { transform: scale(1.06) rotate(-4deg); }
    75% { transform: scale(1) rotate(-4deg); opacity: 1; }
    100% { transform: scale(0.8) translateY(-40px) rotate(-4deg); opacity: 0; }
}
#fxFlash {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 65;
    opacity: 0;
    background: radial-gradient(circle, rgba(255, 30, 66, 0.1) 0%, rgba(255, 0, 30, 0.6) 100%);
}

/* Viñeta de peligro (20+ cartas) */
#dangerVignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 25;
    opacity: 0;
    transition: opacity 0.6s ease;
    box-shadow: inset 0 0 120px 30px rgba(255, 0, 30, 0.55);
}
@keyframes vignette-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}
#dangerVignette.lvl1 { animation: vignette-pulse 1.2s ease-in-out infinite; }
#dangerVignette.lvl2 {
    box-shadow: inset 0 0 160px 60px rgba(255, 0, 30, 0.8);
    animation: vignette-pulse 0.7s ease-in-out infinite;
}

/* Mazo urgente: sin color */
@keyframes deck-urgent {
    from { box-shadow: 0 0 10px 2px rgba(255, 30, 66, 0.6); transform: scale(1); }
    to { box-shadow: 0 0 34px 10px rgba(255, 30, 66, 1); transform: scale(1.07); }
}
.deck-urgent { animation: deck-urgent 0.6s ease-in-out infinite alternate; }
.spin-fast { animation-duration: 0.7s !important; }

/* Rivales: última carta, temporizador, bot pensando */
@keyframes last-card {
    0%, 100% { box-shadow: 0 0 6px 1px rgba(251, 191, 36, 0.5); }
    50% { box-shadow: 0 0 22px 6px rgba(251, 191, 36, 1); }
}
.last-card-glow { animation: last-card 0.9s ease-in-out infinite; }
.opp-timer {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 3px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
.opp-timer > i {
    display: block;
    height: 100%;
    width: 100%;
    background: #fbbf24;
    transition: width 0.2s linear;
}
.thinking i {
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 1px;
    border-radius: 50%;
    background: #fbbf24;
    animation: think 0.9s ease-in-out infinite;
}
.thinking i:nth-child(2) { animation-delay: 0.15s; }
.thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes think {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-4px); opacity: 1; }
}
@keyframes ko-shake {
    0%, 100% { transform: none; }
    25% { transform: translate(-6px, 0) rotate(-3deg); }
    75% { transform: translate(6px, 0) rotate(3deg); }
}
.ko-shake { animation: ko-shake 0.15s linear 4; }

/* Temporizador de turno */
#myTimerChip {
    position: relative;
    width: 30px;
    height: 30px;
}
#myTimerChip svg { transform: rotate(-90deg); }
#myTimerChip circle { transition: stroke-dashoffset 0.2s linear, stroke 0.3s; }
#myTimerText {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Black Ops One', cursive;
    font-size: 12px;
}

/* Interruptores de reglas de la casa */
.rule-toggle input { display: none; }
.rule-toggle .knob {
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #3f3f46;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.rule-toggle .knob::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}
.rule-toggle input:checked + .knob { background: #dc2626; }
.rule-toggle input:checked + .knob::after { transform: translateX(14px); }

/* ===== Barra de acciones y mano ===== */
.action-btn { min-height: 44px; transition: transform 0.15s ease, opacity 0.2s ease; }
@keyframes draw-urgent {
    from { box-shadow: 0 0 6px 1px rgba(255, 30, 66, 0.5); }
    to { box-shadow: 0 0 22px 6px rgba(255, 30, 66, 1); }
}
.draw-urgent {
    background: linear-gradient(90deg, #b91c1c, #ef4444, #b91c1c) !important;
    border-color: #fff !important;
    animation: draw-urgent 0.6s ease-in-out infinite alternate;
}
.hand-scroll {
    --fl: 0px;
    --fr: 0px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
    cursor: grab;
}
.hand-scroll.dragging { cursor: grabbing; }
.hand-scroll > .uno-card + .uno-card { margin-left: var(--overlap, 6px); }
.hand-scroll > .uno-card:hover { transform: translateY(-26px) scale(1.06); z-index: 20; filter: none; }
.hand-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-30%);
    z-index: 30;
    width: 30px;
    height: 56px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fbbf24;
    font-size: 13px;
    font-weight: 900;
}
.hand-nav:active { transform: translateY(-30%) scale(0.92); }
.uno-card.combo-selected {
    transform: translateY(-34px) scale(1.05) !important;
    box-shadow: 0 0 26px 6px rgba(251, 191, 36, 1), inset 0 0 0 3px #fde047 !important;
    z-index: 25;
    filter: none !important;
    animation: none !important;
}
.combo-order {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fbbf24;
    color: #000;
    font-family: 'Black Ops One', cursive;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
}
@keyframes combo-candidate {
    from { box-shadow: 0 0 8px 2px rgba(74, 222, 128, 0.6), inset 0 0 0 3px #86efac; }
    to { box-shadow: 0 0 24px 6px rgba(74, 222, 128, 1), inset 0 0 0 3px #bbf7d0; }
}
.uno-card.combo-candidate {
    transform: translateY(-16px);
    filter: none;
    animation: combo-candidate 0.55s ease-in-out infinite alternate;
    z-index: 15;
}
.uno-card.combo-dim { filter: brightness(0.3) saturate(0.5); transform: translateY(8px) scale(0.94); }

/* Franja del sentido de juego */
.dir-strip {
    height: 10px;
    opacity: 0.75;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10'%3E%3Cpath d='M5 1l5 4-5 4' fill='none' stroke='%23ff1e42' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 18px 10px;
    animation: dir-move 0.7s linear infinite;
}
.dir-strip.ccw { transform: scaleX(-1); }
@keyframes dir-move { from { background-position-x: 0; } to { background-position-x: 18px; } }

/* Ticker e historial */
@keyframes ticker-in {
    from { transform: translateY(-8px); opacity: 0; }
    to { transform: none; opacity: 1; }
}
.ticker-in { animation: ticker-in 0.35s ease-out; }

/* Escenario de intercambio 7 / 0 */
#swapStage {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 68;
}
.swap-panel {
    background: rgba(9, 9, 11, 0.92);
    border: 2px solid #b829ff;
    border-radius: 24px;
    padding: 14px 18px;
    box-shadow: 0 0 40px rgba(184, 41, 255, 0.6);
    text-align: center;
    animation: stage-life var(--life, 1.8s) ease forwards;
    max-width: calc(100vw - 32px);
}
@keyframes stage-life {
    0% { transform: scale(0.4); opacity: 0; }
    10% { transform: scale(1.05); opacity: 1; }
    16% { transform: scale(1); }
    85% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.85); opacity: 0; }
}
.swap-seat {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 76px;
    padding: 6px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.swap-seat .av { font-size: 26px; line-height: 1; }
.swap-seat .nm { font-size: 11px; font-weight: 800; color: #fff; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swap-seat .ct { font-family: 'Black Ops One', cursive; font-size: 12px; color: #d8b4fe; }
.swap-arrows { font-size: 26px; color: #e9d5ff; animation: arrows-bounce 0.5s ease-in-out infinite alternate; }
@keyframes arrows-bounce { from { transform: scaleX(0.85); } to { transform: scaleX(1.15); } }
.zero-ring { position: relative; width: 170px; height: 170px; margin: 6px auto 0; }
.zero-ring .zr-seat { position: absolute; transform: translate(-50%, -50%); text-align: center; font-size: 10px; font-weight: 800; color: #fff; }
.zero-ring .zr-seat span { display: block; font-size: 22px; }
.zero-ring .zr-spin {
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    border: 3px dashed #b829ff;
    animation: spin-slow 1s linear infinite;
}
.zero-ring .zr-spin.ccw { animation-name: spin-slow-rev; }
@keyframes seat-flash {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 26px 8px rgba(184, 41, 255, 0.95); }
}
.seat-flash { animation: seat-flash 0.5s ease-in-out 3; }
.fly-label {
    position: absolute;
    left: 50%;
    bottom: -16px;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 10px;
    font-weight: 900;
    color: #fff;
    background: #7e22ce;
    border-radius: 6px;
    padding: 1px 5px;
}
.fly-count {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background: #fbbf24;
    color: #000;
    font-family: 'Black Ops One', cursive;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
}

/* Aviso "TU TURNO" */
.turn-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 62;
    pointer-events: none;
    text-align: center;
    font-family: 'Black Ops One', cursive;
    font-size: 22px;
    color: #000;
    background: linear-gradient(90deg, transparent, #fbbf24 20%, #fbbf24 80%, transparent);
    padding: 6px 0;
    animation: turn-banner 1.3s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}
@keyframes turn-banner {
    0% { transform: translateX(-100%); opacity: 0; }
    20% { transform: translateX(0); opacity: 1; }
    75% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* Menú, hoja de configuración y guía de reglas */
.setup-sheet { animation: sheet-up 0.32s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes sheet-up {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: none; opacity: 1; }
}
.rules-group-title { font-size: 10px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #a1a1aa; margin: 4px 0 6px; }
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.45); border: 1px solid #27272a; }
.rule-row + .rule-row { margin-top: 6px; }
.rule-chip { flex-shrink: 0; font-size: 10px; font-weight: 900; padding: 2px 8px; border-radius: 999px; border: 1px solid #3f3f46; color: #71717a; }
.rule-chip.on { background: #dc2626; border-color: #fca5a5; color: #fff; }
.guide-tab { padding: 6px 2px; border-radius: 9px; font-size: 11px; font-weight: 800; color: #a1a1aa; text-align: center; }
.guide-tab[aria-selected="true"] { background: #dc2626; color: #000; }
.guide-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 14px; background: rgba(39, 39, 42, 0.6); border: 1px solid #3f3f46; }
.guide-item .mini { flex-shrink: 0; width: 46px; height: 68px; position: relative; }
.guide-item .mini > .uno-card { transform: scale(0.79); transform-origin: top left; }
.guide-item .ico { flex-shrink: 0; width: 46px; text-align: center; font-size: 26px; line-height: 1.2; }
.guide-item strong.t { display: block; color: #fff; text-transform: uppercase; margin-bottom: 2px; }

/* Expansión: monedas Mercy / No Mercy */
.coin-3d {
    width: 96px;
    height: 96px;
    margin: 4px auto 10px;
    position: relative;
    transform-style: preserve-3d;
}
.coin-3d .face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    font-family: 'Black Ops One', cursive;
    font-size: 11px;
    color: #fff;
    border: 4px solid #fde68a;
    box-shadow: 0 0 22px rgba(251, 191, 36, 0.55), inset 0 0 12px rgba(0, 0, 0, 0.5);
}
.coin-3d .face b { font-size: 30px; line-height: 1.1; }
.coin-3d .mercy { background: radial-gradient(circle at 35% 30%, #6ee7b7, #047857); }
.coin-3d .nomercy { background: radial-gradient(circle at 35% 30%, #fca5a5, #991b1b); transform: rotateY(180deg); }
.coin-3d.flipping { animation: coin-flip 1.4s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
@keyframes coin-flip {
    from { transform: translateY(0) rotateY(0); }
    40% { transform: translateY(-40px) rotateY(calc(var(--end, 1800deg) * 0.6)); }
    to { transform: translateY(0) rotateY(var(--end, 1800deg)); }
}
.coin-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    line-height: 1;
    border: 2px solid #fbbf24;
    background: #3f3f46;
    flex-shrink: 0;
}
.coin-pill.mercy { background: #047857; }
.coin-pill.nomercy { background: #991b1b; }
.coin-pill.used { opacity: 0.35; filter: grayscale(1); }

/* Expansión: Ataque Final y Muerte Súbita */
.swap-panel.fa-panel { border-color: #ff1e42; box-shadow: 0 0 50px rgba(255, 30, 66, 0.7); }
.fa-cards { display: flex; flex-wrap: wrap; justify-content: center; max-width: 300px; min-height: 92px; margin: 8px auto; padding-left: 28px; }
.fa-cards .uno-card { margin-left: -28px; margin-bottom: 4px; animation: fa-reveal 0.3s ease-out both; }
@keyframes fa-reveal {
    from { opacity: 0; transform: rotateY(90deg) scale(0.6); }
    to { opacity: 1; transform: none; }
}
.fa-count { font-family: 'Black Ops One', cursive; font-size: 46px; line-height: 1; color: #fbbf24; }
.fa-count.lethal { color: #ff1e42; text-shadow: 0 0 20px #ff1e42; animation: shake-tiny 0.12s linear infinite; }
.fa-verdict { font-family: 'Black Ops One', cursive; font-size: 15px; color: #fff; min-height: 20px; }
.sd-count { font-family: 'Black Ops One', cursive; font-size: 72px; line-height: 1; color: #ff1e42; text-shadow: 0 0 24px rgba(255, 30, 66, 0.9); }
.sd-count.tick { animation: sd-tick 0.55s ease-out; }
@keyframes sd-tick {
    from { transform: scale(2.2); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Robo carta por carta: la carta se revela al centro antes de ir a la mano */
#drawReveal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    z-index: 66;
}
.reveal-slot { position: relative; width: 106px; height: 158px; }
.reveal-slot > .uno-card { position: absolute; inset: 0; animation: reveal-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes reveal-in {
    from { opacity: 0; transform: translateY(40px) rotateY(90deg) scale(0.6); }
    to { opacity: 1; transform: none; }
}
.reveal-slot > .uno-card.reveal-hit {
    box-shadow: 0 0 34px 10px rgba(251, 191, 36, 0.95), inset 0 0 0 3px #fde047;
    animation: reveal-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) both, reveal-hit 0.5s ease-in-out 0.32s infinite alternate;
}
@keyframes reveal-hit { to { transform: scale(1.1); } }
.reveal-count {
    font-family: 'Black Ops One', cursive;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(9, 9, 11, 0.9);
    border: 1px solid #52525b;
    color: #fff;
    white-space: nowrap;
}
.reveal-count.danger { background: #dc2626; border-color: #fff; animation: vignette-pulse 0.6s ease-in-out infinite; }
.reveal-label { font-family: 'Black Ops One', cursive; font-size: 16px; color: #fbbf24; text-shadow: 0 0 12px rgba(251, 191, 36, 0.9); min-height: 20px; }

@media (prefers-reduced-motion: reduce) {
    .reveal-slot > .uno-card, .reveal-count.danger { animation: none; }
    .coin-3d.flipping, .fa-cards .uno-card, .fa-count.lethal, .sd-count.tick { animation: none; }
    .swap-panel, .turn-banner, .dir-strip, .uno-card.combo-candidate { animation: none; }
    .shake-sm, .shake-lg, .timer-panic, .ko-shake { animation: none !important; }
    .uno-card.jumpin-ready { animation: none; }
}
