/* =========================================================================
   1. ANIMAÇÕES GLOBAIS
   ========================================================================= */
@keyframes rotacaoHoraria { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulsacaoRoleta { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes pulsacaoBolaLeve { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(239,68,68,0.5), 0 0 0 2px #fff; }
    50% { transform: scale(1.1); box-shadow: 0 3px 12px rgba(239,68,68,0.7), 0 0 0 2px #fff; }
}

#divProgress1 img[src*='bola_'], #divProgress2 img[src*='bola_'], #penalti img[src*='bola_'], #falta img[src*='bola_'], #trilha img[src*='bola_'] {
    animation: pulsacaoBolaLeve 3.2s ease-in-out infinite !important;
    transform-origin: center center;
}

.roleta-icon img {
    animation: pulsacaoRoleta 2s ease-in-out infinite;
    transform-origin: center center;
}

body.cursor-chuteira-ativo a.chute-disponivel,
body.cursor-chuteira-ativo a.chute-disponivel img {
    cursor: var(--cursor-chuteira, pointer) !important;
}

#penalti a.chute-disponivel,
#falta a.chute-disponivel,
#trilha a.chute-disponivel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    isolation: isolate;
    z-index: 20;
}

#penalti a.chute-disponivel::before,
#falta a.chute-disponivel::before,
#trilha a.chute-disponivel::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 25%, rgba(190, 255, 214, 0.45) 0%, rgba(17, 98, 57, 0.18) 42%, rgba(8, 56, 33, 0) 74%),
        linear-gradient(180deg, rgba(17, 98, 57, 0.92) 0%, rgba(8, 56, 33, 0.94) 100%);
    box-shadow:
        0 0 0 2px rgba(190, 255, 214, 0.68),
        0 4px 10px rgba(8, 56, 33, 0.45),
        inset 0 1px 2px rgba(255, 255, 255, 0.55),
        inset 0 -2px 2px rgba(0, 0, 0, 0.34);
    z-index: 0;
    pointer-events: none;
}

#penalti a.chute-disponivel img,
#falta a.chute-disponivel img,
#trilha a.chute-disponivel img {
    position: relative;
    z-index: 1;
    display: block;
    width: 54px;
    height: 54px;
    border-radius: 50%;
}

.chute-label {
    position: absolute;
    top: 117px;
    min-width: 64px;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: "Trebuchet MS", "Arial Black", Arial, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #f4fff7;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
    background: linear-gradient(180deg, rgba(17, 98, 57, 0.92) 0%, rgba(8, 56, 33, 0.94) 100%);
    border: 1px solid rgba(190, 255, 214, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    z-index: 40;
    pointer-events: none;
}

.chute-label::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ceffe1;
    box-shadow: 0 0 6px rgba(206, 255, 225, 0.8);
    flex: 0 0 6px;
}

.chute-label-auto { left: 53px; }
.chute-label-penalti { left: 47px; }
.chute-label-falta { left: 53px; }
.chute-label-trilha { left: 53px; }

#chute_auto,
#chute_auto1,
#chute_auto2,
#chute_auto3 {
    position: absolute;
    overflow: visible;
    isolation: isolate;
}

#chute_auto #divProgress,
#chute_auto1 #divProgress1,
#chute_auto2 #divProgress2,
#chute_auto3 #divProgress3 {
    position: absolute;
    z-index: 10;
}

#chute_auto #divProgress svg,
#chute_auto1 #divProgress1 svg,
#chute_auto2 #divProgress2 svg,
#chute_auto3 #divProgress3 svg {
    position: absolute;
    z-index: 11;
}

#divProgress .chute-inner-canvas,
#divProgress1 .chute-inner-canvas,
#divProgress2 .chute-inner-canvas,
#divProgress3 .chute-inner-canvas {
    position: absolute;
    left: 9px;
    top: 10px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 12;
}

#chute_auto #tempoa,
#chute_auto1 #tempoa1,
#chute_auto2 #tempoa2,
#chute_auto3 #tempoa3 {
    position: absolute;
    z-index: 14;
    transform: scale(0.95);
    transform-origin: center center;
}

#chute_auto1 #tempoa1,
#chute_auto2 #tempoa2,
#chute_auto3 #tempoa3 {
    transform: none;
}

#chute_auto1 #penalti,
#chute_auto2 #falta,
#chute_auto3 #trilha {
    position: relative;
    z-index: 18;
}

/* =========================================================================
   2. ESTRUTURA BASE (CENTRALIZAÇÃO PERFEITA NO MOBILE E PC)
   ========================================================================= */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 1000px;
    height: 100%;
    background-color: #0b0f19;
}

body {
    text-align: center;
    position: relative;
    font-family: Tahoma, sans-serif;
    background-image: url('../img/layout/grama1.png');
    background-position: top center;
    background-repeat: repeat;
}

.layout-root {
    position: relative;
    width: 1000px;
    margin: 0 auto;
    text-align: left;
}

table { display: table !important; }

/* =========================================================================
   3. TOPBAR (BLINDADA E CENTRALIZADA)
   ========================================================================= */
.brgol-topbar {
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -500px;
    width: 1000px;
    height: 30px;
    z-index: 75;
}

/* Redes Sociais */
.top-social, .is-logado .top-social, .is-deslogado .top-social {
    position: absolute !important;
    top: 4px !important;
    left: 18px !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    z-index: 76;
}

.top-social a {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.top-social img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Busca */
.topbar-search {
    position: absolute !important;
    top: 3px !important;
    left: 105px !important;
    width: 188px !important;
    height: 22px !important;
    background-image: url('../img/layout/searchbar.png');
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 76;
}

.brgol-topbar #searchbar {
    outline: none;
    background: transparent;
    border: 0;
    font-family: Helvetica, sans-serif;
    font-size: 11px;
    width: 160px;
    position: relative;
    left: 20px;
    color: #fff;
}

.topbar-dev-wrap {
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 14px;
    z-index: 95;
}

.topbar-dev-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 580px;
    min-height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 210, 74, 0.48);
    background: linear-gradient(180deg, rgba(12, 34, 18, 0.86) 0%, rgba(5, 22, 12, 0.9) 100%);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    font-family: "Segoe UI", "Montserrat", "Trebuchet MS", Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #ffd24a !important;
    -webkit-text-fill-color: #ffd24a;
    line-height: 1;
    text-shadow: 0 1px 2px #000;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.topbar-dev-info:link,
.topbar-dev-info:visited,
.topbar-dev-info:hover,
.topbar-dev-info:active {
    color: #ffd24a !important;
    -webkit-text-fill-color: #ffd24a;
    text-decoration: none;
}

.topbar-dev-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    margin-right: 6px;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6));
}

.topbar-dev-wrap:hover .topbar-dev-info,
.topbar-dev-wrap:focus-within .topbar-dev-info {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.65),
        0 0 16px rgba(255, 210, 74, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.topbar-dev-modal {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translate(-50%, 10px);
    width: 760px;
    max-width: calc(100vw - 28px);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 210, 74, 0.62);
    background:
        radial-gradient(circle at 14% 14%, rgba(255, 210, 74, 0.16) 0%, rgba(255, 210, 74, 0) 38%),
        linear-gradient(160deg, rgba(6, 26, 48, 0.96) 0%, rgba(8, 19, 38, 0.96) 56%, rgba(4, 12, 24, 0.98) 100%);
    box-shadow:
        0 20px 44px rgba(0, 0, 0, 0.68),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.topbar-dev-modal::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translateX(-50%) rotate(45deg);
    border-left: 1px solid rgba(255, 210, 74, 0.62);
    border-top: 1px solid rgba(255, 210, 74, 0.62);
    background: rgba(7, 28, 49, 0.96);
}

.topbar-dev-wrap:hover .topbar-dev-modal,
.topbar-dev-wrap:focus-within .topbar-dev-modal {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.topbar-dev-modal-title {
    font-family: "Segoe UI", "Montserrat", "Trebuchet MS", Arial, sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #ffd24a;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 2px;
}

.topbar-dev-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.topbar-dev-modal-logo {
    width: 59px;
    height: 59px;
    object-fit: contain;
    flex: 0 0 auto;
    border-radius: 8px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.topbar-dev-modal-header-main {
    flex: 1;
    min-width: 0;
}

.topbar-dev-modal-subtitle {
    font-family: "Segoe UI", "Montserrat", "Trebuchet MS", Arial, sans-serif;
    font-size: 12px;
    color: #dbeafe;
    margin-bottom: 8px;
}

.topbar-dev-modal-actions {
    margin-bottom: 0;
}

.topbar-dev-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid rgba(80, 240, 128, 0.75);
    background: linear-gradient(180deg, #24c15c 0%, #149b43 100%);
    box-shadow:
        0 4px 12px rgba(18, 116, 53, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    font-family: "Segoe UI", "Montserrat", "Trebuchet MS", Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #f4fff5 !important;
    -webkit-text-fill-color: #f4fff5;
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.topbar-dev-whatsapp-btn:link,
.topbar-dev-whatsapp-btn:visited,
.topbar-dev-whatsapp-btn:hover,
.topbar-dev-whatsapp-btn:active {
    color: #f4fff5 !important;
    -webkit-text-fill-color: #f4fff5;
    text-decoration: none;
}

.topbar-dev-whatsapp-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow:
        0 8px 16px rgba(18, 116, 53, 0.55),
        0 0 14px rgba(80, 240, 128, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.topbar-dev-modal-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.topbar-dev-modal-item {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(9, 30, 54, 0.9) 0%, rgba(8, 21, 41, 0.9) 100%);
    padding: 9px 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topbar-dev-modal-item strong {
    display: block;
    font-family: "Segoe UI", "Montserrat", "Trebuchet MS", Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #ffe48f;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.topbar-dev-modal-item span {
    display: block;
    font-family: "Segoe UI", "Montserrat", "Trebuchet MS", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.36;
    color: #e6f0ff;
}

.topbar-dev-modal-item-full {
    grid-column: 1 / -1;
}

@media (max-width: 860px) {
    .topbar-dev-info {
        max-width: 92vw;
        font-size: 10px;
    }

    .topbar-dev-modal {
        width: 94vw;
    }

    .topbar-dev-modal-list {
        grid-template-columns: 1fr;
    }

    .topbar-dev-modal-header {
        gap: 8px;
    }

    .topbar-dev-modal-logo {
        width: 48px;
        height: 48px;
    }
}

/* Item 4: Chip Central (Rodada/Temporada) */
.topbar-round-chip {
    position: absolute !important;
    top: 3px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-family: Helvetica, sans-serif !important;
    font-size: 12px !important;
    color: #FFF !important;
    font-weight: bold !important;
    padding: 0 12px !important;
    line-height: 22px !important;
    border-radius: 12px !important;
    background: rgba(7, 19, 39, 0.86) !important;
    border: 1px solid rgba(164, 207, 255, 0.30) !important;
    z-index: 76 !important;
    white-space: nowrap !important;
}

/* Item 5: RELÓGIO - POSICIONADO LOGO APÓS O CHIP CENTRAL */
.topbar-clock {
    position: absolute !important;
    top: 6px !important;
    left: 50% !important;
    transform: translateX(130px) !important;
    color: #EAF7FF !important;
    font-family: visitor, Ackbar, "Courier New", monospace !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    font-variant-numeric: tabular-nums;
    text-shadow:
        0 0 6px rgba(75, 200, 255, 0.55),
        0 1px 0 rgba(0, 0, 0, 0.85);
    z-index: 80 !important;
    white-space: nowrap !important;
}

.topbar-round-wrap {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 80;
}

.topbar-round-wrap .topbar-round-chip {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

.topbar-round-wrap .topbar-clock {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 0 8px;
    line-height: 22px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(5, 18, 41, 0.72) 100%);
    border: 1px solid rgba(120, 200, 255, 0.36);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 1px 4px rgba(0, 0, 0, 0.35);
    z-index: 80 !important;
}

/* Nome do Jogador e Botão Sair */
.topbar-user-right {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    position: absolute;
    top: 3px;
    right: 6px;
    z-index: 80;
}

.topbar-player-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 118px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 12px;
    color: #FFFFFF;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.85);
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(7,19,39,0.72);
    border: 1px solid rgba(164,207,255,0.30);
    height: 20px;
}

.topbar-player-status {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(7,19,39,0.7), 0 0 8px rgba(34,197,94,0.6);
}

.login-btn {
    padding: 0 8px;
    font-family: Tahoma, sans-serif;
    font-size: 10px;
    cursor: pointer;
    background: linear-gradient(180deg, #81c784 0%, #66bb6a 30%, #4CAF50 70%, #43a047 100%);
    color: white;
    border: none;
    border-radius: 4px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(76,175,80,0.55), inset 0 1px 0 rgba(255,255,255,0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    transition: all .2s ease;
}

/* =========================================================================
   4. ÍCONES FLUTUANTES E BOLAS
   ========================================================================= */
.roleta-icon, .loja-icon, .desafio-icon, .minigame-icon {
    position: absolute;
    top: 75px;
    width: 54px;
    height: 54px;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 10;
}

.roleta-icon { left: 145px; }
.loja-icon { left: 210px; }
.minigame-icon { left: 275px; }
.desafio-icon { left: 335px; }

.roleta-icon img, .loja-icon img, .desafio-icon img, .minigame-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bola-1 { filter: sepia(60%) saturate(150%) brightness(0.95) contrast(1.2); }
.bola-2 { filter: grayscale(30%) brightness(1.3) contrast(1.2); }
.bola-3 { filter: sepia(40%) saturate(200%) hue-rotate(-20deg) brightness(1.15); }

.bola-1, .bola-2, .bola-3 {
    position: relative;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.bola-1:hover, .bola-2:hover, .bola-3:hover {
    transform: scale(1.05);
}

.maintenance-banner { display: none !important; }
