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

body {
    background: #c8dce8; /* Mesma cor da água do mapa */
    color: #2a2a2a; /* Texto escuro para contraste */
    font-family: 'Almendra', serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Fontes medievais para títulos */
h1, h2, h3, h4, h5, h6,
.auth-title,
.game-title,
.profile-section-title,
.help-title,
.help-section-title,
.shop-title,
.shop-section-title,
#territory-dialog h3,
#action-dialog h3,
#battle-dialog h3 {
    font-family: 'IM Fell English', serif;
}

/* Fonte Almendra para todos os botões e inputs */
button,
input,
textarea,
select,
.action-btn,
.auth-btn,
.auth-input {
    font-family: 'Almendra', serif;
}

/* Estilo dos inputs dentro dos diálogos do jogo */
.auth-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-input[readonly] {
    color: #888;
    cursor: not-allowed;
    opacity: 0.7;
}

.qty-btn {
    padding: 8px 10px;
    height: 40px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.qty-btn:active {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(0.95);
}

/* ==================== ANIMAÇÕES DE DIÁLOGOS ==================== */
/* Animações para overlays (fade in/out) */
.dialog-overlay-show {
    animation: fadeIn 0.2s ease-in-out;
}

.dialog-overlay-hide {
    animation: fadeOut 0.2s ease-in-out;
}

/* Animações para diálogos (scale + bounce) */
.dialog-content-show {
    animation: scaleBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dialog-content-hide {
    animation: scaleOut 0.2s ease-in-out;
}

/* ==================== CONFETTI CELEBRATION ==================== */
.confetti-piece {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* DIALOGO DE TERRITORIO */
#territory-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 100;
    pointer-events: none; /* Permitir cliques através do overlay */
}

#territory-dialog {
    background: rgba(10, 10, 30, 0.90);
    border: 1px solid rgba(240, 192, 64, 0.4);
    border-radius: 12px;
    padding: 25px;
    min-width: 300px;
    max-width: 400px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 49px; /* Embaixo do player panel */
    left: 5px;
    pointer-events: auto; /* Ativar cliques no diálogo */
}

#territory-dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: #d32f2f;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#territory-dialog-close:hover {
    background: #b71c1c;
    color: #fff;
}

#territory-dialog h3 {
    color: #f0c040;
    margin-bottom: 12px;
    font-size: 18px;
    padding-right: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.owned-badge-inline {
    background: #2d6e2d;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#territory-dialog .territory-id {
    color: #888;
    font-size: 12px;
    margin-bottom: 4px;
}

#territory-dialog .info-row {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    font-size: 13px;
}

#territory-dialog .info-label {
    color: #888;
}

#territory-dialog .info-value {
    color: #e0e0e0;
    font-weight: 500;
}

.biome-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

/* DIALOGO DE ACAO */
#action-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 250;
    justify-content: center;
    align-items: center;
}

#action-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 1px solid rgba(240, 192, 64, 0.4);
    border-radius: 12px;
    padding: 25px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    position: relative;
}

#action-dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: #d32f2f;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#action-dialog-close:hover {
    background: #b71c1c;
    color: #fff;
}

#action-dialog h3 {
    color: #f0c040;
    margin-bottom: 15px;
    font-size: 18px;
    padding-right: 30px;
}

#action-dialog-content {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

#action-dialog-content .info-highlight {
    color: #f0c040;
    font-weight: bold;
}

#action-dialog-content .info-box {
    background: rgba(240, 192, 64, 0.1);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
}

#action-dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

#action-dialog-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#action-dialog-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* DIALOGO DE AJUSTES */
#settings-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 150;
    justify-content: center;
    align-items: center;
}

#settings-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 1px solid rgba(240, 192, 64, 0.4);
    border-radius: 12px;
    padding: 25px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    position: relative;
}

#settings-dialog-title {
    color: #f0c040;
    margin-bottom: 20px;
    font-size: 18px;
    padding-right: 30px;
}

.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-option:last-child {
    border-bottom: none;
}

.settings-label {
    color: #ccc;
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #888;
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
    background: rgba(240, 192, 64, 0.4);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
    background: #f0c040;
}

/* SELETOR DE CORES DO MAPA */
.settings-section-title {
    color: #f0c040;
    font-size: 13px;
    margin-top: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.map-color-options {
    display: flex;
    gap: 8px;
}

.map-color-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #999;
    font-size: 11px;
}

.map-color-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(240, 192, 64, 0.3);
}

.map-color-btn.active {
    background: rgba(240, 192, 64, 0.1);
    border-color: #f0c040;
    color: #f0c040;
}

.map-color-preview {
    width: 40px;
    height: 26px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.classic-preview {
    background: linear-gradient(90deg, #8fbc8f 0%, #deb887 33%, #b0c4de 66%, #f0e68c 100%);
}

.diplomatic-preview {
    background: linear-gradient(90deg, #30e030 0%, #30e030 33%, #e03030 33%, #e03030 66%, #e0e0e0 66%, #e0e0e0 100%);
}

.alliance-preview {
    background: linear-gradient(90deg, #3080e0 0%, #3080e0 33%, #e03030 33%, #e03030 66%, #e0e0e0 66%, #e0e0e0 100%);
}

/* VOLUME SLIDERS - Ajustes de Áudio */
.volume-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 190px;
}

.volume-icon {
    font-size: 14px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f0c040;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(240, 192, 64, 0.6);
    transition: transform 0.15s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f0c040;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 4px rgba(240, 192, 64, 0.6);
}

.volume-value {
    color: #f0c040;
    font-size: 11px;
    font-weight: bold;
    min-width: 32px;
    text-align: right;
}

/* BOTÃO MUTE - Player Panel */
.mute-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 18px;
    flex-shrink: 0;
}

.mute-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* DIALOGO DE RESULTADO DE BATALHA */
#battle-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 200;
    justify-content: center;
    align-items: center;
}

#battle-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 2px solid rgba(240, 192, 64, 0.5);
    border-radius: 16px;
    padding: 25px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.9);
    position: relative;
    text-align: center;
}

#battle-dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: #d32f2f;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#battle-dialog-close:hover {
    background: #b71c1c;
    color: #fff;
}

#battle-result-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

#battle-result-title {
    font-size: 24px;
    margin-bottom: 20px;
}

#battle-result-title.victory {
    color: #4ade80;
}

#battle-result-title.defeat {
    color: #f87171;
}

#battle-result-content {
    text-align: left;
    font-size: 14px;
    color: #ccc;
}

.battle-stats {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    gap: 20px;
}

.battle-stat-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.battle-stat-box.your-side {
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.battle-stat-box.enemy-side {
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.battle-stat-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
}

.battle-stat-value {
    font-size: 20px;
    font-weight: bold;
}

/* DIALOGO DE RESGATE */
#withdraw-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 200;
    justify-content: center;
    align-items: center;
}

#withdraw-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 2px solid rgba(240, 192, 64, 0.5);
    border-radius: 16px;
    padding: 25px;
    margin: 20px;
    min-width: 100px;
    max-width: 420px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.9);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

#withdraw-dialog h3 {
    text-align: center;
    font-size: 20px;
    color: #f0c040;
    margin-bottom: 20px;
}


.withdraw-balance {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.withdraw-balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.withdraw-balance-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.withdraw-label {
    color: #aaa;
    font-size: 14px;
}

.withdraw-value {
    font-size: 18px;
    font-weight: bold;
    color: #f0c040;
}

.withdraw-money {
    color: #4ade80;
}


.withdraw-form {
    margin-bottom: 15px;
}

.withdraw-form label,
.withdraw-amount label {
    display: block;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 8px;
}

.withdraw-form input,
.withdraw-amount input {
    width: 100%;
    box-sizing: border-box;
}

.withdraw-amount {
    margin-bottom: 20px;
}

.withdraw-preview {
    color: #aaa;
    font-size: 13px;
    margin-top: 8px;
}

#withdraw-preview-value {
    color: #4ade80;
    font-weight: bold;
}

.withdraw-confirm-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.withdraw-confirm-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    transform: translateY(-1px);
}

.withdraw-confirm-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

.withdraw-error {
    color: #f87171;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    min-height: 16px;
}

#worker-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.worker-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.worker-loading-box p {
    color: #f0c040;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(240, 192, 64, 0.5);
}

.worker-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(240, 192, 64, 0.2);
    border-top: 4px solid #f0c040;
    border-radius: 50%;
    animation: worker-spin 0.8s linear infinite;
    box-shadow: 0 0 20px rgba(240, 192, 64, 0.4);
}

@keyframes worker-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce-collect {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

/* Keyframes antigos do splash removidos - novo splash usa keyframes proprios */

.withdraw-btn {
    background: #2d6e4a;
    color: #fff;
    border: 1px solid #4a8a6a;
}

.withdraw-btn:hover:not(:disabled) {
    background: #3a8a5a;
}

.battle-stat-value.loss {
    color: #f87171;
}

.battle-stat-value.gain {
    color: #4ade80;
}

.battle-territory-name {
    color: #f0c040;
    font-weight: bold;
}

#minimap {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 200px;
    height: 140px;
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 8px;
    background: rgba(10, 10, 30, 0.92);
    z-index: 10;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

#minimap.expanded {
    z-index: 150;
    border: 2px solid rgba(240, 192, 64, 0.6);
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.9);
}

#minimap.expanded canvas {
    width: 100% !important;
    height: 100% !important;
}

#minimap-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 140;
}

#minimap-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#minimap-viewport {
    position: absolute;
    border: 2px solid #f0c040;
    pointer-events: none;
}

/* Loading screen antigo removido - novo splash tem barra de progresso propria */

canvas#map-canvas {
    display: block;
    cursor: grab;
}

canvas#map-canvas:active {
    cursor: grabbing;
}

#biome-legend {
    position: fixed;
    top: 50px;
    left: 20px;
    background: rgba(10, 10, 30, 0.92);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    z-index: 10;
    font-size: 11px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#biome-legend h4 {
    color: #f0c040;
    margin-bottom: 6px;
    font-size: 12px;
}

/* PLAYER PANEL - ESTILO JOGO MODERNO */
#player-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 30, 0.95);
    border-bottom: 1px solid rgba(240, 192, 64, 0.3);
    padding: 8px 15px;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 44px;
}

/* BUSCA DE TERRITORIO */
#territory-search {
    position: relative;
}

#search-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 18px;
    color: #f0c040;
}

#search-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

#search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 8px;
    z-index: 100;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#search-dropdown.open {
    display: block;
}

#territory-search-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    padding: 8px 10px;
    width: 100%;
    outline: none;
    box-sizing: border-box;
}

#territory-search-input:focus {
    border-color: rgba(240, 192, 64, 0.5);
}

/* BARRA DE PROGRESSO DA ACAO */
#action-progress-bar {
    position: fixed;
    top: 45px;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 16;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

#action-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f0c040, #e07020);
    box-shadow: 0 0 10px rgba(240, 192, 64, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.3);
    transition: width 0.3s ease;
    animation: progressPulse 1s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1);
        box-shadow: 0 0 10px rgba(240, 192, 64, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.3);
    }
    50% {
        filter: hue-rotate(60deg) brightness(1.2);
        box-shadow: 0 0 20px rgba(240, 192, 64, 1), 0 0 0 2px rgba(255, 255, 255, 0.6);
    }
}

#player-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.player-stat-icon {
    font-size: 16px;
}

.player-stat-icon.flag-green {
    filter: hue-rotate(100deg) saturate(3);
}

.player-stat-value {
    color: #f0c040;
    font-weight: bold;
}

.player-stat-label {
    color: #888;
    font-size: 11px;
}

/* Tooltips dos stats */
.player-stat.has-tooltip {
    position: relative;
    cursor: pointer;
}

.stat-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 30, 0.98);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    border: 1px solid rgba(240, 192, 64, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.stat-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(240, 192, 64, 0.4);
}

.stat-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: rgba(10, 10, 30, 0.98);
}

/* PC: hover */
@media (hover: hover) {
    .player-stat.has-tooltip:hover .stat-tooltip {
        opacity: 1;
        visibility: visible;
    }
}

/* Mobile: classe ativa */
.stat-tooltip.active {
    opacity: 1;
    visibility: visible;
}

#player-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    transition: background 0.2s;
    white-space: nowrap;
}

.recruit-btn {
    background: #2d6e2d;
    color: #fff;
    border: 1px solid #4a8a4a;
}

.recruit-btn:hover:not(:disabled) {
    background: #3a8a3a;
}

.recruit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.withdraw-btn {
    background: #2d6e4a;
    color: #fff;
    border: 1px solid #4a8a6a;
}

.withdraw-btn:hover:not(:disabled) {
    background: #3a8a5a;
}

.shop-btn {
    background: #2d4a6e;
    color: #fff;
    border: 1px solid #4a6a8a;
}

.shop-btn:hover:not(:disabled) {
    background: #3a5a8a;
}

.gold-btn {
    background: #6e5a2d;
    color: #fff;
    border: 1px solid #8a7a4a;
}

.gold-btn:hover:not(:disabled) {
    background: #8a6a3a;
}

.gold-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.attack-btn {
    background: #8a2d2d;
    color: #fff;
    border: 1px solid #aa4a4a;
}

.attack-btn:hover:not(:disabled) {
    background: #aa3a3a;
}

.attack-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.collect-btn {
    background: #2d8a6e;
    color: #fff;
    border: 1px solid #4aaa8a;
}

.collect-btn:hover {
    background: #3aaa7a;
}

.pop-btn {
    background: #5a4a8a;
    color: #fff;
    border: 1px solid #7a6aaa;
}

.pop-btn:hover:not(:disabled) {
    background: #6a5a9a;
}

.pop-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#action-timer-circle {
    width: 36px;
    height: 36px;
}

#action-timer-circle .circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 5;
}

#action-timer-circle .circle-progress {
    fill: none;
    stroke: #f0c040;
    stroke-width: 5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 0.3s;
    filter: drop-shadow(0 0 3px rgba(240, 192, 64, 0.6)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.8));
    animation: circlePulse 1s ease-in-out infinite;
}

@keyframes circlePulse {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(240, 192, 64, 0.6)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.8)) hue-rotate(0deg);
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(240, 192, 64, 1)) drop-shadow(0 0 3px rgba(255, 255, 255, 1)) hue-rotate(60deg) brightness(1.2);
    }
}

#action-timer-circle .circle-icon {
    font-size: 40px;
    dominant-baseline: middle;
    text-anchor: middle;
}

/* GUIA DE ACAO - tooltip com seta */
#action-guide-tooltip {
    position: fixed;
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid #f0c040;
    border-radius: 10px;
    padding: 10px 16px;
    color: #f0c040;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    z-index: 9999;
    pointer-events: none;
    width: 160px;
    animation: guidePopIn 0.3s ease;
    overflow: visible;
}

#action-guide-tooltip .guide-arrow {
    font-size: 22px;
    display: inline-block;
    position: absolute;
    top: var(--arrow-top, auto);
    bottom: var(--arrow-bottom, auto);
    left: var(--arrow-left, auto);
    right: var(--arrow-right, auto);
    transform-origin: center;
    animation-duration: 0.6s;
    animation-timing-function: ease;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

@keyframes guidePopIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes guideBounceDown {
    from { transform: rotate(var(--ar, 0deg)) translateY(0); }
    to { transform: rotate(var(--ar, 0deg)) translateY(5px); }
}

@keyframes guideBounceUp {
    from { transform: rotate(var(--ar, 0deg)) translateY(0); }
    to { transform: rotate(var(--ar, 0deg)) translateY(-5px); }
}

@keyframes guideBounceRight {
    from { transform: rotate(var(--ar, 0deg)) translateX(0); }
    to { transform: rotate(var(--ar, 0deg)) translateX(5px); }
}

@keyframes guideBounceLeft {
    from { transform: rotate(var(--ar, 0deg)) translateX(0); }
    to { transform: rotate(var(--ar, 0deg)) translateX(-5px); }
}

/* BOTAO FLUTUANTE DE ACOES */
#floating-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 8px;
}

#actions-menu {
    position: relative;
    display: inline-block;
}

.actions-toggle-btn {
    background: linear-gradient(135deg, #c09030, #f0c040);
    color: #1a1a2e;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 26px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 15px rgba(240, 192, 64, 0.4);
}

.actions-toggle-btn:hover {
    transform: scale(1.1);
}

.actions-toggle-btn.open {
    transform: rotate(45deg);
}

.actions-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    display: none;
    flex-direction: column;
    gap: 5px;
    background: rgba(10, 10, 30, 0.98);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(240, 192, 64, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    min-width: 180px;
    z-index: 100;
}

.actions-dropdown.open {
    display: flex;
}

.actions-dropdown .action-btn {
    white-space: nowrap;
    width: 100%;
    text-align: center;
    padding: 10px 15px;
}

/* MENU HAMBURGER */
#hamburger-menu {
    position: relative;
    display: inline-block;
}

#hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

#hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

#hamburger-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: #f0c040;
    border-radius: 1px;
    transition: all 0.2s;
}

#hamburger-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

#hamburger-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

#hamburger-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: none;
    flex-direction: column;
    gap: 5px;
    background: rgba(10, 10, 30, 0.98);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(240, 192, 64, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    min-width: 180px;
    z-index: 100;
}

#hamburger-dropdown.open {
    display: flex;
}

#hamburger-dropdown .action-btn {
    white-space: nowrap;
    width: 100%;
    text-align: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#hamburger-dropdown .action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* DIALOGOS GENERICOS (Perfil, Ajuda, Loja) */
.dialog-close-btn {
    position: sticky;
    top: 0;
    width: 30px;
    height: 30px;
    border: none;
    background: #d32f2f;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    float: right;
    margin-bottom: -30px;
}

.dialog-close-btn:hover {
    background: #b71c1c;
    color: #fff;
}

#profile-dialog-overlay,
#help-dialog-overlay,
#shop-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 200;
    justify-content: center;
    align-items: center;
}

#profile-dialog,
#help-dialog,
#shop-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 2px solid rgba(240, 192, 64, 0.5);
    border-radius: 16px;
    padding: 25px;
    min-width: 100px;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.9);
    position: relative;
}

/* PERFIL */
.profile-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(240, 192, 64, 0.2);
}

.profile-avatar {
    font-size: 48px;
    margin-bottom: 8px;
}

.profile-avatar-name-container {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.profile-avatar-name {
    color: #f0c040;
    font-size: 20px;
    font-weight: bold;
}

.edit-avatar-btn {
    background: rgba(240, 192, 64, 0.15);
    border: 1px solid rgba(240, 192, 64, 0.3);
    color: #f0c040;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.edit-avatar-btn:hover {
    background: rgba(240, 192, 64, 0.25);
    border-color: #f0c040;
    transform: scale(1.1);
}

.profile-uid {
    color: #555;
    font-size: 10px;
    margin-top: 4px;
    font-family: monospace;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.profile-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.profile-stat-card .stat-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 4px;
}

.profile-stat-card .stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #f0c040;
}

.profile-stat-card .stat-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.profile-section-title {
    color: #888;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.profile-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-row-label {
    color: #888;
    font-size: 12px;
}

.profile-row-value {
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 500;
}

/* SISTEMA DE INDICACAO */
.referral-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 8px;
}

.referral-section h4 {
    color: #F0C040;
    margin-bottom: 10px;
    font-size: 16px;
}

.referral-description {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 15px;
}

.referral-code-box,
.referral-link-box {
    margin-bottom: 15px;
}

.referral-code-box label,
.referral-link-box label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
}

.referral-code-display,
.referral-link-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

#referral-code-text {
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    color: #F0C040;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    flex: 1;
    text-align: center;
}

#referral-link-input {
    flex: 1;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 4px;
    color: #F0C040;
    font-size: 12px;
}

.copy-btn {
    padding: 8px 12px;
    background: rgba(240, 192, 64, 0.2);
    border: 1px solid rgba(240, 192, 64, 0.4);
    border-radius: 4px;
    color: #F0C040;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
}

.copy-btn:hover {
    background: rgba(240, 192, 64, 0.3);
}

/* Dialog de Stats de Indicacao */
#referral-stats-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 150;
    justify-content: center;
    align-items: center;
}

#referral-stats-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 1px solid rgba(240, 192, 64, 0.4);
    border-radius: 12px;
    padding: 25px;
    min-width: 350px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    position: relative;
}

#referral-stats-dialog h3 {
    color: #F0C040;
    margin-bottom: 20px;
    text-align: center;
}

#referral-stats-dialog h4 {
    color: #F0C040;
    margin: 20px 0 10px 0;
    font-size: 14px;
}

.referral-stats-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.stat-box {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.stat-value.gold {
    color: #F0C040;
}

.referral-user-list {
    margin-top: 15px;
}

.referral-user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.referral-user-name {
    font-weight: bold;
    color: #fff;
}

.referral-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.status-eligible {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-pending {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.empty-state {
    text-align: center;
    color: #aaa;
    margin: 30px 0;
}

/* Dialog de Ranking de Indicacao */
#referral-ranking-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 150;
    justify-content: center;
    align-items: center;
}

#referral-ranking-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 1px solid rgba(240, 192, 64, 0.4);
    border-radius: 12px;
    padding: 25px;
    min-width: 350px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    position: relative;
}

#referral-ranking-dialog h3 {
    color: #F0C040;
    margin-bottom: 10px;
    text-align: center;
}

.ranking-list {
    margin-top: 15px;
}

.ranking-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(240, 192, 64, 0.2);
    transition: all 0.3s;
}

.ranking-card:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(240, 192, 64, 0.4);
}

.ranking-card.highlight-user {
    background: rgba(240, 192, 64, 0.1);
    border: 2px solid rgba(240, 192, 64, 0.5);
}

.ranking-position {
    font-size: 18px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.ranking-position.gold {
    color: #FFD700;
}

.ranking-position.silver {
    color: #C0C0C0;
}

.ranking-position.bronze {
    color: #CD7F32;
}

.ranking-name {
    flex: 1;
    color: #fff;
    font-weight: 500;
}

.ranking-count {
    color: #F0C040;
    font-size: 14px;
    font-weight: bold;
}

/* AJUDA */
.help-title {
    color: #f0c040;
    font-size: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.help-section {
    margin-bottom: 18px;
}

.help-section-title {
    color: #f0c040;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.help-text {
    color: #bbb;
    font-size: 12px;
    line-height: 1.6;
}

.help-text strong {
    color: #e0e0e0;
}

.help-divider {
    border: none;
    border-top: 1px solid rgba(240, 192, 64, 0.15);
    margin: 15px 0;
}

/* LOJA */
.shop-title {
    color: #f0c040;
    font-size: 20px;
    text-align: center;
    margin-bottom: 5px;
}

.shop-subtitle {
    color: #888;
    font-size: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.shop-section-title {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.shop-item-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.shop-item-info {
    flex: 1;
}

.shop-item-name {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 3px;
}

.shop-item-desc {
    color: #888;
    font-size: 11px;
}

.shop-item-price {
    background: linear-gradient(135deg, #c09030, #f0c040);
    color: #1a1a2e;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.shop-item-price:hover {
    opacity: 0.85;
}

.shop-coming-soon {
    color: #f0c040;
    font-size: 11px;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(240, 192, 64, 0.08);
    border: 1px dashed rgba(240, 192, 64, 0.3);
    border-radius: 8px;
}

/* MEUS RESGATES */
#withdrawals-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 200;
    justify-content: center;
    align-items: center;
}

#withdrawals-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 2px solid rgba(240, 192, 64, 0.5);
    border-radius: 16px;
    padding: 25px;
    min-width: 340px;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.9);
    position: relative;
}

.withdrawal-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.withdrawal-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.withdrawal-item-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.withdrawal-item-label {
    color: #888;
    font-size: 12px;
}

.withdrawal-item-value {
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 500;
}

/* CHAT */
#chat-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 200;
    justify-content: center;
    align-items: center;
}

#chat-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 2px solid rgba(240, 192, 64, 0.5);
    border-radius: 16px;
    padding: 25px;
    margin: 20px;
    min-width: 100px;
    width: 380px;
    max-width: 95vw;
    height: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.9);
    position: relative;
}

#chat-dialog .dialog-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    margin-bottom: 0;
}

.chat-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 12px;
    margin-top: 5px;
}

.chat-tab {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    text-align: center;
}

.chat-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-tab.active {
    background: rgba(240, 192, 64, 0.15);
    color: #f0c040;
    border-color: rgba(240, 192, 64, 0.4);
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-msg {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 8px 12px;
    max-width: 85%;
    align-self: flex-start;
}

.chat-msg-me {
    align-self: flex-end;
    background: rgba(240, 192, 64, 0.1);
    border: 1px solid rgba(240, 192, 64, 0.15);
}

.chat-msg-admin {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.chat-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
}

.chat-msg-name {
    font-size: 11px;
    font-weight: bold;
}

.chat-msg-time {
    font-size: 9px;
    color: #555;
}

.chat-msg-text {
    color: #ddd;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.chat-input-area .auth-input {
    flex: 1;
    margin: 0;
}

.chat-send-btn {
    background: linear-gradient(135deg, #c09030, #f0c040);
    color: #1a1a2e;
    border: none;
    border-radius: 8px;
    width: 42px;
    font-size: 18px;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    opacity: 0.85;
}

/* DIALOGO DE EDITAR AVATAR */
#edit-avatar-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 200;
    justify-content: center;
    align-items: center;
}

#edit-avatar-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 2px solid rgba(240, 192, 64, 0.5);
    border-radius: 16px;
    padding: 25px;
    margin: 20px;
    min-width: 100px;
    max-width: 420px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.9);
    position: relative;
}

#edit-avatar-dialog h3 {
    text-align: center;
    font-size: 20px;
    color: #f0c040;
    margin-bottom: 20px;
}

.edit-avatar-info {
    background: rgba(240, 192, 64, 0.1);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.edit-avatar-info p {
    margin: 4px 0;
    color: #ccc;
    font-size: 14px;
}

.edit-avatar-form label {
    display: block;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 8px;
}

.edit-avatar-form input {
    width: 100%;
    box-sizing: border-box;
}

.edit-avatar-form input[readonly] {
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    cursor: not-allowed;
}

/* DIALOGO DE RANKING */
#ranking-dialog-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 200;
    justify-content: center;
    align-items: flex-start;
}

#ranking-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 2px solid rgba(240, 192, 64, 0.5);
    border-radius: 16px;
    padding: 25px;
    margin: 10px 20px;
    min-width: 100px;
    max-width: 500px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.9);
    position: relative;
}

#ranking-dialog h3 {
    text-align: center;
    font-size: 22px;
    color: #f0c040;
    margin-bottom: 20px;
}

.ranking-loading {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.ranking-loading .worker-loading-spinner {
    margin: 0 auto 15px;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(240, 192, 64, 0.4);
}

.ranking-item.current-user {
    background: rgba(240, 192, 64, 0.15);
    border-color: #f0c040;
}

.ranking-position {
    font-size: 18px;
    font-weight: bold;
    min-width: 35px;
    text-align: center;
}

.ranking-position.top1 {
    color: #ffd700;
    font-size: 22px;
}

.ranking-position.top2 {
    color: #c0c0c0;
    font-size: 20px;
}

.ranking-position.top3 {
    color: #cd7f32;
    font-size: 20px;
}

.ranking-avatar {
    font-size: 24px;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-name {
    font-size: 16px;
    font-weight: bold;
    color: #f0c040;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #aaa;
}

.ranking-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ranking-stat-value {
    color: #fff;
    font-weight: bold;
}

.ranking-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
}

/* Esconder elementos antigos */
#recruit-progress-container {
    display: none;
}

#recruit-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2d6e2d, #4a8a4a);
    border-radius: 3px;
    transition: width 0.5s;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
    animation: recruitPulse 1s ease-in-out infinite;
}

@keyframes recruitPulse {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
    }
    50% {
        filter: hue-rotate(60deg) brightness(1.2);
        box-shadow: 0 0 10px rgba(74, 138, 74, 0.8), 0 0 0 2px rgba(255, 255, 255, 0.6);
    }
}

.owned-badge {
    background: rgba(45, 110, 45, 0.3);
    border: 1px solid #4a8a4a;
    color: #7dc07d;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
    margin: 6px 0;
}

.warning-text {
    color: #c04040;
    font-size: 11px;
    margin: 4px 0;
}

.actions {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}

#notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 30, 0.95);
    border: 2px solid #f0c040;
    border-radius: 8px;
    padding: 15px 30px;
    color: #f0c040;
    font-size: 16px;
    font-weight: bold;
    z-index: 999999;
    display: none;
    transition: opacity 0.3s;
    text-align: center;
    pointer-events: none;
}

/* ===== NOVO SPLASH SCREEN ===== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.splash-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a1e;
    z-index: 0;
}

.splash-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(10, 10, 30, 0.6) 0%, rgba(10, 10, 30, 0.9) 100%);
}

.splash-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.splash-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(240, 192, 64, 0.6), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 107, 53, 0.4), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(78, 205, 196, 0.5), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(240, 192, 64, 0.4), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 107, 53, 0.3), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(78, 205, 196, 0.4), transparent);
    background-size: 200% 200%;
    animation: splashParticlesFloat 20s ease-in-out infinite;
    opacity: 0.5;
    z-index: 2;
}

.splash-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 500px;
    padding: 0 20px;
}

.splash-logo {
    text-align: center;
    animation: splashLogoEnter 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.splash-logo-img {
    max-width: 280px;
    width: 80%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.3));
    animation: splashLogoPulse 4s ease-in-out infinite;
}

.splash-title {
    font-family: 'Almendra', serif;
    font-size: 64px;
    font-weight: 700;
    color: #f0c040;
    letter-spacing: 10px;
    margin: 0;
    text-shadow: 0 0 30px rgba(240, 192, 64, 0.5), 0 0 60px rgba(240, 192, 64, 0.2);
    animation: splashLogoPulse 4s ease-in-out infinite;
}

.splash-slogan {
    font-size: 18px;
    color: #4ecdc4;
    font-weight: 700;
    letter-spacing: 6px;
    margin-top: 15px;
    opacity: 0;
    animation: splashSloganEnter 0.8s ease-out 0.6s forwards;
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.4);
}

.splash-progress-wrapper {
    width: 100%;
    max-width: 400px;
    opacity: 0;
    animation: splashFadeInUp 0.6s ease-out 1s forwards;
}

.splash-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.splash-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f0c040, #ff6b35, #f0c040);
    background-size: 200% 100%;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: splashProgressShimmer 2s linear infinite;
}

.splash-progress-glow {
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: 0;
    width: 0%;
    background: linear-gradient(90deg, transparent, rgba(240, 192, 64, 0.4), transparent);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(4px);
}

.splash-progress-phases {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 2px;
}

.splash-phase {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 600;
    letter-spacing: 1px;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.splash-phase.active {
    color: #f0c040;
    text-shadow: 0 0 10px rgba(240, 192, 64, 0.4);
}

.splash-phase.done {
    color: #4ecdc4;
}

.splash-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 1px;
    min-height: 20px;
    text-align: center;
    opacity: 0;
    animation: splashFadeIn 0.4s ease-out 1.2s forwards;
    transition: opacity 0.3s ease;
}

.splash-auth {
    width: 100%;
    max-width: 380px;
    animation: splashFadeInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.splash-auth-box {
    background: rgba(10, 10, 30, 0.85);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    padding: 30px 25px;
    backdrop-filter: blur(10px);
}

.splash-auth-title {
    color: #ffd700;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.splash-input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.splash-input:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
}

.splash-auth-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 16px 0 0;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.splash-auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.splash-auth-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    text-align: center;
}

.splash-link {
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.splash-link:hover {
    color: #ffd700;
}

.splash-link.highlight {
    color: #4ecdc4;
    font-weight: 700;
}

.splash-link.highlight:hover {
    color: #6ef0e0;
    text-shadow: 0 0 10px rgba(78, 205, 196, 0.4);
}

.splash-error {
    color: #e04040;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    min-height: 16px;
}

.splash-auth-info {
    color: #aaa;
    font-size: 12px;
    text-align: center;
    margin-bottom: 10px;
}

.splash-footer {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 30px;
    z-index: 10;
}

.splash-footer span {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.splash-exit {
    animation: splashExit 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes splashParticlesFloat {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

@keyframes splashLogoEnter {
    0% { opacity: 0; transform: scale(0.7) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes splashLogoPulse {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.3)); }
    50% { filter: drop-shadow(0 0 50px rgba(255, 215, 0, 0.5)); }
}

@keyframes splashSloganEnter {
    0% { opacity: 0; transform: translateY(10px); letter-spacing: 12px; }
    100% { opacity: 0.9; transform: translateY(0); letter-spacing: 6px; }
}

@keyframes splashProgressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes splashFadeInUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes splashFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes splashExit {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.05); pointer-events: none; }
}

/* ===== SISTEMA DE COLETA / TIMER ===== */
.action-timer {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px;
    margin: 8px 0;
    text-align: center;
}

.action-timer .timer-label {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 4px;
}

.action-timer .timer-value {
    font-size: 16px;
    color: #f0c040;
    font-weight: bold;
}

.collect-btn {
    background: linear-gradient(135deg, #c09030, #f0c040);
    color: #1a1a2e;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
}

.collect-btn:hover {
    opacity: 0.9;
}


/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
    .volume-slider-wrapper {
        max-width: 140px;
        gap: 5px;
    }
    .mute-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    * {
        -webkit-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    /* Background mobile */
    #auth-screen {
        background: url('img/background-me.png') no-repeat center center fixed;
        background-size: cover;
    }

    /* Minimap mobile */
    #minimap {
        width: 120px;
        height: 85px;
        left: 10px;
        bottom: 60px;
    }

    #minimap canvas {
        width: 120px;
        height: 85px;
    }

    #minimap.expanded {
        /* dimensoes calculadas via JS para manter proporcao */
    }

    #minimap.expanded canvas {
        width: 100% !important;
        height: 100% !important;
    }

    /* Player panel mobile */
    #player-panel {
        top: 0;
        padding: 6px 10px;
        flex-wrap: wrap;
        gap: 5px;
    }

    /* Barra de progresso mobile */
    #action-progress-bar {
        top: 45px;
        height: 7px;
    }

    #player-stats {
        gap: 8px;
        flex-wrap: wrap;
    }

    .player-stat {
        font-size: 11px;
        gap: 3px;
    }

    .player-stat-icon {
        font-size: 12px;
    }

    #player-actions {
        gap: 5px;
    }

    .action-btn {
        padding: 5px 8px;
        font-size: 11px;
    }

    /* Botao flutuante mobile */
    #floating-actions {
        bottom: 60px;
        right: 15px;
    }

    .actions-toggle-btn {
        width: 42px;
        height: 42px;
        font-size: 22px;
    }

    #action-timer-circle {
        width: 42px;
        height: 42px;
    }

    #action-timer-circle .circle-icon {
        font-size: 40px;
    }

    /* Menu dropdown mobile */
    .actions-dropdown {
        bottom: calc(100% + 8px);
        right: 0;
        min-width: 150px;
    }

    .actions-dropdown .action-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    /* Botao coleta maior em mobile */
    .collect-btn {
        padding: 14px 24px !important;
        font-size: 15px !important;
    }

    /* Hamburger dropdown mobile */
    #hamburger-dropdown {
        min-width: 160px;
    }

    #hamburger-dropdown .action-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    /* Dialogo de regiao mobile */
    #territory-dialog {
        margin: 10px;
        min-width: auto;
        max-width: 280px;
        padding: 15px;
    }

    #territory-dialog h3 {
        font-size: 16px;
    }

    #territory-dialog .info-row {
        font-size: 12px;
    }

    /* Dialogo de acao mobile */
    #action-dialog {
        margin: 10px;
        min-width: auto;
        max-width: calc(100% - 20px);
        padding: 20px;
    }

    #action-dialog h3 {
        font-size: 16px;
    }

    #action-dialog-content {
        font-size: 13px;
    }

    #action-dialog-buttons {
        flex-direction: column;
    }

    #action-dialog-buttons .action-btn {
        width: 100%;
        padding: 12px;
    }

    /* Dialogo de batalha mobile */
    #battle-dialog {
        margin: 10px;
        min-width: auto;
        max-width: calc(100% - 20px);
        padding: 20px;
    }

    #battle-result-icon {
        font-size: 40px;
    }

    #battle-result-title {
        font-size: 20px;
    }

    .battle-stats {
        flex-direction: column;
        gap: 10px;
    }

    .battle-stat-box {
        padding: 10px;
    }

    /* Dialogos perfil/ajuda/loja/resgates mobile */
    #profile-dialog,
    #help-dialog,
    #shop-dialog,
    #withdrawals-dialog {
        margin: 10px;
        min-width: auto;
        max-width: calc(100% - 20px);
        padding: 20px;
    }

    #chat-dialog {
        margin: 10px;
        width: calc(100% - 20px);
        height: 70vh;
    }

    /* Splash screen mobile */
    .splash-bg {
        background-image: url('img/background-me.png');
    }

    .splash-logo-img {
        max-width: 200px;
    }

    .splash-title {
        font-size: 42px;
        letter-spacing: 6px;
    }

    .splash-slogan {
        font-size: 14px;
        letter-spacing: 4px;
    }

    .splash-progress-wrapper {
        max-width: 300px;
    }

    .splash-auth-box {
        padding: 25px 20px;
    }

    .splash-footer {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        bottom: 20px;
    }

    .splash-footer span {
        font-size: 11px;
    }

    /* Grid de estatisticas do perfil mais compacta */
    .profile-stats-grid {
        gap: 6px;
        margin-bottom: 12px;
    }

    .profile-stat-card {
        padding: 8px;
        border-radius: 8px;
    }

    .profile-stat-card .stat-icon {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .profile-stat-card .stat-value {
        font-size: 16px;
    }

    .profile-stat-card .stat-label {
        font-size: 9px;
    }
}

/* DIALOGO DE PAINEL ADMIN */
#admin-panel-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 200;
    justify-content: center;
    align-items: center;
}

#admin-panel-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 2px solid rgba(240, 192, 64, 0.5);
    border-radius: 16px;
    padding: 25px;
    margin: 20px;
    min-width: 300px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.9);
    position: relative;
}

#admin-panel-dialog h3 {
    text-align: center;
    font-size: 22px;
    color: #f0c040;
    margin-bottom: 20px;
}

.admin-panel-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(240, 192, 64, 0.2);
}

.admin-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.admin-tab:hover {
    color: #f0c040;
}

.admin-tab.active {
    color: #f0c040;
    border-bottom-color: #f0c040;
}

.admin-tab-content {
    min-height: 300px;
}

.admin-loading {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

/* Lista de saques do admin */
.admin-withdrawals-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-withdrawal-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
    cursor: pointer;
}

.admin-withdrawal-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(240, 192, 64, 0.5);
}

.admin-withdrawal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.admin-withdrawal-user {
    font-size: 16px;
    font-weight: bold;
    color: #f0c040;
}

.admin-withdrawal-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.admin-withdrawal-status.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.admin-withdrawal-status.completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.admin-withdrawal-status.rejected {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.admin-withdrawal-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
    color: #aaa;
}

.admin-withdrawal-info-item {
    display: flex;
    flex-direction: column;
}

.admin-withdrawal-info-label {
    color: #666;
    font-size: 11px;
    margin-bottom: 2px;
}

.admin-withdrawal-info-value {
    color: #fff;
    font-weight: bold;
}

/* Chat do admin */
.admin-chat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-chat-user-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-chat-user-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(240, 192, 64, 0.5);
}

.admin-chat-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-chat-user-name {
    font-weight: bold;
    color: #f0c040;
}

.admin-chat-user-email {
    font-size: 12px;
    color: #888;
}

.admin-chat-unread {
    background: #f44336;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

/* Conversa do admin */
.admin-chat-conversation {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.admin-chat-conversation-header {
    padding: 12px;
    background: rgba(240, 192, 64, 0.1);
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-chat-conversation-user {
    font-weight: bold;
    color: #f0c040;
}

.admin-chat-back-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 6px;
    color: #f0c040;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.admin-chat-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.admin-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 12px;
}

.admin-chat-input-area {
    display: flex;
    gap: 10px;
}

.admin-chat-input {
    flex: 1;
}

/* Admin - Estatísticas */
.admin-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    padding: 20px 0;
}

.admin-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
}

.admin-stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.admin-stat-icon {
    font-size: 36px;
    min-width: 50px;
    text-align: center;
}

.admin-stat-info {
    flex: 1;
}

.admin-stat-label {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 6px;
}

.admin-stat-value {
    color: #f0c040;
    font-size: 28px;
    font-weight: bold;
}

.admin-stat-value.green {
    color: #50e050;
}

.admin-stat-value.red {
    color: #e05050;
}

/* ============================================================
   ANIMACAO DE COLETA (ouro/soldados voando para o painel)
   ============================================================ */
.collect-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px rgba(255, 200, 50, 0.9));
    transition: none;
    will-change: transform, opacity;
}

@keyframes collectFly {
    0% {
        transform: translate(0, 0) scale(1.2);
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx-end), var(--dy-end)) scale(0.5);
        opacity: 0;
    }
}

.collect-particle.flying {
    animation: collectFly 1.2s linear forwards;
}

@keyframes statBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.5); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.stat-bounce {
    animation: statBounce 0.4s ease-out;
}

@media (max-width: 768px) {
    #admin-panel-dialog {
        max-width: 95%;
        padding: 20px;
    }

    .admin-withdrawal-info {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   SISTEMA DE ALIANCAS
   ============================================================ */

/* Menu de Alianças */
#alliance-menu-dialog-overlay,
#create-alliance-dialog-overlay,
#alliance-list-dialog-overlay,
#alliance-details-dialog-overlay,
#alliance-chat-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 150;
    justify-content: center;
    align-items: center;
}

#alliance-menu-dialog,
#create-alliance-dialog,
#alliance-list-dialog,
#alliance-details-dialog,
#alliance-chat-dialog {
    background: rgba(10, 10, 30, 0.98);
    border: 1px solid rgba(240, 192, 64, 0.4);
    border-radius: 12px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    position: relative;
}

#alliance-details-dialog {
    max-width: 600px;
}

#alliance-chat-dialog {
    max-width: 550px;
    height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Custo de criação */
.create-alliance-cost {
    background: rgba(240, 192, 64, 0.1);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.create-alliance-cost p {
    margin: 0;
    color: #e0e0e0;
    font-size: 14px;
}

/* Formulário de criação */
.create-alliance-form label {
    display: block;
    color: #f0c040;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}

.alliance-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.alliance-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    background: rgba(240, 192, 64, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 6px;
    transition: all 0.2s;
}

.alliance-radio-label:hover {
    background: rgba(240, 192, 64, 0.1);
    border-color: rgba(240, 192, 64, 0.4);
}

.alliance-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.alliance-radio-label span {
    color: #e0e0e0;
    font-size: 13px;
}

/* Preview de bandeira */
.alliance-flag-preview {
    margin-top: 15px;
    text-align: center;
}

.alliance-flag-preview-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 2px solid rgba(240, 192, 64, 0.4);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
}

/* Lista de alianças */
.alliance-list-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.alliance-filter-btn {
    flex: 1;
    padding: 10px;
    background: rgba(240, 192, 64, 0.1);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Almendra', serif;
}

.alliance-filter-btn:hover {
    background: rgba(240, 192, 64, 0.15);
    border-color: rgba(240, 192, 64, 0.5);
}

.alliance-filter-btn.active {
    background: rgba(240, 192, 64, 0.3);
    border-color: rgba(240, 192, 64, 0.6);
    color: #f0c040;
    font-weight: bold;
}

#alliance-list-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alliance-card {
    background: rgba(240, 192, 64, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.alliance-card:hover {
    background: rgba(240, 192, 64, 0.1);
    border-color: rgba(240, 192, 64, 0.5);
    transform: translateY(-2px);
}

.alliance-card-flag {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border: 2px solid rgba(240, 192, 64, 0.4);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px;
    flex-shrink: 0;
}

.alliance-card-info {
    flex: 1;
}

.alliance-card-name {
    font-size: 16px;
    color: #f0c040;
    font-weight: bold;
    margin-bottom: 4px;
}

.alliance-card-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #aaa;
}

.alliance-card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Tabs de detalhes */
.alliance-details-tabs {
    display: flex;
    gap: 5px;
    margin: 15px 0;
    border-bottom: 2px solid rgba(240, 192, 64, 0.2);
}

.alliance-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Almendra', serif;
}

.alliance-tab:hover {
    color: #e0e0e0;
    background: rgba(240, 192, 64, 0.05);
}

.alliance-tab.active {
    color: #f0c040;
    border-bottom-color: #f0c040;
    font-weight: bold;
}

/* Conteúdo de visão geral */
.alliance-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.alliance-overview-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: rgba(240, 192, 64, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 8px;
}

.alliance-overview-flag {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 2px solid rgba(240, 192, 64, 0.4);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
}

.alliance-overview-info {
    flex: 1;
}

.alliance-overview-name {
    font-size: 20px;
    color: #f0c040;
    font-weight: bold;
    margin-bottom: 8px;
}

.alliance-overview-leader {
    font-size: 13px;
    color: #aaa;
}

.alliance-overview-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.alliance-stat-item {
    background: rgba(240, 192, 64, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.alliance-stat-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.alliance-stat-value {
    font-size: 18px;
    color: #f0c040;
    font-weight: bold;
}

/* Lista de membros */
.alliance-members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alliance-member-item {
    background: rgba(240, 192, 64, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alliance-member-info {
    flex: 1;
}

.alliance-member-name {
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alliance-role-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.alliance-role-badge.leader {
    background: #f0c040;
    color: #1a1a2e;
}

.alliance-role-badge.officer {
    background: #50a0ff;
    color: #fff;
}

.alliance-role-badge.member {
    background: #888;
    color: #fff;
}

.alliance-contribution-late {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #e05050;
    border-radius: 50%;
    margin-left: 6px;
}

.alliance-member-stats {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.alliance-member-actions {
    display: flex;
    gap: 6px;
}

.alliance-member-action-btn {
    padding: 6px 12px;
    background: rgba(240, 192, 64, 0.2);
    border: 1px solid rgba(240, 192, 64, 0.4);
    border-radius: 4px;
    color: #f0c040;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Almendra', serif;
}

.alliance-member-action-btn:hover {
    background: rgba(240, 192, 64, 0.3);
    border-color: rgba(240, 192, 64, 0.6);
}

.alliance-member-action-btn.special {
    background: rgba(128, 96, 224, 0.2);
    border-color: rgba(128, 96, 224, 0.4);
    color: #8060e0;
}

.alliance-member-action-btn.special:hover {
    background: rgba(128, 96, 224, 0.3);
    border-color: rgba(128, 96, 224, 0.6);
}

.alliance-member-action-btn.danger {
    background: rgba(224, 80, 80, 0.2);
    border-color: rgba(224, 80, 80, 0.4);
    color: #e05050;
}

.alliance-member-action-btn.danger:hover {
    background: rgba(224, 80, 80, 0.3);
    border-color: rgba(224, 80, 80, 0.6);
}

/* Tarefas */
.alliance-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alliance-task-item {
    background: rgba(240, 192, 64, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alliance-task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 2px;
}

.alliance-task-info {
    flex: 1;
}

.alliance-task-title {
    font-size: 14px;
    color: #f0c040;
    font-weight: 500;
    margin-bottom: 4px;
}

.alliance-task-description {
    font-size: 12px;
    color: #aaa;
}

.alliance-task-actions {
    display: flex;
    gap: 6px;
}

.alliance-task-btn {
    padding: 4px 10px;
    background: rgba(224, 80, 80, 0.2);
    border: 1px solid rgba(224, 80, 80, 0.4);
    border-radius: 4px;
    color: #e05050;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Almendra', serif;
}

.alliance-task-btn:hover {
    background: rgba(224, 80, 80, 0.3);
    border-color: rgba(224, 80, 80, 0.6);
}

.alliance-create-task-btn {
    width: 100%;
    padding: 12px;
    background: rgba(240, 192, 64, 0.2);
    border: 1px solid rgba(240, 192, 64, 0.4);
    border-radius: 6px;
    color: #f0c040;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Almendra', serif;
    margin-top: 10px;
}

.alliance-create-task-btn:hover {
    background: rgba(240, 192, 64, 0.3);
    border-color: rgba(240, 192, 64, 0.6);
}

/* Chat de aliança */
#alliance-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Ranking de alianças */
.ranking-tabs {
    display: flex;
    gap: 3px;
    margin: 15px 0;
    border-bottom: 2px solid rgba(240, 192, 64, 0.2);
}

.ranking-tab {
    flex: 1;
    padding: 8px 4px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #888;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Almendra', serif;
    white-space: nowrap;
}

.ranking-tab:hover {
    color: #e0e0e0;
    background: rgba(240, 192, 64, 0.05);
}

.ranking-tab.active {
    color: #f0c040;
    border-bottom-color: #f0c040;
    font-weight: bold;
}

.alliance-ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(240, 192, 64, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.alliance-ranking-item:hover {
    background: rgba(240, 192, 64, 0.1);
    border-color: rgba(240, 192, 64, 0.4);
}

.alliance-ranking-position {
    font-size: 20px;
    font-weight: bold;
    color: #f0c040;
    width: 30px;
    text-align: center;
}

.alliance-ranking-flag {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border: 2px solid rgba(240, 192, 64, 0.4);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px;
}

.alliance-ranking-info {
    flex: 1;
}

.alliance-ranking-name {
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
    margin-bottom: 2px;
}

.alliance-ranking-stats {
    font-size: 12px;
    color: #888;
}

/* Loading de alianças */
.alliance-loading {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

/* Menu de conteúdo de aliança */
.alliance-menu-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.alliance-menu-info {
    background: rgba(240, 192, 64, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alliance-menu-flag {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border: 2px solid rgba(240, 192, 64, 0.4);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
}

.alliance-menu-text {
    flex: 1;
}

.alliance-menu-name {
    font-size: 18px;
    color: #f0c040;
    font-weight: bold;
    margin-bottom: 4px;
}

.alliance-menu-role {
    font-size: 12px;
    color: #888;
}

.alliance-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alliance-menu-btn {
    width: 100%;
    padding: 12px;
    background: rgba(240, 192, 64, 0.1);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Almendra', serif;
}

.alliance-menu-btn:hover {
    background: rgba(240, 192, 64, 0.2);
    border-color: rgba(240, 192, 64, 0.5);
}

.alliance-menu-btn.primary {
    background: rgba(240, 192, 64, 0.3);
    border-color: rgba(240, 192, 64, 0.5);
    color: #f0c040;
    font-weight: bold;
}

.alliance-menu-btn.primary:hover {
    background: rgba(240, 192, 64, 0.4);
    border-color: rgba(240, 192, 64, 0.7);
}

.alliance-menu-btn.danger {
    background: rgba(224, 80, 80, 0.2);
    border-color: rgba(224, 80, 80, 0.4);
    color: #e05050;
}

.alliance-menu-btn.danger:hover {
    background: rgba(224, 80, 80, 0.3);
    border-color: rgba(224, 80, 80, 0.6);
}

/* Responsividade */
@media (max-width: 768px) {
    #alliance-menu-dialog,
    #create-alliance-dialog,
    #alliance-list-dialog,
    #alliance-details-dialog,
    #alliance-chat-dialog {
        width: 95%;
        max-width: none;
        padding: 20px;
    }

    .alliance-overview-stats {
        grid-template-columns: 1fr;
    }

    .alliance-card-stats {
        flex-direction: column;
        gap: 6px;
    }

    .alliance-details-tabs {
        flex-wrap: wrap;
    }

    .alliance-tab {
        font-size: 11px;
        padding: 8px 6px;
    }
}

/* ============================================================
   CONFIGURACOES DA ALIANCA
   ============================================================ */
.alliance-settings {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px;
}

.alliance-settings-section {
    background: rgba(20, 20, 40, 0.5);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 8px;
    padding: 20px;
}

.alliance-settings-section h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #f0c040;
}

.alliance-settings-description {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: #999;
}

.alliance-settings-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.alliance-settings-radio {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: rgba(30, 30, 50, 0.6);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.alliance-settings-radio:hover {
    background: rgba(40, 40, 60, 0.8);
    border-color: rgba(240, 192, 64, 0.3);
}

.alliance-settings-radio input[type="radio"] {
    display: none;
}

.alliance-settings-radio input[type="radio"]:checked + span {
    color: #f0c040;
    font-weight: 600;
}

.alliance-settings-radio input[type="radio"]:checked ~ * {
    color: #f0c040;
}

.alliance-settings-radio:has(input:checked) {
    border-color: rgba(240, 192, 64, 0.6);
    background: rgba(240, 192, 64, 0.1);
}

.alliance-settings-radio span {
    font-size: 14px;
    font-weight: 500;
    color: #ddd;
}

.alliance-settings-radio small {
    font-size: 12px;
    color: #888;
}

.alliance-settings-input {
    width: 100%;
    padding: 12px;
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 15px;
}

.alliance-settings-input:focus {
    outline: none;
    border-color: rgba(240, 192, 64, 0.6);
    background: rgba(30, 30, 50, 0.8);
}

.alliance-settings-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #f0c040 0%, #d4af37 100%);
    border: none;
    border-radius: 6px;
    color: #0a0a1e;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.alliance-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 192, 64, 0.4);
}

.alliance-settings-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .alliance-settings {
        padding: 15px;
        gap: 20px;
    }

    .alliance-settings-section {
        padding: 15px;
    }

    .alliance-settings-section h3 {
        font-size: 15px;
    }

    .referral-stats-summary {
        grid-template-columns: 1fr;
    }

    .referral-code-display,
    .referral-link-display {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
    }

    #referral-stats-dialog {
        min-width: 90%;
        max-width: 90%;
    }

    #referral-ranking-dialog {
        min-width: 90%;
        max-width: 90%;
    }
}

/* ==================== BANNER DE ANUNCIO ==================== */
.ad-banner {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 201;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 4px 8px;
    width: 100%;
    pointer-events: none;
}

.ad-banner iframe,
.ad-banner > * {
    pointer-events: auto;
}

/* Anuncios dentro dos dialogos */
.ad-dialog-banner {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(240, 192, 64, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

/* ================================================
   EFEITO CLAREAMENTO DO MAPA
   ================================================ */

#map-fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 1;
    transition: opacity 5s ease;
    z-index: 5;
    pointer-events: none;
}

/* ================================================
   TELA DE INTRODUÇÃO NARRATIVA
   ================================================ */

#intro-story-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100000;
    overflow: hidden;
}

#intro-story-dialog {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
    box-sizing: border-box;
}

#intro-story-skip {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.4);
    font-family: 'IM Fell English', serif;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

#intro-story-skip:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}

#intro-story-content {
    max-width: 700px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.intro-scene {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transition: opacity 1.2s ease;
}

.intro-scene.scene-hidden {
    opacity: 0;
    pointer-events: none;
}

.intro-story-line {
    opacity: 0;
    transition: opacity 1.2s ease;
    margin: 6px 0;
}

.intro-story-line.visible {
    opacity: 1;
}

.intro-typewriter {
    display: inline;
    border-right: 2px solid rgba(255, 255, 255, 0.6);
    animation: intro-blink 0.8s step-end infinite;
}

.intro-typewriter.done {
    border-right-color: transparent;
    animation: none;
}

@keyframes intro-blink {
    50% { border-right-color: transparent; }
}

.intro-narration {
    font-family: 'IM Fell English', serif;
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: 0.5px;
    margin: 0;
}

.intro-narration-emphasis {
    color: #f0c040;
    font-size: 22px;
    font-weight: bold;
}

.intro-title-reveal {
    font-family: 'Almendra', serif;
    font-size: 52px;
    font-weight: 700;
    color: #f0c040;
    text-shadow: 0 0 30px rgba(240, 192, 64, 0.5), 0 0 60px rgba(240, 192, 64, 0.2);
    letter-spacing: 8px;
    margin: 15px 0;
}

.intro-narration-warning {
    color: #e05050;
    font-style: italic;
    font-size: 21px;
}

.intro-separator {
    font-size: 28px;
    margin: 10px 0;
    opacity: 0.7;
}

.intro-story-cta {
    display: none;
    margin-top: 40px;
    padding: 16px 50px;
    font-family: 'Almendra', serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #1a1a2e;
    background: linear-gradient(135deg, #f0c040, #e0a030);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(240, 192, 64, 0.3);
}

.intro-story-cta.visible {
    opacity: 1;
    transform: translateY(0);
}

.intro-story-cta:hover {
    box-shadow: 0 6px 30px rgba(240, 192, 64, 0.5);
}

@media (max-width: 768px) {
    .intro-narration {
        font-size: 16px;
    }

    .intro-narration-emphasis {
        font-size: 18px;
    }

    .intro-title-reveal {
        font-size: 36px;
        letter-spacing: 5px;
    }

    .intro-narration-warning {
        font-size: 17px;
    }

    .intro-story-cta {
        font-size: 16px;
        padding: 14px 36px;
        letter-spacing: 2px;
    }

    #intro-story-content {
        min-height: 200px;
    }
}

/* ================================================
   BIBLIOTECA DE LORE
   ================================================ */

#lore-dialog-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent;
    z-index: 9000;
    justify-content: center;
    align-items: center;
}

#lore-dialog {
    background: #12121e;
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

#lore-dialog .dialog-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    float: none;
    margin-bottom: 0;
}

.lore-title {
    font-family: 'Almendra', serif;
    color: #f0c040;
    text-align: center;
    padding: 18px 20px 10px;
    margin: 0;
    font-size: 22px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.lore-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
}

.lore-tabs::-webkit-scrollbar {
    display: none;
}

.lore-tab {
    flex: 1;
    min-width: 0;
    padding: 14px 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'IM Fell English', serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.lore-tab.active {
    color: #f0c040;
    border-bottom-color: #f0c040;
}

.lore-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(240, 192, 64, 0.3) transparent;
}

.lore-content::-webkit-scrollbar {
    width: 4px;
}

.lore-content::-webkit-scrollbar-thumb {
    background: rgba(240, 192, 64, 0.3);
    border-radius: 2px;
}

.lore-section-title {
    font-family: 'Almendra', serif;
    color: #f0c040;
    font-size: 18px;
    margin: 0 0 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(240, 192, 64, 0.15);
}

/* Historia - Entradas cronologicas */
.lore-entry {
    margin-bottom: 18px;
    padding-left: 12px;
    border-left: 2px solid rgba(240, 192, 64, 0.2);
}

.lore-date {
    font-family: 'Almendra', serif;
    color: #f0c040;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.lore-entry p {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'IM Fell English', serif;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Estados */
.lore-state {
    margin-bottom: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lore-state-name {
    font-family: 'Almendra', serif;
    color: #f0c040;
    font-size: 16px;
    margin: 0 0 8px;
}

.lore-state-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.lore-state-info span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-family: 'IM Fell English', serif;
}

.lore-state p {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'IM Fell English', serif;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Geografia - Biomas */
.lore-biome {
    margin-bottom: 18px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.lore-biome-name {
    font-family: 'Almendra', serif;
    color: #f0c040;
    font-size: 15px;
    margin: 0 0 6px;
}

.lore-biome-desc {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'IM Fell English', serif;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 6px;
}

.lore-biome-states {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-style: italic;
}

/* Personalidades */
.lore-character {
    margin-bottom: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid rgba(240, 192, 64, 0.3);
}

.lore-char-name {
    font-family: 'Almendra', serif;
    color: #f0c040;
    font-size: 16px;
    margin: 0 0 2px;
}

.lore-char-title {
    color: rgba(255, 255, 255, 0.4);
    font-family: 'IM Fell English', serif;
    font-size: 13px;
    font-style: italic;
    display: block;
    margin-bottom: 8px;
}

.lore-character p {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'IM Fell English', serif;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    #lore-dialog {
        width: 95%;
        max-height: 90vh;
    }

    .lore-title {
        font-size: 18px;
        padding: 14px 15px 8px;
    }

    .lore-tab {
        font-size: 12px;
        padding: 10px 8px;
    }

    .lore-content {
        padding: 15px;
    }
}