:root {
    --primary: #006CE6; /* Branding Blue */
    --secondary: #0056b3; /* Darker Blue */
    --accent: #FEE440; /* Cheerful Yellow */
    --bg-gradient: linear-gradient(135deg, #0076f5 0%, #004da3 100%);
    --glass: rgba(255, 255, 255, 0.95);
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 12px;
    --p1-color: #4FC3F7;
    --p1-border: #0277BD;
    --p2-color: #FF5252;
    --p2-border: #C62828;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    background-image: url('../imgs/png_alpha.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Outfit', sans-serif;
    color: #333;
    overflow: hidden;
}

#game-container {
    position: relative;
    box-shadow: 
        0 20px 80px rgba(0, 0, 0, 0.4),
        0 0 0 8px #ffffff, /* sólido: com transparência a sombra de trás fazia um vinco cinza */
        0 0 0 14px var(--secondary);
    border-radius: var(--radius-lg);
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 24px;
    transform-origin: center center;
    flex-shrink: 0;
}

canvas {
    display: block;
    background-color: #4CAF50; /* Softer green */
    border-radius: var(--radius-md);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
}

#ui-layer {
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: calc(100% + 30px); /* Compensa o offset negativo */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 40px;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 10;
}

.score-top, .score-bottom {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.player-score {
    padding: 12px 28px;
    background: white;
    border: 4px solid;
    border-radius: 50px; /* Pill shape */
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

#p1-score { 
    color: var(--p1-color);
    border-color: var(--p1-border);
}

#p2-score { 
    color: var(--p2-color);
    border-color: var(--p2-border);
}

#p3-score { 
    color: #00C853;
    border-color: #00897B;
}

#p4-score { 
    color: #FF6F00;
    border-color: #E65100;
}

/* --- SIDEBAR & MENU --- */

#menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 500; /* Mais alto que tudo para não sumir */
    background: white;
    border: 4px solid var(--secondary);
    color: var(--secondary);
    width: 50px;
    height: 50px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 10px 30px rgba(0, 108, 230, 0.2);
    backdrop-filter: blur(8px);
}

#menu-toggle:hover {
    background: var(--secondary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 290px;
    height: 100%;
    background: white;
    z-index: 1000;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0.4s;
    border-right: 6px solid var(--secondary);
    display: flex;
    flex-direction: column;
    padding: 50px 25px;
    box-shadow: 20px 0 80px rgba(0, 0, 0, 0.1);
}

#sidebar.active {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}



.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 45px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 28px;
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: -1px;
}

#sidebar-close {
    background: #f0f0f0;
    border: none;
    color: #888;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

#sidebar-close:hover {
    background: var(--p2-color);
    color: white;
    transform: rotate(90deg);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border: 3px solid #f0f0f0;
    color: #555;
    padding: 18px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
}

.menu-item i {
    width: 24px;
    text-align: center;
    font-size: 20px;
    color: var(--secondary);
}

.menu-item:hover {
    background: var(--secondary);
    color: white;
    transform: translateX(10px) scale(1.02);
    border-color: white;
    box-shadow: 0 10px 20px rgba(0, 108, 230, 0.2);
}

.menu-item:hover i {
    color: white;
}

.sidebar-footer {
    color: #aaa;
    font-size: 13px;
    text-align: center;
    font-weight: 600;
    padding-top: 20px;
}

/* --- OVERLAYS & MODALS --- */

/* Hide everything by default if it has the .hidden class */
.hidden, #modal-overlay.hidden, #avatar-modal-overlay.hidden, #sidebar-overlay.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.modal-overlay, #modal-overlay, #avatar-modal-overlay, #sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 108, 230, 0.4);
    backdrop-filter: blur(12px);
    z-index: 1000; /* Above everything */
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.3s;
}

/* Base Modal Show Logic */
.modal-overlay.active, #modal-overlay.active, #avatar-modal-overlay.active, #sidebar-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

/* Explicitly hidden state */
.hidden {
    display: none !important;
}

.modal {
    background: white;
    border: 6px solid var(--secondary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    padding: 30px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2);
    animation: modalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes modalPop {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h3 {
    margin: 0;
    font-size: 26px;
    color: var(--secondary);
    font-weight: 800;
}

.modal-close, .avatar-modal-close {
    background: #f0f0f0;
    border: none;
    color: #888;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover, .avatar-modal-close:hover {
    background: var(--p2-color);
    color: white;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: auto;
    scrollbar-color: #006CE6 #f0f7ff; /* Blue Theme */
    padding-right: 25px; /* More room for the chunky scrollbar */
    margin-right: -10px;
}

/* Custom Scrollbar - MEGA CHUNKY - ALWAYS VISIBLE */
.modal-body::-webkit-scrollbar {
    width: 26px; /* Super thick */
    display: block !important;
}
.modal-body::-webkit-scrollbar-track {
    background: #f0f7ff; /* Light blue track */
    border-radius: 10px;
}
.modal-body::-webkit-scrollbar-thumb {
    background: var(--secondary); /* Always Purple! */
    border-radius: 10px;
    border: none; /* No border = full 26px thickness! */
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-group label {
    color: #444;
    font-size: 15px;
    font-weight: 700;
    padding-left: 4px;
}

.setting-group input[type="text"] {
    background: #f8f9fa;
    border: 3px solid #eee;
    padding: 16px 20px;
    border-radius: 18px;
    color: #333;
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    outline: none;
    transition: all 0.3s;
}

.setting-group input[type="text"]:focus {
    border-color: var(--secondary);
    background: white;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #f8f9fa;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 2px solid #eee;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider-container span:first-child {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    min-width: 90px;
}

.vol-value {
    font-size: 14px;
    color: var(--secondary);
    font-weight: 800;
    min-width: 45px;
    text-align: right;
}

input[type="range"] {
    flex-grow: 1;
    height: 10px;
    background: #ddd;
    border-radius: 10px;
    accent-color: var(--secondary);
    cursor: pointer;
}

.modal-footer {
    margin-top: 35px;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, #006CE6 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(155, 93, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 108, 230, 0.3);
}

.btn-secondary {
    background: #eee;
    color: #666;
    border: none;
    padding: 16px 32px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #e0e0e0;
    color: #333;
}

/* --- AVATAR CREATOR --- */

.character-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 18px;
    max-height: 220px;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: auto;
    scrollbar-width: auto;
    scrollbar-color: #006CE6 #f0f7ff; /* Blue Theme */
    padding-right: 10px;
}

/* Character Grid Scrollbar - MEGA CHUNKY - ALWAYS VISIBLE */
.character-grid::-webkit-scrollbar {
    width: 26px;
    display: block !important;
}

.character-grid::-webkit-scrollbar-track {
    background: #f0f7ff; /* Light blue track */
    border-radius: 10px;
}

.character-grid::-webkit-scrollbar-thumb {
    background: var(--secondary); /* Always Purple! */
    border-radius: 10px;
    border: none; /* No border = full 26px thickness! */
}

.character-grid::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

.character-item {
    background: #f8f9fa;
    border: 4px solid transparent;
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.character-item:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.character-item.selected {
    background: white;
    border-color: var(--secondary);
    box-shadow: 0 15px 30px rgba(0, 108, 230, 0.1);
}

.character-item canvas {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.character-item span {
    font-size: 11px;
    color: #555;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.character-item.selected span {
    color: var(--secondary);
}

.avatar-preview-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fdfdfd;
    border-radius: 24px;
    padding: 14px 20px 16px;
    flex-shrink: 0; /* nunca espremer (cortava a cabeça e a dica) */
    border: 4px dashed #eee;
    position: relative;
    overflow: hidden;
}

.avatar-preview-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 108, 230, 0.05) 0%, transparent 70%);
}

#avatar-canvas {
    width: 116px; height: 116px; /* prévia menor: sobra espaço para nome e poder embaixo */
    background: transparent;
    box-shadow: none;
    position: relative;
    z-index: 1;
}

.btn-block {
    display: block;
    width: 100%;
    background: #f8f9fa;
    color: #333;
    border: 3px solid #eee;
    padding: 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: center;
    font-weight: 800;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 15px;
    font-family: inherit;
    text-transform: uppercase;
}

.btn-block i {
    margin-right: 10px;
    color: var(--secondary);
    font-size: 18px;
}

.btn-block:hover {
    background: white;
    border-color: var(--secondary);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 108, 230, 0.1);
}

/* --- Game Over Modal & Tela de Campeão (Widescreen Celebratório) --- */
/* --- Game Over Modal & Tela de Campeão (Widescreen Celebratório) --- */
.game-over-card {
    background: #ffffff;
    width: min(96vw, 920px);
    max-width: 940px;
    max-height: min(94vh, 690px);
    overflow-y: auto;
    padding: 24px 28px 22px;
    border-radius: 32px;
    text-align: center;
    position: relative;
    box-shadow: 
        0 24px 60px -12px rgba(0, 36, 100, 0.28),
        0 10px 24px -6px rgba(0, 0, 0, 0.1);
    border: 4px solid #3b82f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: popIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    box-sizing: border-box;
}

/* Estado Campeão da Disputa (Ouro / Brilho Festivo) */
.game-over-card.is-champion {
    border-color: #f59e0b;
    box-shadow: 
        0 24px 70px -10px rgba(245, 158, 11, 0.38),
        0 10px 24px -6px rgba(0, 0, 0, 0.12),
        inset 0 0 35px rgba(254, 240, 138, 0.25);
}

@keyframes popIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.go-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
}

.go-title-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.go-title-sparkle {
    width: 18px;
    height: 6px;
    background: #facc15;
    border-radius: 4px;
    box-shadow: 0 0 0 2px #000000;
    position: relative;
}

.go-title-sparkle.left {
    transform: rotate(20deg);
}

.go-title-sparkle.left::after {
    content: '';
    position: absolute;
    top: 9px;
    left: -4px;
    width: 14px;
    height: 5px;
    background: #facc15;
    border-radius: 4px;
    box-shadow: 0 0 0 2px #000000;
    transform: rotate(-35deg);
}

.go-title-sparkle.right {
    transform: rotate(-20deg);
}

.go-title-sparkle.right::after {
    content: '';
    position: absolute;
    top: 9px;
    right: -4px;
    width: 14px;
    height: 5px;
    background: #facc15;
    border-radius: 4px;
    box-shadow: 0 0 0 2px #000000;
    transform: rotate(35deg);
}

#go-title {
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 38px;
    margin: 0;
    color: #facc15;
    line-height: 1.1;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    -webkit-text-stroke: 2.5px #000000;
    text-shadow: 0 4px 0 #000000;
}

.game-over-card.is-champion #go-title {
    color: #fde047;
}

#go-message {
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #334155;
    margin: 0;
    line-height: 1.35;
}

/* Corpo Horizontal: Pódio do Palco Azul na esquerda, Painel de Detalhes na direita */
.go-body {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

/* Painel Esquerdo: Palco do Pódio com Holofotes Azuis, Confetes e Blocos 3D */
.go-stage-pane {
    flex: 1.05;
    min-width: 360px;
    height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: radial-gradient(circle at 50% 20%, #1e40af 0%, #1d4ed8 40%, #0f172a 100%);
    border: 3px solid #000000;
    border-radius: 26px;
    padding: 0;
    box-sizing: border-box;
    box-shadow: 0 8px 0 #000000;
    position: relative;
    overflow: hidden;
}

/* Efeito de Feixes de Holofote no fundo */
.go-stage-spotlights {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: 
        conic-gradient(from 170deg at 50% 0%, rgba(255, 255, 255, 0.25) 0deg, transparent 20deg, transparent 40deg, rgba(255, 255, 255, 0.2) 60deg, transparent 80deg),
        radial-gradient(circle at 25% 40%, rgba(255, 255, 255, 0.8) 0%, transparent 2px);
    background-size: 100% 100%, 80px 80px;
}

/* Painel Direito: Estatísticas & Ações */
/* Painel Direito: Estatísticas & Ações (Widescreen Cartoon Vibrante) */
.go-details-pane {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
    background: #ffffff;
    border: 3px solid #3b82f6;
    border-radius: 26px;
    padding: 16px 18px 18px;
    box-sizing: border-box;
    box-shadow: 0 10px 25px rgba(0, 108, 230, 0.08);
}

.go-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    width: 100%;
}

.go-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
}

.go-section-title {
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 900;
    color: #0f2b5c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.go-title-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #000000;
    font-size: 13px;
    flex-shrink: 0;
}

.go-title-badge-icon.trophy {
    background: #fde047;
    color: #854d0e;
}

.go-title-badge-icon.bomb {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #475569;
}

/* Badge de Alvo estilizado com troféu saltado no topo como no print */
.go-section-target {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fde047 0%, #facc15 100%);
    border: 2.5px solid #000000;
    border-radius: 14px;
    padding: 6px 14px 5px;
    box-shadow: 0 4px 0 #000000;
    cursor: default;
    user-select: none;
    margin-top: 6px;
}

.go-target-trophy {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: #eab308;
    filter: drop-shadow(0 2px 0 #000000) drop-shadow(0 -1px 0 #000000) drop-shadow(1px 0 0 #000000) drop-shadow(-1px 0 0 #000000);
}

.go-target-text {
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 900;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Destaques da rodada: seção compacta e harmoniosa */
.go-section-awards {
    margin-top: 2px;
    gap: 8px;
}

.go-section-awards .go-section-title {
    font-size: 13px;
    font-weight: 900;
    color: #1e293b;
}

.go-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: auto;
    padding-top: 6px;
}

.go-buttons button {
    width: 100%;
    padding: 12px 18px;
    border-radius: 18px;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
}

#btn-restart {
    background: linear-gradient(180deg, #0088ff 0%, #0066ee 100%);
    color: #ffffff;
    border: 3px solid #003399;
    box-shadow: 0 5px 0 #002b80, 0 8px 16px rgba(0, 102, 238, 0.35);
}

.game-over-card.is-champion #btn-restart {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    border: 3px solid #92400e;
    box-shadow: 0 5px 0 #78350f, 0 8px 16px rgba(245, 158, 11, 0.4);
}

#btn-restart .go-key {
    background: #0052cc;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 900;
}

#btn-restart:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #002b80, 0 10px 20px rgba(0, 102, 238, 0.4);
}

#btn-restart:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #002b80;
}

#btn-lobby {
    background: #ffffff;
    color: #1e3a8a;
    border: 3px solid #1e3a8a;
    box-shadow: 0 5px 0 #0f172a, 0 4px 10px rgba(0, 0, 0, 0.05);
}

#btn-lobby:hover {
    transform: translateY(-2px);
    background: #f8fafc;
    box-shadow: 0 7px 0 #0f172a, 0 6px 14px rgba(0, 0, 0, 0.08);
}

#btn-lobby:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #0f172a;
}

@media (max-width: 768px) {
    .go-body {
        flex-direction: column;
    }
    .go-stage-pane {
        min-width: 0;
        width: 100%;
    }
    .go-details-pane {
        min-width: 0;
        width: 100%;
    }
}

/* ============================================
   Placar com poderes + tela de vitória (v2.1)
   ============================================ */
.player-score {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 7px 18px 8px;
    border-radius: 22px;
    line-height: 1.1;
    transition: opacity .3s, filter .3s;
}
.player-score .ps-head { display: flex; align-items: center; gap: 8px; width: 100%; }
.player-score .ps-name { font-weight: 900; font-size: 14px; letter-spacing: .3px; }
.player-score .ps-you {
    background: currentColor;
    border-radius: 8px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 900;
    -webkit-text-fill-color: #fff; /* texto branco sobre a cor do jogador */
}
.player-score .ps-keys { font-size: 10px; color: #90A4AE; font-weight: 700; }
.player-score .ps-wins { margin-left: auto; color: #E0A800; font-weight: 900; font-size: 13px; }
.player-score .ps-wins i { margin-right: 3px; }
.player-score .ps-stats { display: flex; gap: 10px; font-size: 12px; font-weight: 800; color: #455A64; }
.player-score .ps-stats i { margin-right: 3px; }
.player-score .ps-stats .fa-bomb { color: #263238; }
.player-score .ps-stats .fa-fire { color: #FF9100; }
.player-score .ps-stats .fa-shoe-prints { color: #2962FF; }
.player-score .ps-stats .fa-heart { color: #E53935; }
.player-score .ps-glove { color: #E91E63; }
.player-score.dead { opacity: .45; filter: grayscale(1); }

/* A regra global "canvas { background verde }" é da arena: estes não podem herdar */
#go-confetti {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}
#game-over-modal .game-over-card { z-index: 2; }
.go-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* --- Seletor de personagem: colunas cabem na largura do modal ---
   (antes: 3 colunas 1fr + nomes sem quebra empurravam a 3ª coluna para fora) */
.character-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    max-height: 262px;
    overflow-x: hidden;
}

.character-item {
    min-width: 0;
    padding: 8px 4px;
    gap: 6px;
}

.character-item span {
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: keep-all;
    min-height: 2.4em; /* nomes de 1 ou 2 linhas: cartões da mesma altura */
}

/* ===================== CONTROLES (botão ? / F1) ===================== */
#help-modal-overlay { z-index: 6000; }
#help-modal { max-width: 660px; }
#help-modal .modal-header { margin-bottom: 16px; }
#help-modal .modal-header h3 i { margin-right: 6px; }
#help-body { overflow-y: auto; padding-right: 4px; }

#help-toggle {
    position: fixed;
    top: 78px;        /* logo abaixo do menu (☰), sem cobrir o placar do P1 */
    left: 24px;
    z-index: 500;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    border: 4px solid var(--secondary);
    background: white;
    color: var(--secondary);
    font-size: 17px;
    border-width: 3px;
    border-radius: 14px;
    cursor: pointer;
    transition: transform .2s, background .2s;
}
#help-toggle:hover { background: var(--secondary); color: white; }

/* Tecla desenhada (tecla de teclado com "altura") */
kbd.hk, button.hk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    margin: 2px;
    border-radius: 9px;
    background: linear-gradient(#ffffff, #eef1f6);
    border: 2px solid #c9d1dc;
    box-shadow: 0 4px 0 #b3bdcb, 0 6px 10px rgba(0, 0, 0, 0.08);
    color: #263238;
    font: 800 16px 'Outfit', sans-serif;
    text-transform: uppercase;
    transform: translateY(-2px);
}
kbd.hk.wide, button.hk.wide { min-width: 64px; font-size: 13px; letter-spacing: .5px; }

.hk-tabs { display: flex; gap: 6px; background: #eef1f5; padding: 5px; border-radius: 16px; margin-bottom: 14px; }
.hk-tabs button {
    flex: 1; padding: 10px; border: none; border-radius: 12px; background: transparent;
    font: 700 15px 'Outfit', sans-serif; color: #607d8b; cursor: pointer;
}
.hk-tabs button.on { background: white; color: var(--secondary); box-shadow: 0 3px 10px rgba(0,0,0,0.08); }

.hk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 10px; }
.hk-card {
    border: 3px solid var(--pc);
    border-radius: 18px;
    padding: 10px 14px 12px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 10%, white), white 60%);
}
.hk-card-title {
    display: inline-block;
    padding: 2px 12px;
    margin-bottom: 6px;
    border-radius: 999px;
    background: var(--pc);
    color: white;
    font-weight: 800;
    letter-spacing: 1px;
}
.hk-move, .hk-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.hk-pad { display: inline-flex; flex-direction: column; align-items: center; }
.hk-pad > div { display: flex; }
.hk-keys { display: flex; align-items: center; flex-wrap: wrap; }
.hk-or { color: #90a4ae; font-weight: 700; font-size: 13px; margin: 0 6px; }
.hk-text { color: #455a64; font-size: 15px; }
.hk-text b { color: #263238; }

/* Símbolos "bomba" e "ação": os mesmos aparecem na lista de itens */
.hk-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 10px; color: white; font-size: 15px; flex-shrink: 0;
}
.hk-badge.mini { width: 24px; height: 24px; border-radius: 7px; font-size: 12px; vertical-align: -6px; }
.is-bomb .hk-badge, .hk-badge.is-bomb { background: #263238; }
.is-action .hk-badge, .hk-badge.is-action { background: #00ACC1; }

.hk-h { margin: 18px 0 8px; color: var(--secondary); font-size: 18px; font-weight: 800; }
.hk-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 8px; }
.hk-item {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 8px 10px; border-radius: 14px; background: #f6f8fb;
}
.hk-item .hk-name { display: block; color: #263238; font-size: 15px; }
.hk-item span b { color: #37474f; }
.hk-item span { color: #546e7a; font-size: 13.5px; line-height: 1.35; }
.hk-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
    background: var(--ic); color: white; font-size: 18px;
    border: 2px solid white; box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
/* .hk-item span (texto cinza) pegava o ícone também: símbolo branco com contorno escuro, legível em qualquer cor */
.hk-item .hk-icon { color: #fff; font-size: 20px; line-height: 1; }
.hk-item .hk-badge { color: #fff; }
.hk-item .hk-badge.mini { width: 26px; height: 26px; font-size: 13px; margin: 0 2px; }
.hk-item .hk-icon i { filter: drop-shadow(0 1px 0 rgba(0,0,0,.45)) drop-shadow(0 0 2px rgba(0,0,0,.35)); }
.hk-foot { margin: 14px 0 0; color: #90a4ae; font-size: 13px; text-align: center; }
.hk-foot kbd.hk { height: 28px; min-width: 40px; font-size: 12px; }

/* Tela cheia (ícone de cantoneiras + F11), logo abaixo do ? */
#fs-toggle {
    position: fixed;
    top: 128px;
    left: 24px;
    z-index: 500;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 3px solid var(--secondary);
    background: white;
    color: var(--secondary);
    cursor: pointer;
    transition: transform .2s, background .2s;
}
#fs-toggle:hover { background: var(--secondary); color: white; transform: scale(1.1); }
[data-fullscreen] { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
[data-fullscreen] i { font-size: 15px; }
[data-fullscreen] .fs-key { font: 800 9px 'Outfit', sans-serif; margin-top: 2px; letter-spacing: .3px; }

/* Troca de teclas no painel Controles */
button.hk.hk-edit { cursor: pointer; transition: transform .1s, border-color .15s; }
button.hk.hk-edit:hover { border-color: var(--pc, var(--secondary)); box-shadow: 0 4px 0 color-mix(in srgb, var(--pc, #006CE6) 55%, #b3bdcb), 0 6px 12px rgba(0,0,0,0.1); }
button.hk.hk-edit:active { transform: translateY(1px); box-shadow: 0 1px 0 #b3bdcb; }
button.hk.listening {
    background: #FFF8D6;
    border-color: #FFB300;
    color: #E65100;
    animation: hk-blink .7s ease-in-out infinite;
}
button.hk.flash { animation: hk-ok .9s ease-out; }
@keyframes hk-blink { 50% { box-shadow: 0 4px 0 #FFB300, 0 0 0 5px rgba(255, 179, 0, 0.35); } }
@keyframes hk-ok { 0% { background: #C8F7D2; border-color: #2E7D32; } 100% { } }
kbd.hk.fixed { opacity: .55; }
.hk-card-head { display: flex; align-items: center; justify-content: space-between; }
.hk-reset {
    border: none; background: transparent; color: #607d8b; cursor: pointer;
    font: 700 13px 'Outfit', sans-serif; padding: 4px 6px; border-radius: 8px;
}
.hk-reset:hover { background: #eceff1; color: #263238; }
.hk-tip { margin: 0 0 10px; color: #546e7a; font-size: 14px; }
.hk-tip i { color: var(--secondary); }
.hk-note { margin-top: 8px; padding: 7px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.hk-note.ok { background: #E8F5E9; color: #2E7D32; }
.hk-note.bad { background: #FFEBEE; color: #C62828; }
.hk-note.wait { background: #FFF8E1; color: #8D6E00; }
button.hk.empty { color: #b0bec5; border-style: dashed; background: #fafbfc; }

/* Jogo, não página: clicar/arrastar não seleciona texto nem arrasta imagens.
   Campos de digitar e o código da sala continuam selecionáveis (copiar/colar). */
html, body { -webkit-user-select: none; user-select: none; }
img, svg, canvas { -webkit-user-drag: none; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }

/* Dica de tecla no botão "Jogar novamente" */
.go-key {
    display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px;
    background: rgba(255,255,255,.25); border: 1px solid rgba(255,255,255,.55); border-bottom-width: 3px;
    font: 700 12px 'Outfit', sans-serif; letter-spacing: .5px; vertical-align: 2px;
}

/* Ícones próprios (jss/icons.js): mesmo tamanho e cor de um ícone do Font Awesome */
svg.gi { width: 1.1em; height: 1em; vertical-align: -0.125em; display: inline-block; overflow: visible; }
.hk-item .hk-icon svg.gi { filter: drop-shadow(0 1px 0 rgba(0,0,0,.45)) drop-shadow(0 0 2px rgba(0,0,0,.35)); }
.hk-credit { margin: 6px 0 0; color: #b0bec5; font-size: 11px; text-align: center; }
.hk-badge svg.gi { width: 1.25em; height: 1.25em; }
.ps-stats svg.gi, .ps-glove svg.gi { width: 1.15em; height: 1.15em; vertical-align: -0.2em; }

/* Volume Geral: em destaque, separado dos volumes de cada som */
.slider-container.vol-master { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 2px dashed rgba(0,0,0,0.1); }
.slider-container.vol-master span:first-child { font-weight: 800; color: var(--secondary, #0056b3); }
/* Volumes alinhados: nome | controle | % (todas as linhas com as mesmas colunas) */
.slider-group .slider-container { display: grid; grid-template-columns: 132px minmax(0, 1fr) 48px; align-items: center; gap: 14px; }
.slider-group .slider-container span:first-child { min-width: 0; white-space: nowrap; }
.slider-group .slider-container input[type="range"] { width: 100%; margin: 0; }

/* ============================================
   Placar dos cantos v2: maior e mais limpo (todas as idades)
   selo P1..P4 + nome grande + troféus · ícones grandes com números
   ============================================ */
.player-score {
    gap: 6px;
    padding: 9px 16px 10px;
    border-radius: 20px;
    border-width: 4px;
    min-width: 230px;
    text-transform: none;
    background: rgba(255, 255, 255, 0.96);
}
.player-score .ps-head { gap: 8px; }
.player-score .ps-slot {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 30px; height: 24px; padding: 0 6px; border-radius: 8px;
    background: currentColor; font: 900 13px 'Outfit', sans-serif;
}
.player-score .ps-slot { -webkit-text-fill-color: #fff; }
.player-score .ps-name { font-size: 18px; font-weight: 900; letter-spacing: .3px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-score .ps-you { font-size: 11px; padding: 2px 7px; }
.player-score .ps-wins { font-size: 17px; }
.player-score .ps-stats { gap: 12px; font-size: 16px; color: #37474F; align-items: center; flex-wrap: wrap; }
.player-score .ps-stat { display: inline-flex; align-items: center; gap: 4px; }
.player-score .ps-stat b { font-weight: 900; }
.player-score .ps-stats svg.gi, .player-score .ps-glove svg.gi { width: 22px; height: 22px; vertical-align: middle; }
.player-score .ps-glove { display: inline-flex; padding: 3px; border-radius: 8px; background: rgba(0, 0, 0, 0.05); }
/* Cor de cada ícone (igual às cartas de item) */
.player-score .ps-stat:nth-child(1) svg { color: #263238; }
.player-score .ps-stat:nth-child(2) svg { color: #FF8F00; }
.player-score .ps-stat:nth-child(3) svg { color: #3c28f5; }
.player-score .ps-stat:nth-child(4) svg { color: #2E9E1F; }
.player-score .ps-glove svg { color: #6A1B9A; }

/* --- Pódio Olímpico em Blocos 3D estilo Arcade Cartoon --- */
.go-podium {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
    padding-bottom: 0;
}

.go-podium-steps {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

.go-pod {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.go-pod canvas {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: block;
    margin-bottom: -4px;
    z-index: 3;
}

.go-pod-1 canvas {
    animation: winner-bounce 1.3s ease-in-out infinite;
}

/* Blocos 3D com Números Gigantes */
.go-step {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #000000;
    box-sizing: border-box;
    position: relative;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-weight: 900;
}

.go-step-num {
    font-size: 52px;
    color: #ffffff;
    -webkit-text-stroke: 3px #000000;
    text-shadow: 0 4px 0 #000000;
    line-height: 1;
    z-index: 2;
}

/* 1º Lugar - Bloco Amarelo Ouro (Centro, Mais Alto) */
.go-step-1 {
    height: 140px;
    background: linear-gradient(180deg, #fde047 0%, #eab308 100%);
    border-radius: 12px 12px 0 0;
    box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.6);
    z-index: 4;
}

.go-step-1 .go-step-num {
    font-size: 64px;
    color: #ffffff;
}

/* 2º Lugar - Bloco Cinza / Prata (Esquerda) */
.go-step-2 {
    height: 100px;
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 12px 0 0 0;
    border-right: none;
    box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.8);
    z-index: 2;
}

/* 3º Lugar - Bloco Laranja / Bronze (Direita) */
.go-step-3 {
    height: 80px;
    background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
    border-radius: 0 12px 0 0;
    border-left: none;
    box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.6);
    z-index: 2;
}

/* Barra de Rodapé do Palco com as 4 Cores e o 4º Lugar */
.go-stage-basebar {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 3px solid #000000;
    position: relative;
    background: linear-gradient(90deg, 
        #ef4444 0%, #ef4444 25%, 
        #3b82f6 25%, #3b82f6 50%, 
        #22c55e 50%, #22c55e 75%, 
        #f97316 75%, #f97316 100%
    );
}

.go-rest-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 3px 14px;
    box-shadow: 0 3px 0 #000000;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 13px;
    color: #000000;
    z-index: 5;
}

.go-rest-pill .go-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid #000000;
}

/* Ícones de Troféu à esquerda do nome no card */
.go-card-trophy {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: 
        drop-shadow(1px 0 0 #000000) 
        drop-shadow(-1px 0 0 #000000) 
        drop-shadow(0 1.5px 0 #000000) 
        drop-shadow(0 -1px 0 #000000);
}

.go-card-trophy.gold-cup { color: #fde047; }
.go-card-trophy.silver-cup { color: #f1f5f9; }
.go-card-trophy.bronze-cup { color: #d97706; }
.go-card-trophy.green-cup { color: #15803d; }
/* Destaques da Rodada (Linhas limpas com divisória como no print) */
.go-awards {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    border: 2px solid #e0f2fe;
    overflow: hidden;
}

.go-awards:empty { display: none; }

.go-award {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    background: #ffffff;
    border: none;
    border-bottom: 1.5px solid #e0f2fe;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    box-sizing: border-box;
}

.go-award:last-child {
    border-bottom: none;
}

.go-award .go-aicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 15px;
    flex-shrink: 0;
}

.go-award .go-aicon.bombs {
    color: #1e293b;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

.go-award .go-aicon.items {
    color: #ef4444;
    filter: drop-shadow(0 1px 1px rgba(239, 68, 68, 0.3));
}

.go-award .go-aicon.kills {
    color: #f97316;
    filter: drop-shadow(0 1px 1px rgba(249, 115, 22, 0.4));
}

.go-award-text {
    flex: 1;
    min-width: 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.go-award-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.go-award-who {
    font-size: 13.5px;
    color: #0f172a;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.go-award em.go-award-val {
    font-style: normal;
    font-weight: 900;
    color: #0284c7;
    font-size: 17px;
    min-width: 26px;
    text-align: right;
    flex-shrink: 0;
}

.go-award-empty {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
    padding: 10px 14px;
    text-align: center;
}

/* Placar da Disputa (Cartões Arcade Vibrantes com Borda Grossa e Troféus Alinhados) */
.go-scores {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
}

.go-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 18px;
    border: 3px solid #000000;
    box-shadow: 0 4px 0 #000000;
    color: #000000;
    box-sizing: border-box;
    transition: transform 0.1s ease;
}

/* 4 Cores Temáticas Vibrantes como no Print */
.go-score.pslot-1 {
    background: linear-gradient(180deg, #ffdf00 0%, #facc15 100%); /* Amarelo IA4 */
}

.go-score.pslot-2 {
    background: linear-gradient(180deg, #fb923c 0%, #f97316 100%); /* Laranja IA2 */
}

.go-score.pslot-3 {
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%); /* Azul VOCÊ */
    color: #000000;
}

.go-score.pslot-4 {
    background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%); /* Verde IA3 */
}

.go-score-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.go-score .go-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid #000000;
    background: radial-gradient(circle at 35% 35%, #ff4b8b 0%, #c2185b 80%, #880e4f 100%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.go-score.pslot-3 .go-dot {
    background: radial-gradient(circle at 35% 35%, #00bbf9 0%, #0077b6 80%, #03045e 100%);
}

.go-score.pslot-4 .go-dot {
    background: radial-gradient(circle at 35% 35%, #10b981 0%, #059669 80%, #064e3b 100%);
}

.go-score-nick {
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    letter-spacing: 0.3px;
    color: #000000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Fileira de Troféus (Preenchidos em Ouro vs Silhueta/Vazios em Tom Escuro) */
.go-score-trophies {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.go-cup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.go-cup.filled {
    color: #fde047;
    filter: 
        drop-shadow(1px 0 0 #000000) 
        drop-shadow(-1px 0 0 #000000) 
        drop-shadow(0 1.5px 0 #000000) 
        drop-shadow(0 -1px 0 #000000);
}

/* ============================================
   Placar em BARRA ÚNICA no topo (estilo clássico), acima da arena
   esquerda: P1 · P3 (nascem à esquerda) — direita: P4 · P2 (nascem à direita)
   ============================================ */
#game-container { padding-top: 96px; }
#ui-layer {
    top: 16px;
    height: auto;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 24px;
}
#ui-layer .score-top, #ui-layer .score-bottom { display: contents; }
#p1-score { order: 1; }
#p3-score { order: 2; }
#p4-score { order: 4; }
#p2-score { order: 5; }
#ui-layer .player-score { min-width: 0; flex: 0 1 260px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); }
#ui-layer .player-score.push-right { margin-left: auto; }
/* Barra: tudo numa linha (poderes menores), altura fixa, sem cobrir o relógio da rodada */
#game-container { padding-top: 104px; }
#ui-layer .player-score { flex: 0 1 300px; height: 74px; justify-content: center; overflow: hidden; }
#ui-layer .player-score .ps-stats { flex-wrap: nowrap; gap: 9px; }
#ui-layer .player-score .ps-glove { padding: 2px; }
#ui-layer .player-score .ps-glove svg.gi { width: 18px; height: 18px; }
#game-container { padding-top: 124px; } /* barra + respiro: não encosta nas cabeças da 1ª fileira */

/* Cortina das transições (jss/transitions.js) */
#screen-fade {
    position: fixed; inset: 0; z-index: 20000; pointer-events: none;
    background: #0b1a33; opacity: 0;
}
/* Tela de vitória entra com fade (o cartão já faz o "pop") */
#game-over-modal { animation: go-fade-in .3s ease both; }
@keyframes go-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Barra do topo enxuta: uma linha só — selo · nome · vidas · troféus */
#game-container { padding-top: 88px; }
#ui-layer .player-score {
    flex-direction: row; align-items: center; gap: 10px;
    height: 54px; padding: 0 16px; flex: 0 1 270px; border-radius: 18px;
}
#ui-layer .player-score .ps-name { flex: 1; min-width: 0; font-size: 19px; }
#ui-layer .player-score .ps-lives { display: inline-flex; align-items: center; gap: 4px; font-size: 18px; color: #2E9E1F; }
#ui-layer .player-score .ps-lives svg.gi { width: 22px; height: 22px; }
#ui-layer .player-score .ps-lives b { font-weight: 900; color: #263238; }
#ui-layer .player-score .ps-wins { margin-left: 0; font-size: 18px; }
#ui-layer .player-score .ps-slot { height: 28px; min-width: 34px; font-size: 15px; }

/* Relógio da rodada no topo (centralizado no espaço entre os jogadores) */
#round-clock {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: #0f172a;
    border: 2.5px solid #e2e8f0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16), 0 2px 4px rgba(15, 23, 42, 0.08);
    color: #ffffff;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.5px;
    z-index: 25;
    pointer-events: none;
    user-select: none;
    box-sizing: border-box;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
}
#round-clock #round-clock-icon {
    font-size: 16px;
    color: #94a3b8;
    transition: color 0.2s;
}
#round-clock.urgent {
    background: #e11d48;
    border-color: #fda4af;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(225, 29, 72, 0.35);
    animation: clock-heartbeat 0.5s infinite alternate ease-in-out;
}
#round-clock.urgent #round-clock-icon {
    color: #ffffff;
}
#round-clock.pressure {
    background: #dc2626;
    border-color: #facc15;
    color: #facc15;
    font-size: 17px;
    box-shadow: 0 4px 22px rgba(220, 38, 38, 0.45);
    animation: clock-heartbeat 0.35s infinite alternate ease-in-out;
}
#round-clock.pressure #round-clock-icon {
    color: #facc15;
}
@keyframes clock-heartbeat {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.08); }
}

/* --- Modal de Confirmação: Fechar o Jogo --- */
#quit-modal-overlay {
    z-index: 8000;
}
.quit-modal {
    max-width: 440px;
    text-align: center;
}
.quit-modal-body {
    padding: 16px 10px 8px;
}
.quit-modal-text {
    font-size: 1.18rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.5;
}
.quit-modal-footer {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}
.btn-danger-quit {
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.28);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-danger-quit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 28px rgba(211, 47, 47, 0.42);
}
.btn-danger-quit:active {
    transform: translateY(0) scale(0.98);
}
.menu-item-quit {
    margin-top: auto;
    color: #e53935 !important;
}
.menu-item-quit:hover {
    background: rgba(229, 57, 53, 0.1) !important;
    color: #d32f2f !important;
}


/* ===================================================================================
   TELA DE FIM v2 (go2-*): fita com o título na cor do vencedor, palco com o CHÃO e os
   BLOCOS do mapa jogado (--fa/--fb chão, --ht/--hf/--hd/--hl/--hb bloco; postos pelo
   jogo), placar da melhor de 3 nas cores reais dos jogadores (uma fileira de troféus por
   jogador), destaques e botões no estilo do lobby.
   =================================================================================== */
#game-over-modal .go2-card *, #game-over-modal .go2-card *::before, #game-over-modal .go2-card *::after { box-sizing: border-box; }
#game-over-modal .go2-card {
    --win: #0076f5;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    width: min(880px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 34px 26px 24px;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(6, 20, 50, .45), 0 0 0 6px rgba(255, 255, 255, .25);
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    color: #263238;
    user-select: none; -webkit-user-select: none;
    animation: popIn .5s cubic-bezier(.175, .885, .32, 1.275);
}

/* --- Fita do título --- */
#game-over-modal .go2-ribbon {
    position: relative;
    margin: 0 auto 20px;
    width: fit-content;
    max-width: calc(100% - 40px);
    padding: 10px 34px 12px;
    background: var(--win);
    border-radius: 14px;
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18), 0 8px 18px rgba(0, 0, 0, .18);
}
#game-over-modal .go2-ribbon #go-title {
    margin: 0;
    font: 800 clamp(1.6rem, 3.8vw, 2.35rem)/1.1 'Fredoka', 'Outfit', sans-serif;
    letter-spacing: 1px;
    color: #fff !important;
    background: none !important;
    -webkit-text-fill-color: #fff !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: 0 3px 0 rgba(0, 0, 0, .28), 0 6px 14px rgba(0, 0, 0, .18);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#game-over-modal .go2-ribbon-end {
    position: absolute;
    top: 12px;
    width: 26px; height: 100%;
    background: var(--win-dark, #0b4fa0);
    z-index: -1;
}
#game-over-modal .go2-ribbon-end.left { left: -16px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
#game-over-modal .go2-ribbon-end.right { right: -16px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
#game-over-modal .go2-card.is-champion .go2-ribbon { background: linear-gradient(135deg, #FFD54F, #FF9800); }
#game-over-modal .go2-card.is-champion .go2-ribbon-end { background: #E65100; }
#game-over-modal .go2-card.is-draw .go2-ribbon { background: #78909C; }
#game-over-modal .go2-card.is-draw .go2-ribbon-end { background: #455A64; }

/* --- Corpo: palco + lado --- */
#game-over-modal .go2-body { display: grid; grid-template-columns: 1.05fr 1fr; gap: 18px; align-items: stretch; }
@media (max-width: 720px) { #game-over-modal .go2-body { grid-template-columns: 1fr; } }

/* Palco: chão quadriculado do mapa jogado + vinheta; degraus = blocos da arena */
#game-over-modal .go2-stage {
    --fa: #81C784; --fb: #43A047;
    --ht: #B0BEC5; --hf: #78909C; --hd: #546E7A; --hl: #37474F; --hb: #CFD8DC;
    position: relative;
    min-height: 300px;
    border-radius: 22px;
    overflow: hidden;
    background: repeating-conic-gradient(var(--fa) 0 25%, var(--fb) 0 50%) 0 0 / 48px 48px;
    border: 4px solid var(--hd);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
#game-over-modal .go2-stage::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, .3), transparent 60%),
                linear-gradient(180deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .3));
    pointer-events: none;
}
#game-over-modal .go2-arena {
    position: absolute;
    top: 10px; left: 12px;
    z-index: 1;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 1px;
}
#game-over-modal .go2-podium {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    padding: 40px 14px 0;
}
#game-over-modal .go2-pod { display: flex; flex-direction: column; align-items: center; width: 33%; max-width: 160px; }
#game-over-modal .go2-pod-1 canvas { width: 125%; max-width: none; }
#game-over-modal .go2-pod canvas { width: 100%; height: auto; background: none; box-shadow: none; border: none; border-radius: 0; display: block; margin-bottom: -8px; }
#game-over-modal .go2-name {
    max-width: 100%;
    margin-bottom: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--pc);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
}
/* Degrau = bloco da arena: topo claro, frente, base escura, parafusos */
#game-over-modal .go2-step {
    position: relative;
    width: 100%;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, var(--ht) 0 18px, var(--hf) 18px calc(100% - 10px), var(--hd) calc(100% - 10px));
    border: 3px solid var(--hl);
    border-bottom: none;
    display: flex;
    justify-content: center;
    padding-top: 24px;
}
#game-over-modal .go2-step::before, #game-over-modal .go2-step::after {
    content: '';
    position: absolute;
    top: 58%;
    width: 7px; height: 7px;
    border-radius: 2px;
    background: var(--hb);
}
#game-over-modal .go2-step::before { left: 9px; }
#game-over-modal .go2-step::after { right: 9px; }
#game-over-modal .go2-step-1 { height: 124px; }
#game-over-modal .go2-step-2 { height: 90px; }
#game-over-modal .go2-step-3 { height: 66px; padding-top: 16px; }
#game-over-modal .go2-medal {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid; place-items: center;
    font: 700 1.15rem 'Fredoka', 'Outfit', sans-serif;
    color: #fff;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .25);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 3px 6px rgba(0, 0, 0, .25);
    border: 3px solid #fff;
}
#game-over-modal .go2-step-1 .go2-medal { width: 42px; height: 42px; font-size: 1.4rem; background: linear-gradient(180deg, #FFE082, #FFB300); }
#game-over-modal .go2-step-2 .go2-medal { background: linear-gradient(180deg, #ECEFF1, #90A4AE); }
#game-over-modal .go2-step-3 .go2-medal { background: linear-gradient(180deg, #FFCC80, #C77C3B); }
/* Pódio v2: degraus em ouro / prata / bronze (face de cima em relevo, frente com faixa e brilho),
   raios girando atrás do campeão e sombra no chão. Por cima do visual "bloco da arena" acima. */
#game-over-modal .go2-step { --s1: #FFE58A; --s2: #FFC233; --s3: #E08E0B; --sl: #A86500; }
#game-over-modal .go2-step-2 { --s1: #F4F7FA; --s2: #CBD5E1; --s3: #94A3B8; --sl: #5E6B7D; }
#game-over-modal .go2-step-3 { --s1: #FFD3A8; --s2: #E9A066; --s3: #B86A2C; --sl: #7A4114; }
#game-over-modal .go2-step {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 16px) top / 100% 16px no-repeat,
        linear-gradient(180deg, var(--s1) 0 16px, var(--s2) 16px calc(100% - 12px), var(--s3) calc(100% - 12px));
    border: 3px solid var(--sl);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    box-shadow: inset 0 -12px 0 rgba(0, 0, 0, .12), inset 6px 0 0 rgba(255, 255, 255, .18), 0 10px 18px rgba(0, 0, 0, .28);
    overflow: hidden;
}
/* faixa de brilho que passa pela frente (só no 1º) */
#game-over-modal .go2-step-1 > .go2-medal { position: relative; z-index: 1; }
#game-over-modal .go2-step::before, #game-over-modal .go2-step::after { background: rgba(255, 255, 255, .7); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
#game-over-modal .go2-medal {
    font-size: 1.25rem;
    border-color: rgba(255, 255, 255, .95);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 4px 0 rgba(0, 0, 0, .18), 0 6px 12px rgba(0, 0, 0, .25);
}
#game-over-modal .go2-step-1 .go2-medal { width: 50px; height: 50px; font-size: 1.65rem; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), 0 0 0 4px rgba(255, 213, 79, .45), 0 8px 16px rgba(0, 0, 0, .3); }
/* brilho passando no degrau do campeão */
#game-over-modal .go2-step-1 { position: relative; }
#game-over-modal .go2-pod-1 .go2-step { animation: go2-step-in .5s .1s cubic-bezier(.2, .9, .3, 1.3) both; }
#game-over-modal .go2-pod-2 .go2-step { animation: go2-step-in .5s .25s cubic-bezier(.2, .9, .3, 1.3) both; }
#game-over-modal .go2-pod-3 .go2-step { animation: go2-step-in .5s .4s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes go2-step-in { from { transform: translateY(40px) scaleY(.6); opacity: 0; } to { transform: none; opacity: 1; } }
#game-over-modal .go2-pod-1 .go2-step > .go2-shine {
    position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    animation: go2-shine 2.8s 1s ease-in-out infinite;
    pointer-events: none;
}
@keyframes go2-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
/* raios de luz atrás do campeão */
#game-over-modal .go2-pod-1 { position: relative; }
#game-over-modal .go2-pod-1::before {
    content: '';
    position: absolute;
    left: 50%; top: 0;
    width: 230px; height: 230px;
    margin-left: -115px; margin-top: -40px;
    border-radius: 50%;
    background: repeating-conic-gradient(rgba(255, 236, 160, .55) 0 10deg, rgba(255, 236, 160, 0) 10deg 24deg);
    -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%);
    mask: radial-gradient(circle, #000 25%, transparent 70%);
    animation: go2-rays 14s linear infinite;
    pointer-events: none;
    z-index: -1;
}
@keyframes go2-rays { to { transform: rotate(360deg); } }
/* sombra dos degraus no chão */
#game-over-modal .go2-podium::after {
    content: '';
    position: absolute; left: 8%; right: 8%; bottom: -6px; height: 14px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 0, 0, .35), transparent 70%);
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    #game-over-modal .go2-pod-1::before, #game-over-modal .go2-pod-1 .go2-step > .go2-shine, #game-over-modal .go2-step { animation: none !important; }
}

#game-over-modal .go2-rest {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: var(--hd);
    border-top: 3px solid var(--hl);
}
#game-over-modal .go2-rest:empty { padding: 5px; }
#game-over-modal .go2-rest-pill {
    display: flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    font-size: .8rem;
    font-weight: 700;
}
#game-over-modal .go2-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); }

/* --- Lado direito --- */
#game-over-modal .go2-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#game-over-modal .go2-box {
    padding: 12px 14px;
    border-radius: 18px;
    background: #f5f8fd;
    border: 2px solid #e3ebf6;
}
#game-over-modal .go2-box-title {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    margin-bottom: 10px;
    color: #455a64;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .6px;
}
#game-over-modal .go2-box-title i { color: #FFB300; margin-right: 4px; }
#game-over-modal .go2-target {
    padding: 2px 9px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid #e3ebf6;
    color: #607d8b;
    font-size: .72rem;
    letter-spacing: 0;
}
/* Uma fileira de troféus por jogador (cheios = vitórias; vazios = o que falta) */
#game-over-modal .go2-scores { display: flex; flex-direction: column; gap: 6px; }
#game-over-modal .go2-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px 6px 6px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid #e3ebf6;
    border-left: 6px solid var(--pc);
}
#game-over-modal .go2-row.won { background: #fffaf0; border-color: #ffe0a3; border-left-color: var(--pc); }
#game-over-modal .go2-slot {
    padding: 2px 7px;
    border-radius: 8px;
    background: var(--pc);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
}
#game-over-modal .go2-row-name { flex: 1; min-width: 0; font-weight: 800; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#game-over-modal .go2-cups { display: flex; gap: 3px; }
#game-over-modal .go2-cup { font-size: 1.05rem; color: #dbe3ee; }
#game-over-modal .go2-cup.on { color: #FFB300; filter: drop-shadow(0 2px 0 rgba(180, 110, 0, .35)); }
#game-over-modal .go2-cup.new { animation: go2-cup-pop .6s .35s cubic-bezier(.175, .885, .32, 1.6) both; }
@keyframes go2-cup-pop { from { transform: scale(0) rotate(-30deg); } to { transform: scale(1) rotate(0); } }
#game-over-modal .go2-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; }
#game-over-modal .go2-award {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 9px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid #e3ebf6;
    min-width: 0;
}
#game-over-modal .go2-aicon {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 10px;
    display: grid; place-items: center;
    color: #fff;
    font-size: .9rem;
}
#game-over-modal .go2-aicon.bombs { background: #37474F; }
#game-over-modal .go2-aicon.items { background: #EC407A; }
#game-over-modal .go2-aicon.kills { background: #FF7043; }
#game-over-modal .go2-award-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
#game-over-modal .go2-award-txt small { color: #90a4ae; font-size: .66rem; font-weight: 800; letter-spacing: .5px; }
#game-over-modal .go2-award-txt b { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#game-over-modal .go2-award-txt b em { font-style: normal; color: #0076f5; }
#game-over-modal .go2-empty { color: #90a4ae; font-size: .82rem; font-weight: 600; }

/* --- Botões (mesmo jeito dos do lobby) --- */
#game-over-modal .go2-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
#game-over-modal .go2-card #btn-restart.go2-btn,
#game-over-modal .go2-card #btn-lobby.go2-btn {
    width: 100%;
    margin: 0;
    padding: 14px 18px;
    border: none;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font: 700 1.05rem 'Outfit', 'Segoe UI', sans-serif;
    cursor: pointer;
    transform: none;
    transition: transform .15s, box-shadow .15s, background .15s;
}
#game-over-modal .go2-card #btn-restart.go2-btn {
    background: linear-gradient(135deg, #0076f5 0%, #0056b3 100%);
    color: #fff;
    box-shadow: 0 8px 15px rgba(0, 108, 230, .25);
}
#game-over-modal .go2-card.is-champion #btn-restart.go2-btn { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); box-shadow: 0 8px 15px rgba(46, 204, 113, .25); }
#game-over-modal .go2-card #btn-restart.go2-btn:hover { transform: translateY(-2px); }
#game-over-modal .go2-card #btn-lobby.go2-btn { background: #eef3fb; color: #455a64; box-shadow: none; }
#game-over-modal .go2-card #btn-lobby.go2-btn:hover { background: #dfe9f8; }
#game-over-modal .go2-card .go-key {
    padding: 2px 8px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .22);
    color: #fff;
    font: 700 .7rem 'Outfit', sans-serif;
    border: none;
}

/* Moldura da arena: fundo branco SÓLIDO (com 95% a sombra de trás deixava uma faixa cinza)
   e menos espaço nas laterais/embaixo. O topo (88px) é a barra de placares: não muda. */
#game-container { background: #ffffff; padding: 88px 14px 14px; }
/* Cores por função: continuar = verde (sempre), voltar ao lobby = neutro */
#game-over-modal .go2-card #btn-restart.go2-btn { background: linear-gradient(135deg, #3ddc84 0%, #1fa85a 100%); box-shadow: 0 8px 15px rgba(31, 168, 90, .28); }

/* Menu lateral: cabe na altura da janela (compacta em janelas baixas; no limite, rola) */
#sidebar { box-sizing: border-box; overflow-y: auto; overflow-x: hidden; }
@media (max-height: 760px) {
    #sidebar { padding: 26px 22px; }
    .sidebar-header { margin-bottom: 22px; }
    .sidebar-nav { gap: 10px; }
    .menu-item { padding: 12px 18px; }
}
@media (max-height: 600px) {
    #sidebar { padding: 16px 18px; }
    .sidebar-header { margin-bottom: 12px; }
    .sidebar-header h2 { font-size: 22px; }
    .sidebar-nav { gap: 7px; }
    .menu-item { padding: 9px 16px; font-size: 15px; border-width: 2px; }
    .sidebar-footer { padding-top: 10px; }
}

/* ============================================
   Barra do topo v3: discreta e limpa (vidro escuro, sem borda grossa)
   selo colorido do jogador · nome · vidas · troféus; bot mostra a dificuldade no nome
   ============================================ */
#game-container { padding-top: 76px; }
#ui-layer { top: 14px; gap: 8px; }
#ui-layer .player-score {
    height: 42px; padding: 0 14px 0 6px; gap: 9px; flex: 0 1 240px;
    border: 0; border-radius: 13px;
    background: rgba(15, 23, 42, 0.82);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 -2px 0 currentColor, 0 3px 10px rgba(15, 23, 42, 0.18);
}
#ui-layer .player-score .ps-slot {
    height: 30px; min-width: 36px; padding: 0 7px; border-radius: 9px; font-size: 13px; letter-spacing: .3px;
}
#ui-layer .player-score .ps-name {
    font-size: 15px; font-weight: 800; color: #f1f5f9; -webkit-text-fill-color: #f1f5f9; letter-spacing: .2px;
}
#ui-layer .player-score .ps-name.ps-bot { font-size: 13px; font-weight: 700; color: #94a3b8; -webkit-text-fill-color: #94a3b8; }
#ui-layer .player-score .ps-name.ps-bot i { font-size: 11px; margin-right: 2px; opacity: .8; }
#ui-layer .player-score .ps-name.ps-bot.insano { color: #c4b5fd; -webkit-text-fill-color: #c4b5fd; }
#ui-layer .player-score .ps-name.ps-bot.dificil { color: #fca5a5; -webkit-text-fill-color: #fca5a5; }
#ui-layer .player-score .ps-you { font-size: 10px; padding: 2px 6px; }
#ui-layer .player-score .ps-lives { font-size: 15px; gap: 3px; color: #4ade80; }
#ui-layer .player-score .ps-lives svg.gi { width: 17px; height: 17px; }
#ui-layer .player-score .ps-lives b,
#ui-layer .player-score .ps-wins { color: #e2e8f0; -webkit-text-fill-color: #e2e8f0; font-weight: 800; font-size: 15px; }
#ui-layer .player-score .ps-wins i { color: #fbbf24; -webkit-text-fill-color: #fbbf24; font-size: 14px; margin-right: 4px; }
#ui-layer .player-score.dead { opacity: .4; }
#round-clock {
    height: 36px; padding: 0 14px; font-size: 17px; gap: 6px;
    background: rgba(15, 23, 42, 0.88); border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
}
#round-clock #round-clock-icon { font-size: 13px; }

/* ============================================
   Barra do topo v4: pílulas com cara de jogo (substitui a v3 escura)
   pílula branca com borda na cor do jogador, selo colorido, ícones vivos;
   relógio azul-marinho com o ícone num círculo
   ============================================ */
#game-container { padding-top: 80px; }
#ui-layer { top: 14px; gap: 10px; }
#p1-score { --pb: var(--p1-border); --pf: var(--p1-color); }
#p2-score { --pb: var(--p2-border); --pf: var(--p2-color); }
#p3-score { --pb: #00897B; --pf: #00C853; }
#p4-score { --pb: #E65100; --pf: #FF8F00; }
#ui-layer .player-score {
    height: 46px; padding: 0 16px 0 6px; gap: 9px; flex: 0 1 250px;
    border: 3px solid var(--pb); border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, color-mix(in srgb, var(--pf) 12%, #ffffff) 100%);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 5px 0 color-mix(in srgb, var(--pb) 35%, transparent), 0 8px 18px rgba(15, 23, 42, 0.16);
}
#ui-layer .player-score .ps-slot {
    height: 32px; min-width: 40px; padding: 0 9px; border-radius: 999px; font-size: 14px;
    background: linear-gradient(180deg, var(--pf), var(--pb));
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
}
#ui-layer .player-score .ps-name {
    font-size: 16px; font-weight: 900; color: #1e3a5f; -webkit-text-fill-color: #1e3a5f; letter-spacing: .2px;
}
#ui-layer .player-score .ps-name.ps-bot { font-size: 15px; font-weight: 800; color: #334155; -webkit-text-fill-color: #334155; }
#ui-layer .player-score .ps-name.ps-bot i { display: none; }
#ui-layer .player-score .ps-name.ps-bot.dificil { color: #b91c1c; -webkit-text-fill-color: #b91c1c; }
#ui-layer .player-score .ps-name.ps-bot.insano { color: #6d28d9; -webkit-text-fill-color: #6d28d9; }
#ui-layer .player-score .ps-lives { font-size: 17px; gap: 4px; color: #22a447; }
#ui-layer .player-score .ps-lives svg.gi { width: 21px; height: 21px; }
#ui-layer .player-score .ps-lives b,
#ui-layer .player-score .ps-wins { color: #1e293b; -webkit-text-fill-color: #1e293b; font-weight: 900; font-size: 17px; }
#ui-layer .player-score .ps-wins i { color: #f5b301; -webkit-text-fill-color: #f5b301; font-size: 18px; margin-right: 4px; filter: drop-shadow(0 1px 0 #b7791f); }
#ui-layer .player-score.dead { opacity: .45; filter: grayscale(1); }
#round-clock {
    height: 46px; padding: 0 20px 0 6px; gap: 10px; font-size: 24px; font-weight: 900;
    background: linear-gradient(180deg, #24467e, #142a52);
    border: 3px solid #0d1d3a;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 5px 0 rgba(13, 29, 58, 0.35), 0 8px 18px rgba(15, 23, 42, 0.2);
}
#round-clock #round-clock-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%; font-size: 16px;
    background: #ffffff; color: #1e3a6e;
}
#round-clock.urgent #round-clock-icon, #round-clock.pressure #round-clock-icon { color: #e11d48; }

/* Cartão de controles: "andar" à esquerda e as ações à direita quando há largura
   (online = 1 cartão largo); nos 4 cartões do "mesmo PC" continua empilhado */
.hk-card { container-type: inline-size; }
.hk-body { display: flex; flex-direction: column; }
@container (min-width: 460px) {
    .hk-body { flex-direction: row; align-items: center; gap: 14px; }
    .hk-body .hk-move { flex-direction: column; gap: 4px; margin-top: 0; flex-shrink: 0; }
    .hk-body .hk-actions { flex: 1; padding-left: 14px; border-left: 2px dashed color-mix(in srgb, var(--pc) 30%, #dde3ea); }
    /* Linhas em colunas (teclas | símbolo | texto): os símbolos ficam alinhados mesmo sem a tecla extra */
    .hk-body .hk-actions { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px 10px; }
    .hk-body .hk-actions .hk-row { display: contents; }
}

/* Botão ? com a tecla F1 embaixo (igual ao F11 da tela cheia) */
#help-toggle { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
#help-toggle i { font-size: 15px; }
#help-toggle .fs-key { font: 800 9px 'Outfit', sans-serif; margin-top: 2px; letter-spacing: .3px; }

/* Apoio (pix): link discreto no rodapé do lobby e, mais apagado, no canto da tela de jogo */
.pix-support {
    font: 600 12px 'Outfit', 'Segoe UI', sans-serif;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s, opacity .2s;
}
.pix-support i { color: #4FA3FF; margin-left: 3px; font-size: 11px; }
.pix-support:hover { color: #fff; text-decoration: underline; }
#lobby-screen .pix-support { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; }
#pix-support-game { position: fixed; right: 12px; bottom: 6px; z-index: 400; font-size: 11px; color: #1b2a5a; opacity: 0.35; }
#pix-support-game:hover { opacity: 1; color: #006CE6; }

/* Controle conectado/desconectado (jss/gamepad.js) */
#pad-toast {
    position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 12px);
    z-index: 21000; padding: 8px 16px; border-radius: 999px;
    background: rgba(11, 26, 51, 0.88); color: #fff;
    font: 700 13px 'Outfit', 'Segoe UI', sans-serif;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#pad-toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Cartão do controle no painel Controles */
.hk-pad-card { margin-top: 12px; }
.hk-pad-name { font-size: 12px; color: #607d8b; margin: -4px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-pad-tip { margin-top: 10px; }

/* Seleção de personagem: raio = tem poder; dica do escolhido acima da grade */
.character-item { position: relative; }
/* Modo dev (?dev): verde = personagem já repensado; vermelho = ainda no padrão */
.character-item.dev-remodelado { outline: 3px solid #2ECC71; outline-offset: 2px; }
.character-item.dev-padrao { outline: 3px solid #E74C3C; outline-offset: 2px; }
.char-power-badge { position: absolute; top: 6px; right: 6px; font-size: 11px; color: #FFB300; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
/* Nome + poder do personagem escolhido, embaixo do boneco (economiza espaço vertical) */
.avatar-info { position: relative; z-index: 1; text-align: center; max-width: 420px; }
#avatar-name { display: block; font-size: 17px; font-weight: 800; color: #37474F; line-height: 1.2; }
.avatar-power { margin: 4px 0 0; font-size: 13.5px; line-height: 1.35; color: #78909C; }
.avatar-power .fa-bolt { color: #FFB300; }
.avatar-power b { color: var(--secondary); }
.avatar-power kbd { font-weight: 800; font-size: 12px; line-height: 1; font-family: inherit; padding: 2px 6px; border-radius: 5px; background: #fff3d6; border: 1px solid #f0c060; color: #6b4300; }
/* F1: tecla pequena dentro do texto (poderes dos personagens) */
.hk-key { display: inline-block; font-weight: 800; font-size: 12px; line-height: 1; font-family: inherit; padding: 2px 6px; border-radius: 5px; background: #fff3d6; border: 1px solid #f0c060; color: #6b4300; vertical-align: 1px; }

/* Configurações → Gráficos: qualidade e limite de fps (botões em segmento) */
.gfx-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 14px; background: #f8f9fa; padding: 12px 24px; border-radius: var(--radius-md); border: 2px solid #eee; }
.gfx-row > span { font-size: 14px; font-weight: 700; color: #666; white-space: nowrap; }
.gfx-seg { display: flex; gap: 6px; }
.gfx-seg button { flex: 1; padding: 8px 10px; white-space: nowrap; border: 2px solid #ddd; border-radius: 12px; background: #fff; color: #555; font: 700 14px 'Outfit', sans-serif; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.gfx-seg button:hover { border-color: var(--secondary, #0056b3); }
.gfx-seg button.on { background: var(--secondary, #0056b3); border-color: var(--secondary, #0056b3); color: #fff; }
.gfx-hint { margin: 0; padding: 0 4px; font-size: 12.5px; color: #777; line-height: 1.4; }

/* ===================== MODAL DE ESCOLHA DE PERSONAGEM (Painel de Metal) ===================== */
#avatar-modal-overlay {
    background: rgba(10, 14, 34, 0.72);
    backdrop-filter: blur(8px);
}
#avatar-modal {
    max-width: 680px;
    padding: 18px 20px 16px;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .07), transparent 60%),
        linear-gradient(180deg, #3d4160 0%, #272a42 100%);
    border: 5px solid #565b7d;
    border-radius: 20px;
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, .08),
        0 0 0 3px #1d1f31,
        0 24px 60px rgba(0, 5, 25, .65);
    color: #f1f3ff;
}
#avatar-modal .modal-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
#avatar-modal .modal-header h3 {
    color: #f1f3ff;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 1.25rem;
}
#avatar-modal .avatar-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}
#avatar-modal .avatar-modal-close:hover {
    background: #ef4444;
    color: #fff;
}
#avatar-modal .modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.9fr);
    gap: 14px;
    align-items: stretch;
    overflow: visible;
    padding-right: 0;
    margin-right: 0;
}
#avatar-modal .character-grid-container {
    min-width: 0;
    display: flex;
}
#avatar-modal .character-grid {
    width: 100%;
    margin-bottom: 0;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 8px;
    max-height: 300px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(14, 16, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    scrollbar-width: thin;
    scrollbar-color: #6b7299 rgba(255, 255, 255, 0.06);
}
#avatar-modal .character-grid::-webkit-scrollbar {
    width: 9px;
}
#avatar-modal .character-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}
#avatar-modal .character-grid::-webkit-scrollbar-thumb {
    background: #6b7299;
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
#avatar-modal .character-grid::-webkit-scrollbar-thumb:hover {
    background: #8b93bd;
    border: 2px solid transparent;
    background-clip: padding-box;
}
#avatar-modal .character-item {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 7px 4px;
    gap: 4px;
    transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
}
#avatar-modal .character-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(110, 185, 255, 0.5);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
#avatar-modal .character-item.selected {
    background: rgba(63, 162, 255, 0.2);
    border-color: #4aa8ff;
    box-shadow: 0 0 0 2px rgba(74, 168, 255, 0.35), 0 8px 18px rgba(0, 0, 0, 0.3);
}
#avatar-modal .character-item canvas {
    width: 50px;
    height: 50px;
    background: rgba(12, 15, 28, 0.45);
    border-radius: 9px;
    box-shadow: none;
}
#avatar-modal .character-item span {
    color: #d6dcf5;
    font-size: 10px;
    font-weight: 700;
    text-transform: none;
    min-height: 2.3em;
    display: flex;
    align-items: center;
    justify-content: center;
}
#avatar-modal .character-item.selected span {
    color: #fff;
}
#avatar-modal .avatar-preview-container {
    justify-content: flex-start;
    padding: 14px 12px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(16, 19, 36, 0.65) 0%, rgba(22, 26, 48, 0.52) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.3);
}
#avatar-modal .avatar-preview-container::before {
    background: radial-gradient(circle at 50% 34%, rgba(86, 160, 255, 0.22) 0%, transparent 62%);
}
#avatar-modal #avatar-canvas {
    width: 122px;
    height: 122px;
}
#avatar-modal #avatar-name {
    color: #fff;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 1.15rem;
    margin-top: 2px;
}
#avatar-modal .avatar-power {
    margin-top: 8px;
    padding: 9px 10px;
    border-radius: 11px;
    background: rgba(255, 179, 0, 0.12);
    border: 1px solid rgba(255, 195, 60, 0.32);
    color: #e4e8f8;
    font-size: 0.8rem;
    line-height: 1.38;
    text-align: left;
}
#avatar-modal .avatar-power b {
    color: #ffe082;
}
#avatar-modal .avatar-power.is-classic {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #b7bcd8;
}
#avatar-modal .avatar-power.is-classic b {
    color: #e2e8f0;
}
#avatar-modal .avatar-power.is-classic .fa-bomb {
    color: #94a3b8;
    margin-right: 4px;
}
#avatar-modal .modal-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#avatar-modal #btn-cancel-avatar {
    background: linear-gradient(180deg, #8b91b0 0%, #636a8c 100%);
    color: #fff;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 14px;
    box-shadow: 0 4px 0 #444a68;
}
#avatar-modal #btn-save-avatar {
    background: linear-gradient(180deg, #3ddc84 0%, #1fa85a 100%);
    color: #fff;
    border-radius: 12px;
    padding: 10px 24px;
    font-size: 14px;
    box-shadow: 0 4px 0 #137a40;
}
#avatar-modal #btn-cancel-avatar:hover,
#avatar-modal #btn-save-avatar:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}
@media (max-width: 680px) {
    #avatar-modal .modal-body {
        grid-template-columns: 1fr;
    }
    #avatar-modal .character-grid {
        max-height: 220px;
    }
}

/* ===================== MODAL DE CONFIGURAÇÕES EM ABAS (Painel de Metal) ===================== */
#modal-overlay {
    background: rgba(10, 14, 34, 0.72);
    backdrop-filter: blur(8px);
}
#settings-modal {
    max-width: 520px;
    padding: 18px 20px 16px;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .07), transparent 60%),
        linear-gradient(180deg, #3d4160 0%, #272a42 100%);
    border: 5px solid #565b7d;
    border-radius: 20px;
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, .08),
        0 0 0 3px #1d1f31,
        0 24px 60px rgba(0, 5, 25, .65);
    color: #f1f3ff;
}
#settings-modal .modal-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
#settings-modal .modal-header h3 {
    color: #f1f3ff;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#settings-modal .modal-header h3 i {
    color: #7cc0ff;
}
#settings-modal .modal-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}
#settings-modal .modal-close:hover {
    background: #ef4444;
    color: #fff;
}

/* Abas: Som / Gráficos / Aparência */
#settings-modal .cfg-tabs {
    display: flex;
    gap: 5px;
    padding: 4px;
    margin-bottom: 14px;
    border-radius: 13px;
    background: rgba(0, 0, 0, 0.28);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
#settings-modal .cfg-tab {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #b7bcd8;
    font: 700 0.88rem 'Outfit', 'Segoe UI', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}
#settings-modal .cfg-tab:hover:not(.active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
#settings-modal .cfg-tab.active {
    background: #fff;
    color: #23253a;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.32);
}

#settings-modal .modal-body {
    overflow-y: auto;
    max-height: 60vh;
    min-height: 280px;
    padding-right: 4px;
    margin-right: 0;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: #6b7299 rgba(255, 255, 255, 0.06);
}
#settings-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}
#settings-modal .modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}
#settings-modal .modal-body::-webkit-scrollbar-thumb {
    background: #6b7299;
    border-radius: 999px;
}
#settings-modal .cfg-pane.hidden {
    display: none;
}
#settings-modal .cfg-pane {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#settings-modal .setting-group {
    gap: 8px;
}
#settings-modal .setting-group label {
    color: #d6dcf5;
    font-size: 0.88rem;
}

/* Volumes */
#settings-modal .slider-group {
    background: rgba(14, 16, 30, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 13px 16px;
    gap: 10px;
}
#settings-modal .slider-container {
    gap: 12px;
}
#settings-modal .slider-container.vol-master {
    padding-bottom: 9px;
    margin-bottom: 2px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
}
#settings-modal .slider-container span:first-child {
    color: #d6dcf5;
    font-size: 0.86rem;
    min-width: 112px;
}
#settings-modal .slider-container.vol-master span:first-child {
    color: #fff;
    font-weight: 800;
}
#settings-modal .vol-value {
    color: #7cc0ff;
    font-size: 0.85rem;
    min-width: 40px;
}
#settings-modal input[type="range"] {
    height: 8px;
    background: rgba(255, 255, 255, 0.16);
    accent-color: #4aa8ff;
}

/* Gráficos */
#settings-modal .gfx-row {
    background: rgba(14, 16, 30, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 11px 14px;
}
#settings-modal .gfx-row > span {
    color: #e2e8f0;
    font-size: 0.88rem;
}
#settings-modal .gfx-seg button {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 7px 10px;
    font-size: 0.86rem;
    border-radius: 10px;
}
#settings-modal .gfx-seg button:hover:not(.on) {
    border-color: rgba(110, 185, 255, 0.5);
    color: #fff;
}
#settings-modal .gfx-seg button.on {
    background: linear-gradient(180deg, #4aa8ff 0%, #1f5fe0 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 0 #1846b0;
}
#settings-modal .gfx-hint {
    color: #b7bcd8;
    font-size: 0.78rem;
    padding: 2px 4px 0;
}

/* Aparência */
#settings-modal .btn-block {
    background: rgba(14, 16, 30, 0.48);
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 15px 16px;
    color: #f1f3ff;
    font-size: 0.92rem;
}
#settings-modal .btn-block i {
    color: #7cc0ff;
}
#settings-modal .btn-block:hover {
    background: rgba(74, 168, 255, 0.18);
    border-color: rgba(110, 185, 255, 0.6);
    transform: translateY(-1px);
}
#settings-modal .cfg-bg-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 16, 30, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 12px;
}
#settings-modal #bg-test-file {
    flex: 1;
    min-width: 0;
    color: #cbd5e1;
    font-size: 0.82rem;
}
#settings-modal #bg-test-reset {
    padding: 7px 14px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #f1f3ff;
    font: 700 0.82rem 'Outfit', sans-serif;
    cursor: pointer;
}
#settings-modal #bg-test-reset:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Rodapé */
#settings-modal .modal-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#settings-modal #reset-settings {
    background: linear-gradient(180deg, #8b91b0 0%, #636a8c 100%);
    color: #fff;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    box-shadow: 0 4px 0 #444a68;
}
#settings-modal #save-settings {
    background: linear-gradient(180deg, #3ddc84 0%, #1fa85a 100%);
    color: #fff;
    border-radius: 12px;
    padding: 10px 24px;
    font-size: 14px;
    box-shadow: 0 4px 0 #137a40;
}
#settings-modal #reset-settings:hover,
#settings-modal #save-settings:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}
