/* =========================================================
   impostor.css | PUCK IMPOSTOR
   10 jugadores en círculo alrededor de la categoría, como un
   círculo de saque. Al destapar: verde = acierto, rojo =
   impostor elegido, verde discontinuo = se te escapó, gris =
   impostor esquivado. Estilo oscuro y neón de la web.
   ========================================================= */

.hidden { display: none !important; }

:root {
    --ip-good: #4ade80;
    --ip-bad: #ff3b6b;
    --ip-card: #161d2b;
    --ip-card-hi: #1d2638;
}

.game-wrapper {
    display: flex; flex-direction: column; align-items: center;
    padding: 0 12px 40px; box-sizing: border-box;
}

/* --- Navegación de días --- */
.daily-nav { display: flex; align-items: center; justify-content: center; gap: 15px; width: 100%; max-width: 420px; margin: 20px 0 10px; }
.btn-nav { padding: 5px 15px; font-size: 1.2rem; border-radius: 8px; cursor: pointer; background: transparent; border: 1px solid var(--neon-blue); color: var(--neon-blue); transition: all .3s; }
.btn-nav:hover:not(:disabled) { background: rgba(0, 242, 255, .1); box-shadow: 0 0 10px var(--neon-blue-glow); }
.btn-nav:disabled { opacity: .3; cursor: not-allowed; border-color: var(--text-secondary); color: var(--text-secondary); }
.day-info { text-align: center; min-width: 170px; }
.day-text { margin: 0; font-size: 1.5rem; font-weight: 900; color: var(--neon-blue); letter-spacing: 2px; text-shadow: 0 0 10px var(--neon-blue-glow); }

/* --- Modo y rondas --- */
.ip-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 22px; margin-bottom: 6px; }
.ip-mode { display: inline-flex; padding: 3px; border-radius: 999px; background: #121826; border: 1px solid var(--border-dark); }
.ip-mode-btn {
    padding: 7px 16px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
    color: var(--text-secondary); font-family: inherit; font-weight: 800; font-size: .82rem; letter-spacing: .3px;
}
.ip-mode-btn[aria-checked="true"] { background: var(--neon-blue); color: #04141a; }
.ip-mode-btn:disabled { cursor: not-allowed; }
.ip-mode-btn:disabled:not([aria-checked="true"]) { opacity: .35; }
.ip-mode-help { margin: 4px 0 6px; font-size: .88rem; color: var(--text-secondary); text-align: center; }
.ip-mode-help b { color: #fff; }

.ip-rounds { display: flex; gap: 6px; }
.ip-dot {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid var(--border-dark); background: #121826; color: var(--text-secondary);
    font-size: .78rem; font-weight: 900; cursor: pointer; padding: 0; font-family: inherit;
}
.ip-dot.cur { border-color: var(--neon-blue); color: var(--neon-blue); box-shadow: 0 0 8px var(--neon-blue-glow); }
.ip-dot.won { background: var(--ip-good); border-color: var(--ip-good); color: #08210f; }
.ip-dot.lost { background: var(--ip-bad); border-color: var(--ip-bad); color: #2a0610; }
.ip-dot:disabled { cursor: default; }

/* --- Círculo --- */
.ip-ring {
    position: relative; width: 100%; max-width: 580px; aspect-ratio: 1 / 1; margin: 4px 0 0;
}
.ip-ring::before {             /* círculo de saque */
    content: ""; position: absolute; inset: 15%; border-radius: 50%;
    border: 2px solid rgba(255, 59, 107, .35);
    box-shadow: 0 0 40px rgba(255, 59, 107, .08) inset;
    pointer-events: none;
}
.ip-center {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 44%; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
}
.ip-kicker { font-size: .72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-secondary); }
.ip-question {
    margin: 0; padding: 12px 14px; width: 100%; box-sizing: border-box;
    font-size: clamp(.85rem, 3.2vw, 1.1rem); font-weight: 900; line-height: 1.2; color: #fff;
    border: 1px solid var(--neon-blue); border-radius: 14px; background: rgba(0, 242, 255, .06);
    box-shadow: 0 0 14px var(--neon-blue-glow);
}
.ip-avoid { font-size: .75rem; color: var(--text-secondary); }
.ip-avoid b { color: var(--ip-bad); text-transform: uppercase; letter-spacing: .5px; }

.ip-card {
    position: absolute; transform: translate(-50%, -50%);
    width: 21%; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px 5px; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--border-dark); background: linear-gradient(180deg, var(--ip-card-hi), var(--ip-card));
    color: #fff; font-family: inherit;
    transition: transform .12s, border-color .15s, box-shadow .15s, background .15s, opacity .2s;
    -webkit-tap-highlight-color: transparent;
}
.ip-card:hover:not(:disabled) { border-color: rgba(0, 242, 255, .5); }
.ip-card:active:not(:disabled) { transform: translate(-50%, -50%) scale(.95); }
.ip-card:focus-visible { outline: 2px solid var(--neon-blue); outline-offset: 2px; }
.ip-card:disabled { cursor: default; }
.ip-photo { width: 58%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: #e8edf3; border: 2px solid #2a3441; }
.ip-photo.broken { visibility: hidden; }
.ip-name {
    max-width: 100%; padding: 0 3px; box-sizing: border-box;
    font-size: clamp(.55rem, 2.1vw, .74rem); font-weight: 900; text-transform: uppercase; letter-spacing: .2px;
    line-height: 1.1; text-align: center; overflow-wrap: anywhere;
}
.ip-val { font-size: clamp(.5rem, 1.9vw, .66rem); font-weight: 700; color: var(--text-secondary); line-height: 1.1; text-align: center; min-height: 1em; }
.ip-mark {
    position: absolute; top: -6px; right: -4px; width: 22px; height: 22px; border-radius: 50%;
    display: none; place-items: center; font-size: .72rem; font-weight: 900; color: #08210f;
}

.ip-card.sel { border-color: var(--neon-blue); background: linear-gradient(180deg, #0f3a44, #0b2b33); box-shadow: 0 0 14px var(--neon-blue-glow); }
.ip-card.sel .ip-photo { border-color: var(--neon-blue); }

/* Destapado */
.ip-card.hit { border-color: var(--ip-good); background: linear-gradient(180deg, #123524, #0d2519); }
.ip-card.hit .ip-photo { border-color: var(--ip-good); }
.ip-card.hit .ip-mark { display: grid; background: var(--ip-good); }
.ip-card.boom { border-color: var(--ip-bad); background: linear-gradient(180deg, #4a1222, #300a16); box-shadow: 0 0 16px rgba(255, 59, 107, .45); }
.ip-card.boom .ip-photo { border-color: var(--ip-bad); }
.ip-card.boom .ip-mark { display: grid; background: var(--ip-bad); color: #fff; }
.ip-card.miss { border: 1px dashed var(--ip-good); }
.ip-card.miss .ip-mark { display: grid; background: transparent; border: 1px dashed var(--ip-good); color: var(--ip-good); }
.ip-card.safe { opacity: .55; }
.ip-card.safe .ip-mark { display: grid; background: #2a3441; color: var(--ip-bad); }
.ip-card.hit .ip-val, .ip-card.miss .ip-val { color: var(--ip-good); }
.ip-card.boom .ip-val, .ip-card.safe .ip-val { color: var(--ip-bad); }
.ip-card.pop { animation: ipPop .3s ease; }
@keyframes ipPop { 50% { transform: translate(-50%, -50%) scale(1.1); } }
.ip-ring.shake { animation: ipShake .4s ease; }
@keyframes ipShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.ip-status { min-height: 1.4em; margin: 6px 0 0; font-weight: 800; font-size: .95rem; text-align: center; }
.ip-status.win { color: var(--ip-good); }
.ip-status.lose { color: var(--ip-bad); }

/* --- Botones --- */
.ip-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.ip-btn {
    padding: 11px 24px; border-radius: 999px; cursor: pointer;
    background: transparent; border: 1px solid #c9d1d9; color: #fff;
    font-family: inherit; font-weight: 800; font-size: .92rem; letter-spacing: .3px;
    transition: background .2s, box-shadow .2s, opacity .2s;
}
.ip-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.ip-btn.primary { background: var(--neon-blue); border-color: var(--neon-blue); color: #04141a; }
.ip-btn.primary:hover:not(:disabled) { background: var(--neon-blue); box-shadow: 0 0 14px var(--neon-blue-glow); }
.ip-btn:disabled { opacity: .35; cursor: not-allowed; }

.toast {
    position: fixed; left: 50%; top: calc(var(--header-h, 72px) + 16px); transform: translateX(-50%); z-index: 2000;
    background: #fff; color: #0b0d12; padding: 10px 18px; border-radius: 10px;
    font-weight: 800; font-size: .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

/* --- Resultado --- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(4, 7, 12, .82); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.modal-box {
    position: relative; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto;
    padding: 26px 22px 22px; box-sizing: border-box; text-align: center;
    background: #131a26; border: 1px solid var(--border-dark); border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 242, 255, .2);
}
.modal-close { position: absolute; top: 8px; right: 12px; background: none; border: 0; color: var(--text-secondary); font-size: 1.8rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #fff; }
.modal-title { margin: 0 0 4px; font-size: 1.3rem; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: var(--neon-blue); }
.modal-score { font-size: 2.6rem; font-weight: 900; color: #fff; line-height: 1.1; }
.modal-verdict { font-size: 1rem; font-weight: 800; margin: 4px 0 14px; color: var(--text-secondary); }
.modal-verdict.win { color: var(--ip-good); }
.modal-rounds { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.modal-rounds li {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
    background: #0f1520; border: 1px solid var(--border-dark); font-size: .85rem; font-weight: 700; color: #dfe6ee;
}
.modal-rounds li .r-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 900; }
.modal-rounds li.won .r-ico { background: var(--ip-good); color: #08210f; }
.modal-rounds li.lost .r-ico { background: var(--ip-bad); color: #fff; }
.modal-rounds li .r-q { flex: 1; }
.modal-stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; }
.stat-box { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 1.45rem; font-weight: 900; color: #fff; }
.stat-text { font-size: .62rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .4px; text-align: center; }
.modal-countdown { margin-bottom: 16px; font-size: .9rem; color: var(--text-secondary); }
.modal-countdown b { color: #fff; font-variant-numeric: tabular-nums; }
.modal-buttons { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* --- Cómo se juega --- */
.faq-section {
    width: 100%; margin: 2rem 0 0; padding: 4rem 2rem; box-sizing: border-box;
    border-top: 1px solid rgba(0, 242, 255, .2); border-bottom: 1px solid rgba(0, 242, 255, .2);
    background: rgba(13, 17, 26, .4);
}
.faq-container { max-width: 800px; margin: 0 auto; text-align: left; }
.faq-title { font-size: 1.6rem; font-weight: 900; color: #fff; margin: 0 0 2rem; letter-spacing: -.5px; }
.faq-title .accent { color: var(--neon-blue); }
.faq-question { font-size: 1.1rem; font-weight: 800; color: var(--neon-blue); margin: 1.8rem 0 .6rem; }
.faq-answer { font-size: .95rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.faq-answer strong { color: #fff; }

@media (max-width: 560px) {
    /* En móvil las tarjetas son más altas que la separación entre vecinas:
       el aro se estira en vertical (top va en % de la altura) para que no se tapen */
    .ip-ring { aspect-ratio: 1 / 1.3; }
    .ip-card { width: 22%; border-radius: 10px; padding: 3px 1px; gap: 2px; }
    .ip-photo { width: 46%; }
    .ip-center { width: 46%; gap: 4px; }
    .ip-question { padding: 8px 8px; border-radius: 10px; }
    .ip-kicker { font-size: .6rem; }
    .ip-avoid { font-size: .62rem; }
    .ip-mark { width: 18px; height: 18px; font-size: .6rem; }
    .ip-dot { width: 26px; height: 26px; }
    .day-text { font-size: 1.2rem; }
    .modal-stats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 12px; }
    .faq-section { padding: 3rem 1.2rem; }
}

@media (max-width: 380px) {
    .ip-ring { aspect-ratio: 1 / 1.4; }
}

@media (prefers-reduced-motion: reduce) {
    .ip-card, .ip-ring { animation: none !important; transition: none !important; }
}
