/* ============================================================
   CESE Kids — Show do Cristão  |  style.css
   Design System compartilhado com visual de TV Show Bíblico
   ============================================================ */

html { overflow-x: hidden; max-width: 100vw; }

:root {
    --bg-color: #12062e;
    --text-primary: #f8fafc;
    --text-secondary: #c4b5fd;
    --card-bg: rgba(35, 14, 75, 0.82);
    --card-border: rgba(255, 255, 255, 0.12);
    --glass-bg: rgba(20, 7, 52, 0.86);
    --glass-border: rgba(255, 255, 255, 0.08);
    --gold: #fbbf24;
    --gold-dark: #d97706;
    --accent: #818cf8;
    --accent-hover: #6366f1;
    --success: #22c55e;
    --danger: #ef4444;
    --sky: #38bdf8;
    --card-hover-glow: rgba(251, 191, 36, 0.4);
    --btn-selected: #f59e0b;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 36px 36px;
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex; flex-direction: column;
    overflow-x: hidden; max-width: 100vw;
    position: relative;
}

/* Canvas de Confetes */
#confetti-canvas {
    position: fixed; inset: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 600; display: none;
}

/* Toast de Alertas e Encorajamento */
.encourage-toast {
    position: fixed; top: 1.4rem; left: 50%;
    transform: translateX(-50%) translateY(-90px);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #12062e; padding: .65rem 1.8rem; border-radius: 50px;
    font-size: 1.05rem; font-weight: 800; z-index: 550;
    pointer-events: none; white-space: nowrap; opacity: 0;
    transition: transform .4s cubic-bezier(.175,.885,.32,1.275), opacity .35s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 0 2px rgba(251,191,36,.5);
}
.encourage-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.encourage-toast.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 0 2px rgba(34,197,94,.5);
}
.encourage-toast.error {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 0 2px rgba(239,68,68,.5);
}

/* Formas Flutuantes no Fundo */
.background-shapes { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.shape {
    position: absolute; border-radius: 50%; filter: blur(85px); opacity: .32;
    animation: floatBlob 20s ease-in-out infinite;
}
.shape-1 { width: 420px; height: 420px; background: #f59e0b; top: -140px; left: -120px; }
.shape-2 { width: 460px; height: 460px; background: #6366f1; bottom: -160px; right: -140px; animation-delay: -7s; }
.shape-3 { width: 340px; height: 340px; background: #10b981; top: 45%; left: 50%; animation-delay: -14s; }
@keyframes floatBlob {
    0%,100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(35px,-25px) scale(1.06); }
}

/* Container Principal */
.container {
    width: 100%; max-width: 1000px; margin: 0 auto;
    padding: 1rem 1rem 2rem; display: flex; flex-direction: column; gap: 1rem;
    flex: 1;
}

.top-nav {
    display: flex; justify-content: space-between; align-items: center; width: 100%; flex-wrap: wrap; gap: .5rem;
}
.back-link {
    color: var(--text-secondary); text-decoration: none;
    font-weight: 600; padding: .45rem .95rem; border-radius: 999px;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09);
    transition: background .2s ease, color .2s ease;
    font-size: .9rem; display: inline-flex; align-items: center; gap: .3rem;
}
.back-link:hover { background: rgba(255,255,255,.14); color: #fff; }

.top-nav-actions {
    display: flex; gap: .5rem; align-items: center;
}
.nav-action-btn {
    border: none; cursor: pointer; font-family: inherit;
    font-weight: 700; padding: .45rem .9rem; border-radius: 999px;
    font-size: .88rem; transition: all .2s ease;
    display: inline-flex; align-items: center; gap: .35rem;
}
.nav-action-btn.desafio-btn {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #86efac;
}
.nav-action-btn.desafio-btn:hover {
    background: rgba(34, 197, 94, 0.35); transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.nav-action-btn.ranking-btn {
    background: rgba(129, 140, 248, 0.2);
    border: 1px solid rgba(129, 140, 248, 0.45);
    color: #c7d2fe;
}
.nav-action-btn.ranking-btn:hover {
    background: rgba(129, 140, 248, 0.35); transform: translateY(-1px);
}
.nav-action-btn.ladder-btn {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: var(--gold);
}
.nav-action-btn.ladder-btn:hover {
    background: rgba(251, 191, 36, 0.25); transform: translateY(-1px);
}

.btn-desafio-start {
    background: rgba(34, 197, 94, 0.15);
    border: 1.5px solid rgba(34, 197, 94, 0.4);
    color: #86efac; font-family: inherit; font-size: .95rem; font-weight: 800;
    padding: .75rem; border-radius: 14px; cursor: pointer;
    transition: all .2s ease; width: 100%;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-desafio-start:hover {
    background: rgba(34, 197, 94, 0.3);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.35);
}

/* Header & Painel de TV Show */
header {
    display: flex; flex-direction: column; gap: .9rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 22px; padding: 1.1rem 1.3rem;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 14px 40px rgba(0,0,0,.45);
}

.header-logo-title {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
}
.header-logo-wrap {
    display: flex; align-items: center;
}
.show-header-logo {
    max-height: 52px; width: auto; max-width: 250px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.35));
    transition: transform .2s ease;
}
.show-header-logo:hover {
    transform: scale(1.03);
}

.modal-logo-wrap {
    display: flex; justify-content: center; align-items: center; width: 100%;
}
.show-modal-logo {
    max-height: 86px; width: auto; max-width: 280px;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 14px rgba(251, 191, 36, 0.35));
    margin: 0 auto .2rem;
}
.show-result-logo {
    max-height: 68px; width: auto; max-width: 240px;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(251, 191, 36, 0.4));
    margin: 0 auto;
}

.header-logo-title h1 {
    font-size: clamp(1.6rem, 4.5vw, 2.3rem); font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #ea580c);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    letter-spacing: -0.02em;
    display: flex; align-items: center; gap: .5rem;
}

.header-controls {
    display: flex; gap: .5rem; align-items: center;
}
.btn-icon-text {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
    color: #fff; font-family: inherit; font-size: .85rem; font-weight: 700;
    padding: .45rem .8rem; border-radius: 12px; cursor: pointer;
    transition: all .2s ease;
}
.btn-icon-text:hover { background: rgba(255,255,255,.15); transform: translateY(-1px); }

/* Barra de Valores (Errar / Parar / Acertar) */
.values-banner {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem;
    background: rgba(0,0,0,.28); border-radius: 16px; padding: .6rem;
    border: 1px solid rgba(255,255,255,.05);
}
.val-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: .4rem .3rem; border-radius: 12px;
}
.val-card .val-label {
    font-size: .72rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em;
}
.val-card .val-amount {
    font-size: clamp(1rem, 2.5vw, 1.35rem); font-weight: 900;
}
.val-card.wrong {
    background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2);
}
.val-card.wrong .val-label { color: #f87171; }
.val-card.wrong .val-amount { color: #fca5a5; }

.val-card.stop {
    background: rgba(148, 163, 184, 0.1); border: 1px solid rgba(148, 163, 184, 0.2);
}
.val-card.stop .val-label { color: #94a3b8; }
.val-card.stop .val-amount { color: #e2e8f0; }

.val-card.win {
    background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.35);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}
.val-card.win .val-label { color: #4ade80; }
.val-card.win .val-amount { color: #86efac; }

/* Status da Rodada */
.game-status-bar {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .88rem; font-weight: 700; color: var(--text-secondary);
    padding: 0 .4rem;
}
.badge-mode {
    background: rgba(129, 140, 248, 0.2); color: #c7d2fe;
    border: 1px solid rgba(129, 140, 248, 0.35);
    padding: .25rem .65rem; border-radius: 999px; font-size: .78rem;
}

/* ============================================================
   Área de Ajudas Bíblicas
   ============================================================ */
.helps-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px; padding: .75rem .9rem;
    backdrop-filter: blur(14px);
    display: flex; flex-direction: column; gap: .5rem;
}
.helps-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .8rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .06em;
}
.helps-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem;
}
.help-btn {
    border: none; cursor: pointer; font-family: inherit; font-weight: 700;
    padding: .6rem .4rem; border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff; font-size: .82rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    transition: all .2s cubic-bezier(.175,.885,.32,1.275);
    position: relative;
}
.help-btn .help-icon { font-size: 1.35rem; line-height: 1; }
.help-btn .help-name { font-size: .75rem; text-align: center; white-space: nowrap; }
.help-btn .help-badge {
    position: absolute; top: -5px; right: -5px;
    background: #ef4444; color: #fff; font-size: .68rem; font-weight: 900;
    width: 19px; height: 19px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-color);
}
.help-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--gold);
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.25);
}
.help-btn:active:not(:disabled) { transform: translateY(0); }
.help-btn:disabled {
    opacity: .35; cursor: not-allowed; filter: grayscale(1);
    transform: none; box-shadow: none;
}
.help-btn.stop-btn {
    background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3);
}
.help-btn.stop-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.3); border-color: #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

/* ============================================================
   Arena da Pergunta e Alternativas
   ============================================================ */
.quiz-arena {
    display: flex; flex-direction: column; gap: 1rem;
    flex: 1;
}

/* Card da Pergunta */
.question-card {
    background: linear-gradient(135deg, rgba(30, 10, 70, 0.95), rgba(45, 15, 95, 0.85));
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 20px; padding: 1.4rem 1.4rem;
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 35px rgba(0,0,0,.5), inset 0 1px 1px rgba(255,255,255,.15);
    display: flex; flex-direction: column; gap: .7rem;
    position: relative; overflow: hidden;
}
.question-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.question-meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .8rem; font-weight: 700; color: var(--gold);
}
.question-text {
    font-size: clamp(1.05rem, 3.2vw, 1.45rem);
    font-weight: 700; line-height: 1.45;
    color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* Grid de Alternativas */
.options-grid {
    display: grid; grid-template-columns: 1fr; gap: .75rem;
}
@media (min-width: 680px) {
    .options-grid { grid-template-columns: 1fr 1fr; }
}

.option-btn {
    border: none; cursor: pointer; font-family: inherit;
    background: rgba(30, 12, 68, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px; padding: .95rem 1.1rem;
    color: #f8fafc; font-size: clamp(.95rem, 2.5vw, 1.1rem); font-weight: 600;
    display: flex; align-items: center; gap: .85rem; text-align: left;
    transition: all .2s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,.3);
    position: relative; overflow: hidden;
}

.option-letter {
    width: 38px; height: 38px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.05rem; color: var(--gold);
    flex-shrink: 0; transition: all .2s ease;
}

.option-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--gold);
    background: rgba(45, 18, 98, 0.95);
    box-shadow: 0 8px 22px rgba(251, 191, 36, 0.25);
}
.option-btn:hover:not(:disabled) .option-letter {
    background: var(--gold); color: #12062e;
}

.option-btn.selected {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.3));
    animation: pulseSelected 1.1s infinite;
}
.option-btn.selected .option-letter {
    background: #f59e0b; color: #12062e;
}

.option-btn.correct {
    border-color: #22c55e !important;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.38), rgba(22, 163, 74, 0.38)) !important;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.5) !important;
    animation: correctFlash .6s ease;
}
.option-btn.correct .option-letter {
    background: #22c55e !important; color: #fff !important;
}

.option-btn.wrong {
    border-color: #ef4444 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(185, 28, 28, 0.35)) !important;
    opacity: .85;
}
.option-btn.wrong .option-letter {
    background: #ef4444 !important; color: #fff !important;
}

.option-btn.eliminated {
    opacity: .2; cursor: not-allowed; transform: none !important;
    border-color: transparent !important; background: rgba(20, 10, 40, 0.4) !important;
    text-decoration: line-through; pointer-events: none;
}

@keyframes pulseSelected {
    0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 22px rgba(245, 158, 11, 0.7); }
}
@keyframes correctFlash {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Painel de Explicação Bíblica */
.explanation-panel {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 16px; padding: 1rem 1.2rem;
    display: flex; flex-direction: column; gap: .4rem;
    animation: slideUp .4s ease;
}
.explanation-panel.hidden { display: none; }
.exp-ref {
    font-size: .85rem; font-weight: 800; color: #86efac;
    display: flex; align-items: center; gap: .4rem;
}
.exp-text {
    font-size: .95rem; line-height: 1.45; color: #f8fafc;
}
.next-question-btn {
    align-self: flex-end; margin-top: .4rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none; color: #fff; font-family: inherit; font-size: 1rem; font-weight: 800;
    padding: .65rem 1.4rem; border-radius: 12px; cursor: pointer;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
    transition: all .2s ease;
}
.next-question-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(34, 197, 94, 0.5); }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Modais (Início, Evangelhos, Pastores, Escada, Ranking, Vitória, Fim)
   ============================================================ */
.modal {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(8, 2, 22, 0.85);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    opacity: 1; transition: opacity .3s ease;
}
.modal.hidden { display: none; opacity: 0; pointer-events: none; }

.modal-content {
    background: var(--glass-bg);
    border: 2px solid rgba(251, 191, 36, 0.35);
    border-radius: 24px; padding: 1.6rem 1.4rem;
    max-width: 540px; width: 100%; max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,.7);
    display: flex; flex-direction: column; gap: 1.2rem;
    animation: popIn .35s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes popIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header { text-align: center; display: flex; flex-direction: column; gap: .3rem; }
.modal-header h2 {
    font-size: 1.8rem; font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #ea580c);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.modal-subtitle { font-size: .95rem; color: var(--text-secondary); }

/* Seleção de Modo (Infantil vs Adulto) */
.mode-selection-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: .8rem;
}
.mode-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px; padding: 1.1rem .8rem;
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem;
    cursor: pointer; transition: all .2s ease;
}
.mode-card .mode-icon { font-size: 2.2rem; }
.mode-card h3 { font-size: 1.1rem; font-weight: 800; color: #fff; }
.mode-card p { font-size: .8rem; color: var(--text-secondary); line-height: 1.35; }
.mode-card .badge-questions {
    background: rgba(251, 191, 36, 0.2); color: var(--gold);
    padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 800;
}
.mode-card:hover, .mode-card.active {
    border-color: var(--gold);
    background: rgba(251, 191, 36, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.25);
}

.instructions-box {
    background: rgba(0, 0, 0, 0.3); border-radius: 16px; padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex; flex-direction: column; gap: .6rem;
}
.inst-item {
    display: flex; align-items: flex-start; gap: .6rem;
    font-size: .85rem; color: var(--text-primary); line-height: 1.4;
}
.inst-item strong { color: var(--gold); }

.btn-start-game {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border: none; color: #12062e; font-family: inherit; font-size: 1.15rem; font-weight: 900;
    padding: .9rem; border-radius: 16px; cursor: pointer;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    transition: all .2s ease; width: 100%;
}
.btn-start-game:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(245, 158, 11, 0.6); }

/* ============================================================
   Modal dos 4 Evangelhos (Cartas Interativas)
   ============================================================ */
.evangelhos-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem;
    margin: .5rem 0;
}
@media (min-width: 480px) {
    .evangelhos-grid { grid-template-columns: repeat(4, 1fr); }
}

.evangelho-card {
    height: 140px; border-radius: 16px;
    perspective: 800px; cursor: pointer;
    background: transparent;
}
.evangelho-inner {
    position: relative; width: 100%; height: 100%;
    text-align: center; transition: transform .6s cubic-bezier(.4,0,.2,1);
    transform-style: preserve-3d;
}
.evangelho-card.flipped .evangelho-inner { transform: rotateY(180deg); }

.evangelho-front, .evangelho-back {
    position: absolute; inset: 0; width: 100%; height: 100%;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 16px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: .3rem; padding: .6rem;
}
.evangelho-front {
    background: linear-gradient(135deg, #1e0a47, #311175);
    border: 2px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 8px 20px rgba(0,0,0,.5);
}
.evangelho-front .front-icon { font-size: 2rem; }
.evangelho-front .front-title { font-size: .85rem; font-weight: 800; color: var(--gold); }

.evangelho-back {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #12062e; transform: rotateY(180deg);
    border: 2px solid #fff;
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.7);
}
.evangelho-back .back-number { font-size: 2.4rem; font-weight: 900; line-height: 1; }
.evangelho-back .back-label { font-size: .75rem; font-weight: 800; text-align: center; }

/* ============================================================
   Modal dos Pastores (Votação e Gráfico)
   ============================================================ */
.pastores-chart {
    display: flex; flex-direction: column; gap: .75rem; margin: .5rem 0;
}
.chart-row {
    display: flex; flex-direction: column; gap: .25rem;
}
.chart-info {
    display: flex; justify-content: space-between; font-size: .85rem; font-weight: 700;
}
.chart-bar-bg {
    height: 16px; background: rgba(255, 255, 255, 0.1);
    border-radius: 999px; overflow: hidden;
}
.chart-bar-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    border-radius: 999px;
    transition: width 1s cubic-bezier(.4,0,.2,1);
}
.chart-bar-fill.highest {
    background: linear-gradient(90deg, #fbbf24, #22c55e);
}

/* ============================================================
   Efeito de Arrebatamento ☁️
   ============================================================ */
.arrebatamento-overlay {
    position: fixed; inset: 0; z-index: 700;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(56, 189, 248, 0.8), transparent);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.arrebatamento-overlay.active {
    opacity: 1; pointer-events: auto;
}
.arrebatamento-content {
    display: flex; flex-direction: column; align-items: center; gap: .8rem;
    animation: ascendAnim 1.8s ease-in-out forwards;
}
.arrebatamento-icon { font-size: 5rem; filter: drop-shadow(0 0 25px rgba(255,255,255,0.9)); }
.arrebatamento-title { font-size: 2rem; font-weight: 900; color: #12062e; text-align: center; }

@keyframes ascendAnim {
    0% { transform: translateY(40px) scale(0.8); opacity: 0; }
    30% { transform: translateY(0) scale(1); opacity: 1; }
    80% { transform: translateY(-40px) scale(1.1); opacity: 1; }
    100% { transform: translateY(-120px) scale(0.6); opacity: 0; }
}

/* ============================================================
   Modal da Escala de Prêmios (Pirâmide de Talentos)
   ============================================================ */
.ladder-list {
    display: flex; flex-direction: column-reverse; gap: .35rem;
    max-height: 55vh; overflow-y: auto; padding-right: .3rem;
}
.ladder-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: .45rem .8rem; border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    font-size: .85rem; font-weight: 700; color: var(--text-secondary);
}
.ladder-item.current {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.4));
    border: 1px solid var(--gold); color: #fff;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}
.ladder-item.milestone {
    border-left: 3px solid #22c55e; color: #86efac;
}
.ladder-item.passed {
    opacity: .5;
}

/* ============================================================
   Modal do Ranking 👑
   ============================================================ */
.ranking-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
}
.rank-tab-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary); font-family: inherit; font-size: .9rem; font-weight: 800;
    padding: .6rem; border-radius: 12px; cursor: pointer; transition: all .2s ease;
}
.rank-tab-btn.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
    border-color: var(--gold); color: #fff;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.ranking-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.2rem 0 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.page-size-selector {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.page-size-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.page-size-buttons {
    display: flex;
    gap: 0.25rem;
}
.page-size-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.page-size-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--gold);
}
.page-size-btn.active {
    background: var(--gold);
    color: #12062e;
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
}
.ranking-count-badge {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 0.22rem 0.6rem;
    border-radius: 20px;
}

.ranking-list {
    display: flex; flex-direction: column; gap: .45rem;
    max-height: 46vh; overflow-y: auto; padding-right: .3rem;
}
.rank-item {
    display: flex; align-items: center; justify-content: space-between; gap: .8rem;
    padding: .6rem .85rem; border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform .2s ease;
}
.rank-item:hover { transform: translateX(3px); background: rgba(255, 255, 255, 0.08); }

/* 🥇 1º Lugar (Ouro) */
.rank-item.top-1 {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.26), rgba(217, 119, 6, 0.18));
    border: 2px solid rgba(251, 191, 36, 0.85);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.35);
}
.rank-item.top-1 .rank-pos {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #12062e;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
    border-radius: 8px;
}
.rank-item.top-1 .rank-name {
    color: #fef08a;
    font-size: 1.02rem;
}

/* 🥈 2º Lugar (Prata) */
.rank-item.top-2 {
    background: linear-gradient(135deg, rgba(203, 213, 225, 0.2), rgba(148, 163, 184, 0.14));
    border: 2px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 0 14px rgba(203, 213, 225, 0.25);
}
.rank-item.top-2 .rank-pos {
    background: linear-gradient(135deg, #e2e8f0, #94a3b8);
    color: #0f172a;
    box-shadow: 0 0 8px rgba(203, 213, 225, 0.5);
    border-radius: 8px;
}
.rank-item.top-2 .rank-name {
    color: #f1f5f9;
}

/* 🥉 3º Lugar (Bronze) */
.rank-item.top-3 {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(194, 65, 12, 0.14));
    border: 2px solid rgba(249, 115, 22, 0.75);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.2);
}
.rank-item.top-3 .rank-pos {
    background: linear-gradient(135deg, #fb923c, #c2410c);
    color: #fff;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
    border-radius: 8px;
}
.rank-item.top-3 .rank-name {
    color: #ffedd5;
}

/* 🏅 Top 5 (4º e 5º) */
.rank-item.top-5 {
    background: rgba(129, 140, 248, 0.12);
    border: 1.5px solid rgba(129, 140, 248, 0.65);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.15);
}
.rank-item.top-5 .rank-pos {
    background: rgba(129, 140, 248, 0.3);
    color: #c7d2fe;
    border-radius: 8px;
}

.rank-pos {
    font-size: 1.2rem; font-weight: 900; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; flex-shrink: 0;
}
.rank-info {
    display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0;
}
.rank-name {
    font-size: .95rem; font-weight: 800; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-date {
    font-size: .72rem; color: var(--text-secondary);
}
.rank-score {
    font-size: .95rem; font-weight: 900; color: var(--gold); text-align: right; flex-shrink: 0;
}
.ranking-empty {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem;
    padding: 2rem 1rem; color: var(--text-secondary); font-size: .9rem;
}

/* Pagination Nav */
.ranking-pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.page-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.page-nav-btn:hover:not(:disabled) {
    background: var(--gold);
    color: #12062e;
    border-color: var(--gold);
}
.page-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.rank-page-indicator {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* Salvar Nome no Ranking */
.save-ranking-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px; padding: .85rem 1rem;
    display: flex; flex-direction: column; gap: .4rem;
    text-align: left;
}
.save-ranking-lbl {
    font-size: .8rem; font-weight: 700; color: var(--gold);
}
.save-ranking-row {
    display: flex; gap: .5rem;
}
.player-name-input {
    flex: 1; background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px; padding: .55rem .8rem;
    color: #fff; font-family: inherit; font-size: .95rem; font-weight: 700;
    outline: none; transition: border-color .2s ease;
}
.player-name-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}
.btn-save-ranking {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border: none; color: #12062e; font-family: inherit; font-size: .85rem; font-weight: 900;
    padding: .55rem 1rem; border-radius: 12px; cursor: pointer;
    transition: all .2s ease; white-space: nowrap;
}
.btn-save-ranking:hover:not(:disabled) {
    transform: translateY(-1px); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}
.btn-save-ranking:disabled {
    background: rgba(34, 197, 94, 0.4); color: #fff; cursor: default;
}
.char-hint {
    font-size: .7rem; color: var(--text-secondary); opacity: .8;
}

/* ============================================================
   Modal de Vitória e Derrota / Fim
   ============================================================ */
.victory-panel {
    text-align: center; border-color: var(--gold);
}
.victory-icon { font-size: 3.8rem; line-height: 1; }
.victory-prize {
    font-size: 2.2rem; font-weight: 900;
    color: var(--gold); text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}
.end-stats {
    display: grid; grid-template-columns: 1fr 1fr; gap: .7rem;
    background: rgba(0,0,0,.3); border-radius: 16px; padding: .8rem;
}
.end-stat-box { display: flex; flex-direction: column; align-items: center; }
.end-stat-box .lbl { font-size: .75rem; color: var(--text-secondary); }
.end-stat-box .val { font-size: 1.2rem; font-weight: 900; color: #fff; }

.modal-buttons {
    display: flex; flex-direction: column; gap: .6rem; width: 100%;
}
.btn-whatsapp {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none; color: #fff; font-family: inherit; font-size: 1rem; font-weight: 800;
    padding: .85rem; border-radius: 14px; cursor: pointer; transition: all .2s ease;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(34, 197, 94, 0.55); }

.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border: none; color: #12062e; font-family: inherit; font-size: 1rem; font-weight: 800;
    padding: .8rem; border-radius: 14px; cursor: pointer; transition: all .2s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4); }

.btn-secondary {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
    color: #fff; font-family: inherit; font-size: .95rem; font-weight: 700;
    padding: .75rem; border-radius: 14px; cursor: pointer; transition: all .2s ease;
}
.btn-secondary:hover { background: rgba(255,255,255,.16); }

/* Footer */
footer {
    display: flex; justify-content: center; align-items: center; gap: .6rem;
    padding: .8rem; font-size: .8rem; color: var(--text-secondary);
}
footer img { height: 28px; width: auto; opacity: .85; }

/* Scrollbar estilizada */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,.2); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
