/* Descer o campo de nome do personagem na ficha */
.info-area {
    padding-top: 56px;
}
.ruler-equal {
    height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.ruler-equal select,
.ruler-equal input[type="number"],
.ruler-equal select {
    height: 51px;
    font-size: 1.2em;
    box-sizing: border-box;
}
    #containerNivel .nex-input-wrap {
        height: 51px;
        display: flex;
        align-items: center;
    }
.ruler-equal small {
    margin-bottom: 0.5px;
}
@media (max-width: 600px) {
    .ruler-equal {
        height: auto;
    }
}
.ruler-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
#containerEstagio,
#containerNex,
#containerNivel,
#containerClasse,
#containerTrilha {
    display: flex;
    min-width: 120px;
    flex: 0 0 120px;
    height: 112px;
    flex-direction: column;
    justify-content: flex-end;
}
#containerEstagio .nex-input-wrap {
    gap: 2px;
}
#containerEstagio input[type="number"],
#containerNex input[type="number"],
#containerNivel input[type="number"],
#containerClasse select,
#containerTrilha select {
    width: 100%;
    height: 51px;
    text-align: center;
    font-size: 1.2em;
    box-sizing: border-box;
}
@media (max-width: 600px) {
    #containerEstagio {
        max-width: 100%;
    }
    #fNex {
        width: 100%;
        min-width: 0;
    }
}
/* Ajuste visual dos seletores de classe e trilha na régua */
#class-trail-selectors {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}
#class-trail-selectors > div {
    flex: 1 1 0;
    min-width: 0;
}
#class-trail-selectors select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
@media (max-width: 600px) {
    #class-trail-selectors {
        flex-direction: column;
        gap: 6px;
        width: 100%;
        max-width: 100%;
    }
    #class-trail-selectors > div {
        width: 100%;
    }
}
/* ===== LOGIN SCROLL FIX ===== */
#loginContainer, .login-modal, .login-wrapper, .login-content {
    max-height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body.login-active {
    overflow-y: auto !important;
    height: 100vh;
}
/* ================= ESTILOS ================= */
:root {
    --bg: #050505; --card: #121212; --border: #333; --text: #e0e0e0;
    --primary: #8a2be2; --accent: #8a2be2; --primary-hover: #7a25cc; --primary-text: #fff;
    --danger: #ff4444; --success: #00ff88;
    --treinado: #ffd700; --veterano: #ff8c00; --expert: #b91c1c;
    --radius: 8px; --font-main: 'Segoe UI', sans-serif;
    --bar-pv: #e60000; --bar-pe: #0077ff; --bar-san: #ffffff;
}



/* SCROLLBAR CUSTOMIZADA */
* {
    scrollbar-width: thin;
    scrollbar-color: #666 #1a1a1a;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1a1a1a; border-radius: 3px; }
::-webkit-scrollbar-thumb { background: #666; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #888; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font-main); padding-bottom: 80px; display: flex; flex-direction: column; }

button, select, input, textarea { border-radius: var(--radius); outline: none; font-family: inherit; border: 1px solid var(--border); background: #000; color: #fff; cursor: pointer; }

.hidden { display: none !important; }
.btn { padding: 10px 20px; cursor: pointer; font-weight: bold; text-transform: uppercase; background: var(--card); transition: 0.2s; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.nav-main-btn.nav-active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-text); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #000; font-weight: bold; }
.btn-danger:hover { background: #cc3333; border-color: #cc3333; color: #000; }
.btn-sm { padding: 5px 10px; font-size: 0.8em; }
.modal-content .btn { display: inline-flex; align-items: center; justify-content: center; line-height: 1.1; }

/* ===== Layout Mobile do Header da Ficha (versão simplificada) ===== */
@media (max-width: 768px) {
    /* 1. Reset de layout para empilhar tudo */
    .header-container, .info-area, #ruler-row, #containerClassTrail {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important; /* Mata o min-width do desktop */
        flex: none !important;    /* Mata o cálculo calc() do desktop */
        gap: 10px !important;
        align-items: center !important;
    }
    /* 2. Foto no topo (maior e mais próxima do nome) e Nome logo abaixo */
    .avatar-area {
        order: -2 !important;
        width: 180px !important;
        height: 180px !important;
        margin: 0 auto 10px auto !important;
    }
    .avatar-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }
    #fNome {
        order: -1;
        margin: -8px 0 12px 0 !important;
        text-align: center !important;
    }
    /* 3. Padronização total: CLASSE, TRILHA e ORIGEM */
    #containerClasse, #containerTrilha, #containerOrigem {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important; /* Limpa margens negativas ou positivas do desktop */
        padding: 0 !important;
    }
    /* Forçando a mesma altura, largura e centralização nos 3 seletores */
    #fCls, #fTri, #fOri {
        width: 100% !important;
        height: 45px !important; /* Altura idêntica para os três */
        font-size: 1.1em !important;
        text-align: center !important;
        text-align-last: center !important; /* Centraliza o texto dentro do select no mobile */
        margin-top: 5px !important;
    }
    /* Ajuste do NEX e Estágio para não ficarem gigantes */
    #ruler-row > div:has(#fNex) {
        flex-direction: row !important;
        justify-content: center !important;
        width: 100% !important;
    }
    /* Botão Transformar fixo no topo direito dentro do header */
    .header-container { position: relative !important; }
    .info-area > div:first-child {
        position: absolute !important;
        top: 8px;
        right: 8px;
        width: auto !important;
        justify-content: flex-end !important;
        margin: 0 !important;
    }
}

/* Botão padrão de fechar modal (X) - estilo unificado */
.modal-close-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    cursor: pointer;
    backdrop-filter: saturate(120%) blur(1px);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.modal-close-x:hover {
    background: rgba(255,255,255,0.35);
}

/* ===== ÍCONES CSS ===== */
.icon-book::before { content: "☰"; }
.icon-globe::before { content: "◉"; }
.icon-star::before { content: "★"; }
.icon-search::before { content: "⌕"; }
.icon-sword::before { content: "⚔"; }
.icon-dice::before { content: "⚀"; }
.icon-scroll::before { content: "≡"; }

/* Botão de transformação */
#btnTransform { transition: all 0.3s; }
#btnTransform.btn-primary { animation: pulse-transform 2s infinite; }
@keyframes pulse-transform {
    0%, 100% { box-shadow: 0 0 5px var(--primary); }
    50% { box-shadow: 0 0 20px var(--primary), 0 0 30px var(--primary); }
}

/* Seletor de cor do glow - sem hover */
#glowColorSelect {
    transition: none;
    cursor: pointer;
}
#glowColorSelect:hover {
    background-color: inherit !important;
    border-color: inherit !important;
}
#glowColorSelect:focus {
    outline: none;
}
#glowColorSelect option {
    color: transparent;
    cursor: pointer;
    padding: 10px;
}
#glowColorSelect option:hover {
    background-color: inherit !important;
}

/* Elementos transformados com efeito pulse - apenas elementos específicos */
.transformado-active .avatar-img,
.transformado-active #fNome,
.transformado-active .attr-inp,
.transformado-active .status-fill {
    animation: pulse-transform 2s infinite;
}

/* Efeito reduzido para habilidades e rituais */
.transformado-active #listHab .item-card,
.transformado-active #listRit .item-card {
    animation: pulse-transform-soft 3s infinite;
}

@keyframes pulse-transform-soft {
    0%, 100% { box-shadow: 0 0 2px var(--primary); }
    50% { box-shadow: 0 0 8px var(--primary), 0 0 12px var(--primary); }
}

/* Inputs number customizados */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.number-input-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}
.number-input-wrapper input {
    text-align: center;
    flex: 1;
}
.number-btn {
    width: 28px;
    height: 28px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 1.2em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.2s;
}
.number-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.inp-dark { 
    padding: 10px 12px; 
    width: 100%; 
    cursor: text;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.60) 0%, rgba(40, 30, 45, 0.60) 100%);
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95em;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.inp-dark:focus { 
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(50, 45, 60, 0.80) 0%, rgba(60, 45, 65, 0.80) 100%);
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    outline: none;
}

/* TOAST & MODALS */
#toast { visibility: hidden; min-width: 120px; max-width: 280px; background-color: rgba(138, 43, 226, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; text-align: center; border-radius: 25px; padding: 8px 16px; position: fixed; z-index: 17000; left: 50%; top: 20px; transform: translateX(-50%); font-size: 13px; font-weight: bold; box-shadow: 0 2px 10px rgba(0,0,0,0.4); border: 1px solid rgba(138, 43, 226, 0.4); }
#toast.show { visibility: visible; animation: fadein 0.5s, fadeout 0.5s 2.5s; }
@keyframes fadein { from {top: 0; opacity: 0;} to {top: 30px; opacity: 1;} }
@keyframes fadeout { from {top: 30px; opacity: 1;} to {top: 0; opacity: 0;} }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 15000; display: flex; justify-content: center; align-items: center; }

/* Modais de ação (input, confirm, textarea, multi-input) devem aparecer acima de outros modais */
#modalInput, #modalConfirm, #modalTextarea, #modalMultiInput, #modalDelete { z-index: 16000; }

/* O modal de associação de homebrew pode abrir sobre outros modais de campanha. */
#modalHomebrewAssign { z-index: 16600; }
#modalHomebrewCampaignAssign { z-index: 16600; }

.modal-content { 
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.75) 0%, rgba(50, 30, 50, 0.75) 100%);
    padding: 25px; 
    border-radius: 20px; 
    border: 1px solid rgba(102, 126, 234, 0.4); 
    width: 90%; 
    max-width: 500px; 
    max-height: 80vh; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 40px rgba(102, 126, 234, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    overflow: hidden;
    box-sizing: border-box;
}

/* Filhos diretos da modal-content ficam fixos (não encolhem) */
.modal-content > * {
    flex-shrink: 0;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* Área scrollável genérica — único filho que pode rolar */
.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 4px;
}

/* Títulos e textos longos não devem quebrar o layout */
.modal-content h1,
.modal-content h2,
.modal-content h3,
.modal-content p,
.modal-content label {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Botões em modal não devem estourar */
.modal-content button,
.modal-content input,
.modal-content select,
.modal-content textarea {
    max-width: 100%;
    box-sizing: border-box;
}

/* Responsividade para modais em telas menores */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        max-width: none;
        padding: 15px;
        border-radius: 12px;
        max-height: 90vh;
    }
    
    .modal-content button,
    .modal-content input,
    .modal-content select,
    .modal-content textarea {
        font-size: 14px;
        padding: 10px;
    }
}

/* CATÁLOGOS / DATABASE LIST */
.db-list { display: flex; flex-direction: column; gap: 10px; }
.db-btn { 
    padding: 14px 16px; 
    text-align: left; 
    background: #222;
    border: 1px solid #333; 
    border-radius: 12px;
    width: 100%; 
    cursor: pointer; 
    transition: all 0.25s ease; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    opacity: 0.6;
}
.db-btn:hover { 
    opacity: 1;
    border-color: #8a2be2; 
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15) 0%, rgba(138, 43, 226, 0.05) 100%);
    transform: translateX(3px); 
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}
.db-btn b { color: var(--primary); font-size: 1.3em; padding: 8px 14px; background: var(--primary); border-radius: 8px; color: #fff; }
/* Botão + nos catálogos */
.db-btn > span { color: var(--primary) !important; font-size: 1.5em; font-weight: bold; padding: 6px 12px; background: var(--primary); border-radius: 8px; color: #fff !important; }

/* Botão Adicionar (+) Estilo Moderno */
.db-add-btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}
.db-add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.6);
}

/* Cor de seleção em selects - Preto ao invés de branco */
#fCls,
#fTri,
#fOri,
#fAfinidade,
select.inp-dark {
    color: #fff;
    background: rgba(88, 28, 135, 0.45);
}

#fCls option,
#fTri option,
#fOri option,
#fAfinidade option,
select.inp-dark option {
    background: #1a0a2e;
    color: #fff;
}

#fCls optgroup,
#fTri optgroup,
#fOri optgroup,
#fAfinidade optgroup,
select.inp-dark optgroup {
    background: rgba(102, 51, 153, 0.9);
    color: #d8b4fe;
    font-style: normal;
    font-weight: bold;
    border-top: 2px solid #9333ea;
    border-bottom: 2px solid #9333ea;
}

#fCls option:checked,
#fTri option:checked,
#fOri option:checked,
#fAfinidade option:checked,
select.inp-dark option:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* Habilidades automáticas recoláveis */
.auto-hab-container {
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}
.auto-hab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(138, 43, 226, 0.15);
    cursor: pointer;
    transition: 0.2s;
}
.auto-hab-header:hover {
    background: rgba(138, 43, 226, 0.25);
}
.auto-hab-header h4 {
    margin: 0;
    color: var(--primary);
    font-size: 0.9em;
}
.auto-hab-toggle {
    color: var(--primary);
    font-size: 1.2em;
    transition: transform 0.3s;
}
.auto-hab-toggle.collapsed {
    transform: rotate(-90deg);
}
.auto-hab-content {
    padding: 10px 15px;
    display: block;
}
.auto-hab-content.hidden {
    display: none;
}
.auto-hab {
    padding: 8px 0;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
    font-size: 0.9em;
    color: #ccc;
}
.auto-hab:last-child {
    border-bottom: none;
}

/* Containers recolhíveis para Habilidades e Rituais */
.collapsible-container {
    background: linear-gradient(135deg, rgba(30, 20, 40, 0.60) 0%, rgba(40, 20, 45, 0.60) 100%);
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}
.collapsible-container:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(60, 50, 80, 0.40) 0%, rgba(70, 50, 85, 0.40) 100%);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(102, 126, 234, 0.15);
}
.collapsible-header:hover {
    background: linear-gradient(135deg, rgba(80, 70, 100, 0.60) 0%, rgba(90, 70, 105, 0.60) 100%);
}
.collapsible-title {
    color: #fff;
    font-weight: bold;
    font-size: 0.98em;
}
.collapsible-toggle {
    color: #667eea;
    font-size: 1em;
    transition: transform 0.3s;
}
.collapsible-toggle.collapsed {
    transform: rotate(-90deg);
}
.collapsible-content {
    padding: 15px 16px;
    display: block;
    background: linear-gradient(135deg, rgba(15, 10, 25, 0.40) 0%, rgba(25, 10, 30, 0.40) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.collapsible-content.hidden {
    display: none;
}
.hab-card-inner, .rit-card-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Diferenciação de cores: Rituais - roxo-rosado, Habilidades - roxo padrão */
#listRit .collapsible-container {
    border: 1px solid rgba(200, 100, 150, 0.30);
    background: linear-gradient(135deg, rgba(50, 20, 40, 0.60) 0%, rgba(50, 20, 35, 0.60) 100%);
}
#listRit .collapsible-header {
    background: linear-gradient(135deg, rgba(80, 40, 70, 0.40) 0%, rgba(80, 40, 65, 0.40) 100%);
    border-bottom-color: rgba(200, 100, 150, 0.20);
}
#listRit .collapsible-header:hover {
    background: linear-gradient(135deg, rgba(100, 60, 90, 0.60) 0%, rgba(100, 60, 85, 0.60) 100%);
}
#listRit .collapsible-title {
    color: #fff;
}
#listRit .collapsible-toggle {
    color: #e857a0;
}

.view { max-width: 1200px; margin: 0 auto; padding: 20px; width: 100%; flex: 1; border: none; }

/* LOGIN */
#viewLogin { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw !important;     /* Força largura total da tela */
    height: 100vh !important;    /* Força altura total da tela */
    max-width: none !important;  /* Remove o limite de 1200px da classe .view */
    margin: 0 !important;        /* Remove margens automáticas */
    padding: 0 !important;       /* Remove preenchimentos */
    
    background: #000; 
    z-index: 9999; 
    
    /* Centralização Flexbox */
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
}

.login-logo { 
    width: 300px; 
    margin: 0 0 20px 0; /* Remove margens laterais */
    display: block;
}

.auth-box { 
    background: var(--card); 
    padding: 40px; 
    border-radius: 20px; 
    width: 90%; 
    max-width: 400px; 
    text-align: center; 
    border: 1px solid var(--border); 
    margin: 0; /* Garante que não tenha margem lateral empurrando */
}

/* ESTILOS DO RODAPÉ ATUALIZADO */
.footer { 
    text-align: center; 
    padding: 40px 20px; 
    color: #666; 
    font-size: 0.9em; 
    border-top: 1px solid #222; 
    margin-top: 50px; 
    line-height: 1.6; 
    background: #050505;
}
.footer-links { margin-bottom: 20px; }
.footer-links a { 
    color: var(--text); 
    text-decoration: none; 
    margin: 0 10px; 
    font-weight: bold; 
    transition: 0.2s; 
    display: inline-block;
}
.footer-links a:hover { color: var(--primary); }
.footer-legal { 
    font-size: 0.85em; 
    opacity: 1;       /* Mudei de 0.6 para 1 (totalmente visível) */
    color: #cccccc;   /* Defini uma cor cinza claro específica */
    max-width: 800px; 
    margin: 20px auto 0 auto; 
}
.footer-credits { color: #888; font-size: 1em; }
.footer-credits strong { color: var(--primary); }

/* DASHBOARD */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.card { background: var(--card); border: 1px solid var(--border); padding: 0; border-radius: var(--radius); cursor: pointer; transition: 0.3s; display: flex; flex-direction: column; min-height: 180px; overflow: hidden; position: relative; }
.card:hover { border-color: var(--primary); transform: translateY(-3px); background: rgba(138, 43, 226, 0.15); box-shadow: 0 0 20px rgba(138, 43, 226, 0.3); }
.card-img { width: 100%; height: 100px; object-fit: cover; background: #222; }
.card-content { padding: 15px; }
.card-add { border: 2px dashed #444; align-items: center; justify-content: center; background: transparent; min-height: 180px; display: flex; flex-direction: column; cursor: pointer; padding: 20px; }

/* FICHA */
.header-container { display: flex; gap: 20px; background: var(--card); padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); align-items: center; margin-bottom: 20px; margin-top: 40px; }
.avatar-area { position: relative; width: 150px; height: 150px; flex-shrink: 0; cursor: pointer; }
.avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 15px rgba(255,255,255,0.2); }
.avatar-overlay { position: absolute; bottom: 0; width: 100%; text-align: center; background: rgba(0,0,0,0.7); font-size: 0.8em; border-radius: 0 0 100px 100px; padding: 5px; opacity: 0; transition: 0.3s; }
.avatar-area:hover .avatar-overlay { opacity: 1; }
.info-area { flex-grow: 1; display: grid; gap: 10px; }
.row-3 { display: grid; grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
/* Modo Sobrevivendo ao Horror: 4 colunas (NÍVEL + NEX + CLASSE + TRILHA) */
.row-3:has(#containerNivel[style*="display: block"]),
.row-3:has(#containerNivel:not([style*="display: none"])) {
    grid-template-columns: 90px 90px minmax(0, 1fr) minmax(0, 1fr);
}
@supports not (selector(:has(*))) {
    /* Fallback para navegadores sem suporte a :has() */
    body.modo-sobrevivendo .row-3 {
        grid-template-columns: 90px 90px minmax(0, 1fr) minmax(0, 1fr);
    }
}

.attr-container { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; }
.attr-box { display: flex; flex-direction: column; align-items: center; }
.attr-box span { font-weight: 900; font-size: 0.9em; margin-bottom: 5px; } 
.attr-inp { width: 60px; height: 50px; font-size: 1.8em; text-align: center; font-weight: bold; border: 2px solid #555; appearance: textfield; -moz-appearance: textfield; }
.attr-inp::-webkit-inner-spin-button, .attr-inp::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

.attr-input-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.attr-btn { width: 60px; height: 22px; border: none; background: #333; color: #fff; font-size: 1.2em; font-weight: bold; cursor: pointer; transition: 0.2s; border-radius: 4px; opacity: 0; pointer-events: none; }
.attr-input-wrap:hover .attr-btn { opacity: 1; pointer-events: auto; }
.attr-btn:hover { background: var(--primary); color: #000; }
.attr-btn:first-child { border-radius: 4px 4px 0 0; }
.attr-btn:last-child { border-radius: 0 0 4px 4px; }

.nex-input-wrap { display: flex; align-items: center; gap: 3px; user-select: none; -webkit-user-select: none; }
.nex-btn-col { display: flex; flex-direction: column; gap: 2px; opacity: 0; transition: opacity 0.3s ease; }
.nex-input-wrap:hover .nex-btn-col { opacity: 1; transition: opacity 0.05s ease; }
.nex-btn { width: 22px; height: 18px; border: none; background: #333; color: #fff; font-size: 0.85em; font-weight: bold; cursor: pointer; transition: background 0.15s, color 0.15s; border-radius: 3px; padding: 0; line-height: 1; user-select: none; -webkit-user-select: none; }
.nex-btn:hover { background: var(--primary); color: #000; }
.nex-btn:active { transform: scale(0.9); }
.nex-inp { width: 60px; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.nex-inp::-webkit-inner-spin-button, .nex-inp::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

.status-vertical { display: flex; flex-direction: column; gap: 15px; margin-bottom: 30px; }
.status-bar-row { display: grid; grid-template-columns: 50px 1fr; align-items: center; gap: 10px; background: #0f0f0f; padding: 8px 15px; border-radius: var(--radius); border: 1px solid #222; }
.status-bar-row-main { grid-template-columns: 50px 1fr 24px; }
.status-label { font-weight: bold; font-size: 1.2em; text-align: right; }
.status-fill-area { height: 30px; background: #222; border-radius: 4px; position: relative; overflow: hidden; border: 1px solid #333; }
.status-fill { height: 100%; transition: width 0.3s; }
.status-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; z-index: 5; text-shadow: 1px 1px 3px #000; font-weight: bold; }
.inp-mini-overlay { width: 45px; text-align: center; font-size: 1em; font-weight: bold; background: transparent; border: none; color: #fff; padding: 0; margin: 0; text-shadow: inherit; }
.status-action-btn {
    width: 22px;
    height: 22px;
    border: 1px solid #444;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #cfcfcf;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    padding: 0;
}
.status-action-btn:hover {
    border-color: var(--primary);
    color: #fff;
    background: rgba(138, 43, 226, 0.18);
}
.status-action-icon {
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 1px;
    box-shadow: 0 6px 0 currentColor, 6px 0 0 currentColor, 6px 6px 0 currentColor;
}

/* Botões +/- para stats (PV, PE, SAN, PD) */
.stat-btn { 
    width: 24px; height: 24px; border: none; background: rgba(0,0,0,0.6); color: #fff; 
    font-size: 1.1em; font-weight: bold; cursor: pointer; transition: 0.2s; border-radius: 4px; 
    display: flex; align-items: center; justify-content: center; opacity: 0; /* Oculto por padrão, visível no hover */
}
.status-bar-row:hover .stat-btn { opacity: 1; }
.stat-btn:hover { background: var(--primary); color: #000; }
.stat-btn-minus { margin-right: 5px; }
.stat-btn-plus { margin-left: 5px; }

/* Botão de Rolar Dado Mobile */
.btn-rolar-dado-mobile {
    display: none; /* Oculto no desktop */
    width: 100%;
    padding: 12px 20px;
    margin-top: 10px;
    background: linear-gradient(135deg, #8a2be2, #6a1ba2);
    border: 2px solid #8a2be2;
    border-radius: 8px;
    color: #fff;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}
.btn-rolar-dado-mobile:hover { 
    background: linear-gradient(135deg, #9b3cf3, #7b2cb3);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
}

/* Botão fechar no painel de dados */
.dice-close-btn {
    font-size: 1.4em;
    padding: 0 5px;
    color: #ff6666;
}
.dice-close-btn:hover { color: #ff4444; }

/* Ícone de dado nas perícias - oculto no desktop */
.skill-dice-icon {
    display: none;
}

.c-pv { color: #ff4444; } .bg-pv { background: #ff4444; }
.c-pe { color: #0077ff; } .bg-pe { background: #0077ff; }
.c-san { color: #aaa; } .bg-san { background: #555; }

.def-container { display: flex; justify-content: space-around; background: var(--card); padding: 15px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 30px; }
.def-box { text-align: center; }
.def-val { font-size: 1.5em; font-weight: bold; color: #fff; }
.def-editable { cursor: pointer; transition: 0.2s; border-radius: 4px; padding: 2px 6px; }
.def-editable:hover { background: rgba(138,43,226,0.15); color: var(--primary); }
.def-editable.custom-edited { color: #ffa940; }
.def-edit-input { width: 50px; text-align: center; font-size: 1.5em; font-weight: bold; background: #111; border: 1px solid var(--primary); color: #fff; border-radius: 4px; padding: 2px; }
.def-edit-input.hidden { display: none; }

.section-title { color: var(--accent); border-bottom: 1px solid #333; margin: 30px 0 10px 0; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; }
.ficha-full-width { margin-bottom: 20px; }

.skill-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media(max-width: 800px) { .skill-list { grid-template-columns: 1fr; } }
.skill-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; padding: 8px; border-radius: 6px; border: 1px solid #222; background: #080808; font-size: 0.9em; transition: 0.2s; }
.skill-row:hover { background: #111; border-color: var(--primary); transform: translateX(3px); }
.sk-tr { border: 1px solid var(--treinado); color: var(--treinado); }
.sk-tr:hover { border-color: var(--treinado); box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
.sk-tr select, .sk-tr input, .sk-tr .sk-total { color: var(--treinado) !important; border-color: var(--treinado) !important; }
.sk-vet { border: 1px solid var(--veterano); color: var(--veterano); }
.sk-vet:hover { border-color: var(--veterano); box-shadow: 0 0 10px rgba(30, 144, 255, 0.3); }
.sk-vet select, .sk-vet input, .sk-vet .sk-total { color: var(--veterano) !important; border-color: var(--veterano) !important; }
.sk-exp { border: 1px solid var(--expert); color: var(--expert); }
.sk-exp:hover { border-color: var(--expert); box-shadow: 0 0 10px rgba(138, 43, 226, 0.3); }
.sk-exp select, .sk-exp input, .sk-exp .sk-total { color: var(--expert) !important; border-color: var(--expert) !important; }
.sk-val { width: 45px; text-align: center; background: #000; border: 1px solid #444; color: #fff; }
.sk-total { width: 40px; text-align: center; font-weight: bold; color: #fff; padding: 5px; background: #222; border-radius: 4px; }

/* Profissão: input inline ao lado do nome da perícia */
.inp-prof { padding: 6px 8px; font-size: 0.9em; background: #000; border: 1px solid #444; color: #fff; border-radius: 6px; width: 140px; box-sizing: border-box; }

/* Mantém o texto das perícias em tamanho uniforme (sem small visual menor) */
.skill-row .sk-name small { font-size: 0.95em; opacity: 0.6; margin-left: 6px; }

.item-card { 
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.60) 0%, rgba(30, 15, 30, 0.60) 100%);
    border: 1px solid rgba(102, 126, 234, 0.25);
    margin-bottom: 8px; 
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.item-header { 
    padding: 12px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    cursor: pointer; 
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.80) 0%, rgba(30, 20, 35, 0.80) 100%);
    border-bottom: 1px solid rgba(102, 126, 234, 0.15);
    transition: all 0.2s ease;
}
.item-header:hover {
    background: linear-gradient(135deg, rgba(40, 30, 50, 0.90) 0%, rgba(50, 30, 60, 0.90) 100%);
}
.item-body { 
    padding: 15px; 
    display: none; 
    border-top: 1px solid rgba(102, 126, 234, 0.15);
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.50) 0%, rgba(20, 10, 25, 0.50) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.item-card.open .item-body { display: block; }
.arrow { transition: 0.3s; font-size: 0.8em; color: #666; }
.item-card.open .arrow { transform: rotate(180deg); color: #fff; }

/* ATTACK CARDS - Enhanced styling */
.item-card .btn { margin: 2px; }
.item-card .btn:hover { transform: scale(1.02); }
.item-card select.inp-dark { cursor: pointer; font-weight: bold; }
.item-card select.inp-dark:focus { border-color: var(--primary); box-shadow: 0 0 5px rgba(138, 43, 226, 0.3); }

/* HABILIDADES CARD */
.hab-card { background: #1a1a1a; border-left: 3px solid var(--primary); padding: 10px; margin-bottom: 5px; position: relative; }
.hab-header-edit { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.inp-transp-bold { background: transparent; border: none; color: #fff; font-weight: bold; width: 85%; font-size: 1em; }
.inp-transp-bold:focus { border-bottom: 1px solid #666; }
.text-transp { background: transparent; border: none; color: #ccc; width: 100%; font-size: 0.9em; resize: none; min-height: 40px; font-family: inherit; overflow: hidden; }
.text-transp:focus { background: #111; outline: 1px solid #444; }

/* RITUAIS CARD (NOVO) - cor roxo-rosado para diferenciar de habilidades */
.rit-card { background: #110d14; border-left: 3px solid #c832b4; padding: 10px; margin-bottom: 5px; position: relative; }
.rit-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 5px; margin-bottom: 5px; }
.inp-rit-mini { background: #000; border: 1px solid #444; color: #aaa; font-size: 0.8em; text-align: center; padding: 5px; border-radius: 4px; }

.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media(max-width: 800px) { .split-row { grid-template-columns: 1fr; } }

.auto-hab strong { color: #fff; display: block; }
.text-area-box { width: 100%; height: 300px; padding: 15px; background: #080808; border: 1px solid #333; border-radius: var(--radius); resize: vertical; color:#ccc; line-height:1.5; }

.footer { text-align: center; padding: 30px; color: #555; font-size: 0.9em; border-top: 1px solid #222; margin-top: 50px; line-height: 1.6; }

/* Esconder footer global quando Painel Streamer ou Portrait Solo estiverem visíveis */
#viewPainelStreamer:not(.hidden) ~ .footer,
#viewPortraitSolo:not(.hidden) ~ .footer {
    display: none !important;
}

/* PAINEL STREAMER - PORTRAIT SYSTEM */
@font-face {
    font-family: 'GabrieleBad';
    src: url('/portrait_files/gabriele-bad.ttf') format('truetype');
}

#viewPainelStreamer { background: #00ff00; min-height: 100vh; padding: 50px; }
#painelStreamerGrid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; align-items: flex-start; }

.painel-streamer-card-v2 {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

/* --- Portrait Wrapper --- */
.portrait-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Glow Layer (267x267px - bottom layer, +5%) --- */
.portrait-glow {
    position: absolute;
    width: 267px;
    height: 267px;
    border-radius: 50%;
    z-index: 0;
}

.portrait-glow.glow-vermelho { box-shadow: 0 0 40px 15px #ff0000, 0 0 80px 30px rgba(255, 0, 0, 0.5); }
.portrait-glow.glow-preto { box-shadow: 0 0 40px 15px #555555, 0 0 80px 30px rgba(85, 85, 85, 0.5); }
.portrait-glow.glow-amarelo { box-shadow: 0 0 40px 15px #ffd700, 0 0 80px 30px rgba(255, 215, 0, 0.5); }
.portrait-glow.glow-roxo { box-shadow: 0 0 40px 15px #8a2be2, 0 0 80px 30px rgba(138, 43, 226, 0.5); }
.portrait-glow.glow-branco { box-shadow: 0 0 20px 8px rgba(255, 255, 255, 0.3), 0 0 40px 15px rgba(255, 255, 255, 0.15); }

/* --- Background Preto (original size - centered on glow) --- */
.portrait-bg {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

/* --- Character Photo (250x250px - on top of background, centered) --- */
.portrait-photo {
    position: absolute;
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    z-index: 2;
}

/* --- Rotating Frame (original size - centered, rotating 600s) --- */
.portrait-frame {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    animation: portrait-spin 600s linear infinite;
}

@keyframes portrait-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Sanity Circle (bottom-left, overlapping photo) --- */
.portrait-san-circle {
    position: absolute;
    bottom: 0;
    left: -10px;
    width: 160px;
    height: 160px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glow behind san circle (67x67px, +5%) */
.san-circle-glow {
    position: absolute;
    width: 67px;
    height: 67px;
    border-radius: 50%;
    z-index: 0;
}

.san-circle-glow.glow-vermelho { box-shadow: 0 0 20px 8px #ff0000, 0 0 40px 15px rgba(255, 0, 0, 0.5); }
.san-circle-glow.glow-preto { box-shadow: 0 0 20px 8px #555555, 0 0 40px 15px rgba(85, 85, 85, 0.5); }
.san-circle-glow.glow-amarelo { box-shadow: 0 0 20px 8px #ffd700, 0 0 40px 15px rgba(255, 215, 0, 0.5); }
.san-circle-glow.glow-roxo { box-shadow: 0 0 20px 8px #8a2be2, 0 0 40px 15px rgba(138, 43, 226, 0.5); }
.san-circle-glow.glow-branco { box-shadow: 0 0 10px 4px rgba(255, 255, 255, 0.2), 0 0 20px 8px rgba(255, 255, 255, 0.1); }

/* Background preto for san circle (160x160px) */
.san-circle-bg {
    position: absolute;
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1;
}

.san-value {
    position: relative;
    z-index: 2;
    font-family: 'GabrieleBad', sans-serif;
    font-size: 2.8em;
    color: #fff;
    letter-spacing: 1px;
    transform: rotate(-7deg);
}

/* --- Character Name (glow only) --- */
.portrait-name {
    font-family: 'GabrieleBad', sans-serif;
    font-size: 2.8em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.1;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    transform: rotate(-7deg);
    transform-origin: left center;
}

/* --- Status Markers --- */
.portrait-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    width: 100%;
    align-items: flex-start;
}

.portrait-stat-marker {
    font-family: 'GabrieleBad', sans-serif;
    font-size: 2.4em;
    color: #fff;
    text-align: left;
    line-height: 1.1;
    letter-spacing: 2px;
    font-weight: normal;
}

.portrait-stat-pv {
    transform: rotate(-7deg);
    transform-origin: left center;
}

.portrait-stat-pe {
    transform: rotate(-7deg);
    transform-origin: left center;
}

/* --- Glow Effects by Color (text-shadow only) --- */
.glow-vermelho { text-shadow: 0 0 8px #ff0000, 0 0 18px #ff0000, 0 0 35px #ff0000; }
.glow-preto    { text-shadow: 0 0 8px #555555, 0 0 18px #444444, 0 0 35px #333333; }
.glow-amarelo  { text-shadow: 0 0 8px #ffd700, 0 0 18px #ffd700, 0 0 35px #ffd700; }
.glow-roxo     { text-shadow: 0 0 8px #8a2be2, 0 0 18px #8a2be2, 0 0 35px #8a2be2; }
.glow-branco   { text-shadow: 0 0 8px #ffffff, 0 0 18px #ffffff, 0 0 35px #ffffff; }

/* Fixed glow colors for PV and PE */
.glow-pv { text-shadow: 0 0 8px #ff0000, 0 0 18px #ff0000, 0 0 35px #ff0000; }
.glow-pe { text-shadow: 0 0 8px #0066ff, 0 0 18px #0066ff, 0 0 35px #0066ff; }

/* --- Info section (name + stats at edge of portrait, on top) --- */
.portrait-info {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 5px 0;
    margin-left: -80px;
    margin-top: 40px;
    z-index: 10;
}

/* ================= ROLAGEM (DICE EXTENSION) ================= */
.cat-box {
    padding: 12px 16px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 60px;
    transition: all 0.2s;
}
.cat-box:hover {
    border-color: var(--primary);
    background: #222;
}
.cat-label {
    font-size: 0.75em;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
}
.cat-count {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--primary);
}

.dice-panel {
    position: fixed; bottom: 20px; right: 20px; width: 300px; height: 300px;
    background: #000; border: 2px solid var(--primary); border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8); display: none; flex-direction: column;
    z-index: 9000;
}
.dice-panel.show { display: flex; animation: slideIn 0.3s ease-out; }
@keyframes slideIn { from {transform: translateX(100%);} to {transform: translateX(0);} }

.dice-header {
    background: #111; padding: 5px 10px; display: flex;
    justify-content: space-between; align-items: center;
    color: var(--primary); font-family: sans-serif; font-size: 12px;
    letter-spacing: 1px; border-bottom: 1px solid #333;
}
.dice-controls { display: flex; gap: 10px; align-items: center; }
#dice-color-picker { border: none; width: 20px; height: 20px; background: transparent; cursor: pointer; padding: 0; }
.btn-icon-small { background:none; border:none; cursor:pointer; font-size:1.2em; color:#fff; padding:0; }
.dice-table-container { position: relative; flex: 1; overflow: hidden; }
.table-img { width: 100%; height: 100%; object-fit: cover; }
#dice-wrapper {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 120px; height: 120px; display: flex; justify-content: center; align-items: center;
}
#dice-img { width: 100%; transition: filter 0.2s; }
#dice-result {
    position: absolute; color: #fff; font-size: 32px; font-family: 'Courier New', Courier, monospace;
    font-weight: bold; text-shadow: 2px 2px 5px #000; z-index: 2;
}
.rolling { animation: rollAnim 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes rollAnim { 0% { transform: scale(0) rotate(0deg); } 100% { transform: scale(1) rotate(720deg); } }

.glossario-edit-icon {
    display: inline-block;
    font-size: 0.9em;
    opacity: 0.8;
    transform: rotate(60deg);
    transform-origin: center;
    position: absolute;
    top: 8px;
    right: 36px;
    cursor: pointer;
    z-index: 2;
}

/* MALDIÇÕES */
.btn-maldicao {
    background: linear-gradient(135deg, #8a2be2, #5a1a9a);
    border-color: #8a2be2;
    color: #fff;
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.5);
}
.btn-maldicao:hover {
    background: linear-gradient(135deg, #9b3cf3, #6b2bab);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
    border-color: #9b3cf3;
    color: #fff;
}

/* AFINIDADES */
.afinidade-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid rgba(51, 51, 51, 0.8);
    border-radius: 6px;
    transition: 0.2s;
}
.afinidade-row:hover {
    background: rgba(34, 34, 34, 0.7);
    border-color: var(--primary);
}
.afinidade-label {
    font-weight: bold;
    font-size: 0.9em;
    min-width: 120px;
}
.afinidade-checks {
    display: flex;
    gap: 8px;
}
.check-afinidade {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.85em;
    color: #ccc;
    transition: 0.2s;
}
.check-afinidade:hover {
    color: var(--primary);
}
.check-afinidade input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* BOTÃO DE INTERLÚDIO */
.btn-descanso-icon {
    position: absolute;
    top: -45px;
    right: 0;
    background: var(--card);
    color: #fff;
    font-weight: bold;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    text-transform: uppercase;
}
.btn-descanso-icon:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    color: var(--primary);
}

/* TABS DO INTERLÚDIO */
.interludio-tab {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #888;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.2s;
    border-radius: 6px 6px 0 0;
}
.interludio-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.interludio-tab:hover:not(.active) {
    background: #2a2a2a;
    color: #ccc;
}
.interludio-tab-content {
    max-height: 55vh;
    overflow-y: auto;
    padding: 2px;
}

/* BOTÕES DO MODAL DE DESCANSO */
.btn-descanso {
    padding: 15px 20px;
    text-align: left;
    transition: all 0.2s;
    border: none;
}
.btn-descanso:hover {
    transform: translateX(5px);
    filter: brightness(1.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.btn-descanso small {
    font-size: 0.75em;
    display: block;
    margin-top: 2px;
}

/* Estilos para abas de catálogo */
.db-tab {
    padding: 12px 20px;
    border: none;
    background: #1a1a1a;
    color: #aaa;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-weight: normal;
    transition: all 0.3s ease;
    font-size: 0.95em;
    border-bottom: 2px solid transparent;
}

.db-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #ddd;
}

.db-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: bold;
    border-bottom: 2px solid #667eea;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

/* ========== ESCUDO DO MESTRE ========== */
.escudo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 10px;
}
.escudo-title {
    color: var(--primary);
    font-size: 1.4em;
    text-align: center;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.escudo-grid {
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    gap: 12px;
    height: calc(100vh - 100px);
    min-height: 500px;
}

/* 4-column layout when Campo de Batalha is included */
.escudo-grid.escudo-grid-4col {
    grid-template-columns: 220px 1fr 1fr 300px;
}

/* 3-column layout without Campo de Batalha */
.escudo-grid.escudo-grid-3col {
    grid-template-columns: 220px 1fr 300px;
}
.escudo-col {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.escudo-col-header {
    padding: 12px 14px 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.escudo-col-header h3 {
    margin: 0;
    font-size: 0.85em;
    color: var(--primary);
    flex: 1;
    white-space: nowrap;
}
.escudo-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.escudo-btn {
    padding: 4px 10px !important;
    font-size: 0.7em !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 4px !important;
    cursor: pointer;
    white-space: nowrap;
}
.escudo-btn:hover { filter: brightness(1.2); }
.escudo-btn-danger {
    padding: 4px 10px !important;
    font-size: 0.7em !important;
    background: #c0392b !important;
    border: none !important;
    color: #fff !important;
    border-radius: 4px !important;
    cursor: pointer;
    white-space: nowrap;
}
.escudo-btn-danger:hover { filter: brightness(1.2); }
.escudo-iniciativa-dica {
    margin: 0;
    padding: 8px 14px 10px;
    font-size: 0.75em;
    color: #888;
    border-bottom: 1px solid var(--border);
}

/* Iniciativa Cards */
.init-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    transition: all 0.3s;
}
.init-card:first-child {
    border-color: #FFD700;
    background: rgba(255,215,0,0.06);
}
.init-rank {
    font-size: 1.4em;
    font-weight: bold;
    color: #667eea;
    min-width: 28px;
    text-align: center;
}
.init-card:first-child .init-rank { color: #FFD700; }
.init-avatar {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.init-info { flex: 1; min-width: 0; }
.init-name {
    font-size: 0.85em;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.init-result {
    font-size: 1.3em;
    font-weight: bold;
    color: #8a2be2;
    min-width: 32px;
    text-align: right;
}

/* Roll Log Cards */
.roll-log-card {
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    animation: rollSlideIn 0.3s ease;
}
@keyframes rollSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.roll-log-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.roll-log-avatar {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.roll-log-name {
    font-size: 0.78em;
    font-weight: bold;
    color: #667eea;
}
.roll-log-time {
    font-size: 0.65em;
    color: #666;
    margin-left: auto;
}
.roll-log-test {
    font-size: 0.8em;
    color: #ccc;
    font-weight: bold;
    text-transform: uppercase;
}
.roll-log-result {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
}
.roll-log-result.crit { color: #FFD700; }
.roll-log-structured {
    display: grid;
    gap: 8px;
    margin-top: 6px;
}
.roll-log-section {
    padding: 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}
.roll-log-section-attack {
    border-left: 3px solid rgba(255, 215, 0, 0.6);
}
.roll-log-section-damage {
    border-left: 3px solid rgba(220, 20, 60, 0.7);
}
.roll-log-section-label {
    font-size: 0.65em;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 4px;
    font-weight: 700;
}
.roll-log-breakdown {
    font-size: 0.7em;
    color: #888;
    margin-top: 2px;
}

/* Mini-Ficha Cards */
.mini-ficha {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.2s;
    position: relative;
    cursor: grab;
}
.mini-ficha:active {
    cursor: grabbing;
}
.mini-ficha.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}
.mini-ficha.drag-over {
    border-top: 3px solid var(--primary);
}
.mini-ficha:hover {
    border-color: rgba(102, 126, 234, 0.3);
    background: rgba(255,255,255,0.05);
}
.mini-ficha .campo-drag-handle {
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
}
.mini-ficha-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.mini-ficha-avatar {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}
.mini-ficha-identity { flex: 1; min-width: 0; }
.mini-ficha-nome {
    font-weight: bold;
    color: #fff;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}
.mini-ficha-classe {
    color: #aaa;
    font-size: 0.75em;
}
.mini-ficha-nex {
    color: #8a2be2;
    font-size: 0.75em;
    font-weight: bold;
}
.mini-ficha-attrs {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.mini-ficha-attr {
    background: rgba(102,126,234,0.1);
    border: 1px solid rgba(102,126,234,0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.7em;
    text-align: center;
    min-width: 40px;
}
.mini-ficha-attr-label {
    color: #888;
    font-size: 0.85em;
    text-transform: uppercase;
}
.mini-ficha-attr-val {
    color: #fff;
    font-weight: bold;
}
.mini-ficha-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.mini-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}
.mini-bar-label {
    font-size: 0.7em;
    color: #888;
    min-width: 28px;
    text-align: right;
}
.mini-bar-track {
    flex: 1;
    height: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    overflow: hidden;
}
.mini-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}
.mini-bar-fill.pv { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.mini-bar-fill.san { background: linear-gradient(90deg, #3498db, #2980b9); }
.mini-bar-fill.pe { background: linear-gradient(90deg, #9b59b6, #8e44ad); }
.mini-bar-val {
    font-size: 0.7em;
    color: #ccc;
    min-width: 50px;
}
.mini-ficha-defenses {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.mini-def {
    text-align: center;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    padding: 4px 10px;
    min-width: 52px;
}
.mini-def-label {
    font-size: 0.6em;
    color: #888;
    text-transform: uppercase;
}
.mini-def-val {
    font-size: 1em;
    font-weight: bold;
    color: #fff;
}

/* ===== CAMPO DE BATALHA - Combat Cards ===== */
.combate-card {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.9) 0%, rgba(40, 30, 45, 0.9) 100%);
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.combate-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.2);
}

.combate-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
}

.combate-card-name {
    font-weight: bold;
    font-size: 0.9em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.combate-card-init {
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: #ffd700;
    margin-left: 8px;
}

.combate-card-body {
    padding: 8px 12px 10px;
}

.combate-pv-bar {
    position: relative;
    height: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.combate-pv-fill {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
}

.combate-pv-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.combate-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.combate-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(100, 100, 120, 0.3);
    border: 1px solid rgba(100, 100, 120, 0.5);
    border-radius: 4px;
    color: #fff;
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.combate-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.combate-pv-input {
    width: 50px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(100, 100, 120, 0.5);
    border-radius: 4px;
    color: #fff;
    font-size: 0.85em;
    padding: 4px;
}

.combate-bottom-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    position: relative;
}

.combate-btn-init {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
}

.combate-btn-init:hover {
    background: #ffd700;
    border-color: #ffd700;
    color: #000;
}

.combate-btn-info {
    background: rgba(0, 191, 255, 0.2);
    border-color: rgba(0, 191, 255, 0.5);
}

.combate-btn-info:hover {
    background: #00bfff;
    border-color: #00bfff;
    color: #000;
}

.combate-btn-danger {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.5);
}

.combate-btn-danger:hover {
    background: #ff4444;
    border-color: #ff4444;
}

/* VD Display */
.combate-vd {
    background: rgba(138, 43, 226, 0.3);
    color: #d8bfff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    margin-left: auto;
}

/* Attribute Buttons */
.combate-attrs {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.combate-attr-btn {
    background: rgba(100, 100, 120, 0.3);
    border: 1px solid rgba(100, 100, 120, 0.5);
    color: #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 45px;
    text-align: center;
}

.combate-attr-btn:hover {
    background: rgba(138, 43, 226, 0.4);
    border-color: #8a2be2;
    color: #fff;
    transform: scale(1.05);
}

/* Editable PV Bar */
.combate-pv-editable {
    cursor: pointer;
    transition: all 0.2s;
}

.combate-pv-editable:hover {
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
    transform: scale(1.02);
}

/* VD Total */
.campo-vd-total {
    text-align: center;
    padding: 6px 12px;
    background: rgba(138, 43, 226, 0.15);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 6px;
    color: #d8bfff;
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* Initiative Value Display */
.combate-init-value {
    position: absolute;
    bottom: 6px;
    right: 8px;
    background: rgba(255, 215, 0, 0.25);
    color: #ffd700;
    font-weight: bold;
    font-size: 0.85em;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.5);
}

/* Initiative Badge (inside card, top-left for ally) */
.combate-init-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4) 0%, rgba(255, 180, 0, 0.3) 100%);
    color: #ffd700;
    font-weight: bold;
    font-size: 0.85em;
    padding: 3px 10px;
    border-radius: 6px;
    border: 2px solid rgba(255, 215, 0, 0.7);
    z-index: 3;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
    min-width: auto;
    text-align: center;
}

/* Initiative badge always top-right (both enemies and allies) */
.combate-init-badge {
    left: auto;
    right: 5px;
    transform: none;
}

/* Editable initiative badge */
.combate-init-editable {
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.combate-init-editable:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.6) 0%, rgba(255, 180, 0, 0.5) 100%);
    border-color: rgba(255, 215, 0, 1);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Aliado card - no extra margin, init badge is inside */
.mini-ficha.aliado {
    width: 100%;
    box-sizing: border-box;
}

/* Ally card remove button — shifted left to make room for init badge */
.ally-remove-btn {
    position: absolute;
    top: 5px;
    right: 50px;
    padding: 2px 6px;
    font-size: 0.7em;
    z-index: 2;
}

/* Monster card remove button */
.monster-remove-btn {
    position: absolute;
    top: 5px;
    right: 50px;
    padding: 2px 6px;
    font-size: 0.7em;
    z-index: 2;
}

/* Clickable monster name */
.monster-name-clickable:hover {
    color: #8a2be2 !important;
    text-decoration: underline;
}

/* Clickable monster attributes */
.monster-attr-clickable:hover {
    background: rgba(138, 43, 226, 0.3);
    border-radius: 4px;
    transform: scale(1.1);
}

/* Monster avatar fallback */
.monster-avatar {
    border: 2px solid rgba(100,100,100,0.4);
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

/* Attack buttons for monsters */
.combate-btn-attack {
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.5);
    color: #ff8888;
    transition: all 0.2s;
}

.combate-btn-attack:hover {
    background: rgba(255, 100, 100, 0.4);
    border-color: #ff6666;
    color: #fff;
    transform: scale(1.05);
}

/* Initiative button sizing */
.combate-btn-init {
    width: auto !important;
    height: auto !important;
    padding: 4px 8px !important;
    font-size: 0.7em !important;
    white-space: nowrap;
}

/* ROLAR button sizing */
.combate-btn-attack {
    width: auto !important;
    height: auto !important;
}

/* Add Creature Modal for Combat */
.combate-add-search {
    margin-bottom: 15px;
}

.combate-creature-list {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 15px;
}

.combate-element-group {
    margin-bottom: 5px;
}

.combate-element-header {
    padding: 8px 12px;
    font-weight: bold;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.combate-creature-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(100, 100, 100, 0.2);
}

.combate-creature-option:hover {
    background: rgba(138, 43, 226, 0.15);
}

.combate-creature-option.selected {
    background: rgba(138, 43, 226, 0.3);
    border-left: 3px solid var(--primary);
}

.combate-add-options {
    display: flex;
    gap: 10px;
}

.combate-add-options input {
    flex: 1;
}

/* Combat add tabs */
.combate-tab-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.8em;
    background: rgba(50, 50, 50, 0.5);
    border: 1px solid #333;
    color: #888;
    transition: all 0.2s;
}

.combate-tab-btn:hover {
    background: rgba(138, 43, 226, 0.2);
    color: #fff;
}

.combate-tab-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.combat-creature-detail-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 20px 0;
    flex-wrap: wrap;
}

.combat-creature-detail-tabs .combate-tab-btn {
    flex: 0 0 auto;
    min-width: 170px;
}

.combat-manual-roll-section {
    max-width: 560px;
}

.combat-manual-roll-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.combat-manual-roll-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #ddd;
    font-size: 0.9em;
}

.combat-manual-roll-field span {
    font-weight: 600;
    color: #f0f0f0;
}

/* Responsive */
@media (max-width: 1100px) {
    .escudo-grid,
    .escudo-grid.escudo-grid-4col,
    .escudo-grid.escudo-grid-3col {
        grid-template-columns: 1fr;
        height: auto;
    }
    .escudo-col { max-height: 50vh; }
    .escudo-scroll { max-height: 40vh; }
}
/* ========== TOGGLE SWITCH ========== */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: 0.3s;
    border-radius: 26px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--primary, #8a2be2);
}
input:checked + .slider:before {
    transform: translateX(24px);
}

/* Barra de PD (Pontos de Determinação) - Modo Sobrevivendo ao Horror */
.mini-bar-fill.pd {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

/* Emoji de engrenagem branco */
.gear-btn {
    filter: grayscale(100%) brightness(3) contrast(3);
    opacity: 0.95;
}
.gear-btn:hover {
    filter: grayscale(100%) brightness(3.5) contrast(3);
    opacity: 1;
}

/* Estilos para o container da senha */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    width: 100%;
    padding-right: 40px; /* Espaço para o ícone */
}

.toggle-password {
    position: absolute;
    right: 10px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toggle-password:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.toggle-password:active {
    transform: scale(0.95);
}

.eye-icon {
    width: 20px;
    height: 20px;
    color: #888;
    transition: color 0.2s ease;
}

.toggle-password:hover .eye-icon {
    color: #fff;
}

/* ===== MENU DROPDOWN DA FICHA ===== */
.ficha-menu-container {
    position: relative;
    display: inline-block;
}

.ficha-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(30, 30, 45, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: var(--radius);
    min-width: 200px;
    width: max-content;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    overflow: visible;
    display: none;
}

.ficha-menu-dropdown.show {
    display: block;
}

.ficha-menu-dropdown button {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #fff;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.ficha-menu-dropdown button:hover {
    background: rgba(138, 43, 226, 0.3);
}

.ficha-menu-dropdown button.danger {
    color: var(--danger);
}

.ficha-menu-dropdown button.danger:hover {
    background: rgba(255, 68, 68, 0.2);
}

/* ===== VIEW PORTRAIT SOLO ===== */
#viewPortraitSolo {
    background: #00ff00;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Esconder header no Portrait Solo (para uso em OBS) */
#viewPortraitSolo .portrait-solo-header {
    display: none;
}

#portraitSoloContent {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.portrait-solo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 400px;
}

.portrait-solo-avatar {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

.portrait-solo-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portrait-solo-info {
    text-align: center;
}

.portrait-solo-name {
    font-size: 1.5em;
    color: var(--text);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

.portrait-solo-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portrait-bar-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.portrait-bar-label {
    width: 40px;
    font-size: 0.85em;
    font-weight: bold;
    color: var(--textMuted);
    text-align: right;
}

.portrait-bar {
    flex: 1;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.portrait-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.3s ease;
}

.portrait-bar.pv-bar .portrait-bar-fill {
    background: linear-gradient(90deg, #b91c1c, #dc2626);
}

.portrait-bar.ps-bar .portrait-bar-fill {
    background: linear-gradient(90deg, #1d4ed8, #3b82f6);
}

.portrait-bar.pe-bar .portrait-bar-fill {
    background: linear-gradient(90deg, #7c3aed, #a855f7);
}

.portrait-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* ===== TRANSIÇÕES DE TELA ===== */
.view {
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

.view.fade-out {
    opacity: 0;
}

.view.fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Links de cards (fichas/campanhas) */
a.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.card-link:hover {
    text-decoration: none;
}

/* ===== SISTEMA DE PASTAS PARA FICHAS (Silver/Gold) ===== */
.ficha-folder {
    background: linear-gradient(135deg, #1e1e2e 0%, #16162a 100%);
    border: 2px solid #3a3a5a;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.ficha-folder:hover {
    border-color: #8a2be2;
}

.ficha-folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    cursor: pointer;
    user-select: none;
    background: rgba(138, 43, 226, 0.08);
    border-bottom: 1px solid #2a2a4a;
    transition: background 0.3s;
}

.ficha-folder-header:hover {
    background: rgba(138, 43, 226, 0.15);
}

.folder-arrow {
    transition: transform 0.3s;
    color: #8a2be2;
    flex-shrink: 0;
}

.folder-icon {
    flex-shrink: 0;
}

.folder-name {
    font-weight: bold;
    color: #e0e0e0;
    font-size: 1.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-count {
    color: #888;
    font-size: 0.85em;
    flex-shrink: 0;
}

.folder-action-btn {
    padding: 2px 6px !important;
    font-size: 0.8em !important;
    background: rgba(0,0,0,0.3) !important;
    border: 1px solid #444 !important;
    border-radius: 4px !important;
    cursor: pointer;
    color: #ccc;
    opacity: 0.6;
    transition: opacity 0.3s, color 0.3s, border-color 0.3s, background 0.3s;
}

.folder-action-btn:hover {
    opacity: 1;
    color: var(--primary);
    border-color: var(--primary) !important;
    background: rgba(138, 43, 226, 0.15) !important;
}

.folder-delete-btn {
    color: #ccc;
}

.folder-delete-btn:hover {
    color: var(--danger) !important;
    border-color: var(--danger) !important;
    background: rgba(255, 68, 68, 0.15) !important;
}

.ficha-folder-content {
    min-height: 20px;
}

/* Drag states */
.ficha-dragging {
    opacity: 0.4 !important;
    transform: scale(0.95) !important;
}

.drop-active.folder-drop-zone,
.ficha-folder.drop-active {
    border-color: #8a2be2;
}

.drop-hover.folder-drop-zone,
.ficha-folder.drop-hover,
.drop-hover.ficha-folder {
    border-color: #a855f7 !important;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4) !important;
    background: rgba(138, 43, 226, 0.1);
}

/* Busca de fichas */
.ficha-search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid #444;
    border-radius: 6px;
    transition: border-color 0.3s;
}

.ficha-search-box:focus-within {
    border-color: #8a2be2;
}

/* ===== CAMPO DE BATALHA (VIEW SEPARADA) ===== */
.campo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.campo-title {
    color: var(--primary);
    margin: 0;
    font-size: 1.5em;
}

.campo-header-actions {
    display: flex;
    gap: 10px;
}

.campo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    height: calc(100vh - 150px);
    min-height: 500px;
}

/* Layout de 3 colunas: Inimigos | Logs | Aliados */
.campo-grid-3col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr) minmax(0, 1.92fr);
    gap: 12px;
    height: calc(100vh - 150px);
    min-height: 500px;
}

.campo-drag-hint {
    color: #666;
    font-size: 0.75em;
    text-align: center;
    margin: 0;
    padding: 5px;
    font-style: italic;
}

.campo-sortable {
    min-height: 100px;
}

.campo-sortable .campo-criatura-card {
    cursor: grab;
    transition: transform 0.15s, box-shadow 0.15s;
}

.campo-sortable .campo-criatura-card:active {
    cursor: grabbing;
}

.campo-sortable .campo-criatura-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.campo-sortable .campo-criatura-card.drag-over {
    border-top: 3px solid var(--primary);
}

.campo-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

.campo-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.campo-iniciativa-section {
    flex: 0 0 auto;
    max-height: 200px;
}

.campo-criaturas-section,
.campo-jogadores-section,
.campo-log-section {
    flex: 1;
}

.campo-section-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.2);
}

.campo-section-header h3 {
    margin: 0;
    font-size: 0.85em;
    color: var(--primary);
    flex: 1;
    white-space: nowrap;
}

.campo-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.campo-iniciativa-list {
    padding: 10px;
    overflow-y: auto;
    max-height: 150px;
}

.campo-col-inimigos .campo-section-header h3 {
    color: #e74c3c;
}

.campo-col-aliados .campo-section-header h3 {
    color: #2ecc71;
}

.campo-col-logs .campo-section-header h3 {
    color: var(--primary);
}

.campo-side-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    gap: 12px;
    min-height: 0;
    flex: 1;
    padding-left: 0;
    padding-right: 0;
}

.campo-col-aliados {
    padding-left: 0;
}

.campo-col-aliados .campo-section {
    min-width: 0;
}

.campo-col-aliados .campo-scroll {
    padding: 10px;
}

.campo-support-card.dragging {
    opacity: 0.55;
}

.campo-ally-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(17, 18, 28, 0.98) 0%, rgba(17, 18, 28, 0.94) 100%);
    border-bottom: 1px solid #333;
    padding: 12px 14px;
    flex-shrink: 0;
    overflow: visible;
}

/* Campo de Batalha - Cards de Criatura */
.campo-criatura-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 8px;
    position: relative;
}

.campo-criatura-card.inimigo {
    border-left: 3px solid #e74c3c;
}

.campo-criatura-card.aliado {
    border-left: 3px solid #2ecc71;
}

.campo-drag-handle {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.2em;
    cursor: grab;
    padding: 5px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.campo-drag-handle:hover {
    opacity: 1;
    color: var(--primary);
}

.campo-posicao {
    background: var(--primary);
    color: #000;
    font-weight: bold;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
}

.campo-criatura-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 8px;
    padding-left: 20px;
}

.campo-criatura-nome {
    font-weight: bold;
    color: var(--text);
}

.campo-criatura-stats {
    display: flex;
    gap: 10px;
    font-size: 0.85em;
}

.campo-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.campo-stat-hp {
    color: #e74c3c;
}

.campo-stat-pe {
    color: #3498db;
}

.campo-stat-san {
    color: #9b59b6;
}

.campo-iniciativa-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin-bottom: 4px;
}

.campo-iniciativa-item.inimigo {
    border-left: 3px solid #e74c3c;
}

.campo-iniciativa-item.aliado {
    border-left: 3px solid #2ecc71;
}

.campo-iniciativa-valor {
    font-weight: bold;
    color: var(--primary);
}

/* Campo de Batalha - Responsive */
@media (max-width: 1100px) {
    .campo-grid,
    .campo-grid-3col {
        grid-template-columns: 1fr 1fr;
        height: auto;
    }
    
    .campo-col {
        max-height: none;
    }
    
    .campo-section {
        max-height: 50vh;
    }
    
    .campo-scroll {
        max-height: 40vh;
    }
}

@media (max-width: 768px) {
    .campo-grid-3col {
        grid-template-columns: 1fr;
    }
}

/* ===== GLOSSÁRIO DE CRIATURAS ===== */
.glossario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.glossario-title {
    color: var(--primary);
    margin: 0;
    font-size: 1.5em;
}

.glossario-btn-criar {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tabs */
.glossario-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.glossario-tab {
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.75) 0%, rgba(50, 30, 50, 0.75) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
}

.glossario-tab:hover {
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.glossario-tab.active {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

.glossario-tab-icon {
    font-size: 1.2em;
}

/* Filtros */
.glossario-filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.glossario-search-wrapper {
    position: relative;
    max-width: 400px;
}

.glossario-search {
    padding-right: 40px !important;
}

.glossario-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.glossario-element-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.glossario-element-filter {
    padding: 8px 16px;
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid #333;
    border-radius: 20px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.glossario-element-filter:hover {
    border-color: var(--element-color, var(--primary));
    color: var(--element-color, var(--primary));
}

.glossario-element-filter.active {
    background: var(--element-color, var(--primary));
    border-color: var(--element-color, var(--primary));
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.glossario-element-filter[data-element="Morte"].active {
    color: #fff;
    border: 1px solid #666;
}

.glossario-element-filter[data-element="Conhecimento"]:hover,
.glossario-element-filter[data-element="Conhecimento"].active {
    color: #000;
}

/* Placeholder */
.glossario-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.glossario-placeholder-box {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.75) 0%, rgba(50, 30, 50, 0.75) 100%);
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    padding: 40px 60px;
    text-align: center;
    color: #666;
}

.glossario-placeholder-box p {
    margin: 10px 0 5px;
    font-size: 1.2em;
    color: #888;
}

.glossario-placeholder-box small {
    color: #555;
}

/* Lista de Criaturas */
.glossario-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.glossario-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.glossario-empty p {
    margin: 0;
    font-size: 1.1em;
}

/* Seção por Elemento */
.glossario-element-section {
    background: rgba(20, 20, 30, 0.6);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(100, 100, 100, 0.2);
}

.glossario-element-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-weight: bold;
    font-size: 0.95em;
    letter-spacing: 1px;
}

.glossario-element-count {
    font-weight: normal;
    font-size: 0.85em;
    opacity: 0.8;
}

.glossario-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
    padding: 15px;
}

/* Card de Criatura - Novo Design */
.glossario-card {
    background-color: #1a1a2e;
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 120px;
    position: relative;
}

.glossario-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
}

.glossario-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.glossario-card-content {
    display: flex;
    align-items: center;
    padding: 15px;
    height: 100%;
    min-height: 100px;
    position: relative;
    z-index: 2;
}

.glossario-card-foto {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-right: 15px;
}

.glossario-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.glossario-card-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #fff;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.98), 0 8px 24px rgba(0, 0, 0, 0.96), 0 0 40px rgba(0, 0, 0, 0.88);
}

.glossario-card-vd {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
}

.glossario-card-meta {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7);
    align-self: flex-end;
    margin-top: 8px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.98), 0 6px 20px rgba(0, 0, 0, 0.95), 0 0 32px rgba(0, 0, 0, 0.86);
}

.glossario-elementos-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.glossario-element-pill {
    padding: 4px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glossario-element-pill.selected {
    background: rgba(102, 126, 234, 0.8);
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.7);
}

.glossario-card-header {
    display: none; /* Deprecated - using new layout */
}

.glossario-card-body {
    display: none; /* Deprecated - using new layout */
}

.glossario-card-desc {
    display: none;
}

.glossario-card-attrs {
    display: none;
}

.glossario-attr {
    background: rgba(102, 126, 234, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    color: #aaa;
}

.glossario-attr b {
    color: var(--primary);
    margin-right: 2px;
}

/* ===== MODAL DE DETALHES DA CRIATURA ===== */
.glossario-detail-modal {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto;
    max-height: 100vh;
}

.glossario-detail-content {
    background: linear-gradient(135deg, rgba(25, 25, 40, 0.98) 0%, rgba(35, 25, 40, 0.98) 100%);
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 0 0 40px var(--element-glow, rgba(138, 43, 226, 0.3));
}

.glossario-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    position: relative;
}

.glossario-detail-header h2 {
    font-size: 1.6em;
}

.glossario-detail-vd {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
}

.glossario-detail-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
}

.glossario-detail-close:hover {
    background: var(--danger);
    border-color: var(--danger);
}

.glossario-detail-body {
    padding: 25px;
}

.glossario-detail-desc {
    font-size: 1em;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(100, 100, 100, 0.3);
}

.glossario-detail-section {
    margin-bottom: 25px;
}

.glossario-detail-section h4 {
    color: var(--primary);
    font-size: 0.9em;
    letter-spacing: 1px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
}

.glossario-detail-attrs {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.glossario-detail-attr {
    background: rgba(102, 126, 234, 0.15);
    padding: 10px 18px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.glossario-detail-attr span:first-child {
    color: var(--primary);
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 3px;
}

.glossario-detail-attr span:last-child {
    color: #fff;
    font-size: 1.3em;
    font-weight: bold;
}

.glossario-detail-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.glossario-detail-status {
    background: rgba(50, 50, 60, 0.5);
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.glossario-detail-status span:first-child {
    color: #888;
    font-size: 0.85em;
}

.glossario-detail-status span:last-child {
    color: #fff;
    font-weight: bold;
}

.glossario-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.glossario-tag {
    background: rgba(100, 100, 100, 0.3);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    color: #ccc;
}

.glossario-tag-res {
    background: rgba(0, 200, 100, 0.2);
    color: #00ff88;
}

.glossario-tag-vul {
    background: rgba(255, 68, 68, 0.2);
    color: #ff6b6b;
}

.glossario-ability {
    background: rgba(40, 40, 55, 0.6);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary);
    position: relative;
}

.glossario-ability strong {
    color: #fff;
    display: block;
    margin-bottom: 8px;
}

.glossario-ability p {
    margin: 0;
    color: #bbb;
    font-size: 0.9em;
    line-height: 1.5;
}

.glossario-attack {
    background: rgba(40, 40, 55, 0.6);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #ff6b6b;
    position: relative;
}

.glossario-attack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.glossario-attack-header strong {
    color: #fff;
}

.glossario-attack-tipo {
    background: rgba(255, 100, 100, 0.2);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75em;
    color: #ff8888;
}

.glossario-attack-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 8px;
}

.glossario-attack-stats span {
    color: #aaa;
    font-size: 0.9em;
}

.glossario-attack-stats b {
    color: #fff;
}

.glossario-attack-especial {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(100, 100, 100, 0.3);
    color: #999;
    font-size: 0.85em;
    line-height: 1.4;
}

/* Ícone de remoção (X) normal, canto superior direito */
.glossario-delete-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #ff4d4f;
    font-weight: bold;
    opacity: 0.95;
    cursor: pointer;
    z-index: 2;
    transform: none !important;
    transition: transform 0.1s ease, opacity 0.2s ease;
}
.glossario-delete-icon:hover {
    opacity: 1;
    transform: scale(1.1) !important;
}

/* Responsividade Glossário */
@media (max-width: 768px) {
    .glossario-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .glossario-tabs {
        width: 100%;
    }
    
    .glossario-tab {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.75em;
    }
    
    .glossario-tab-icon {
        display: none;
    }
    
    .glossario-search-wrapper {
        max-width: 100%;
        width: 100%;
    }
    
    .glossario-element-filters {
        justify-content: center;
    }
    
    .glossario-element-filter {
        padding: 6px 10px;
        font-size: 0.7em;
    }
    
    .glossario-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .glossario-detail-content {
        max-height: 95vh;
        border-radius: 10px;
    }
    
    .glossario-detail-header h2 {
        font-size: 1.3em;
    }
    
    .glossario-detail-attrs {
        justify-content: center;
    }
}

/* Side Panel */
.side-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 680px;
    max-width: 95vw;
    max-height: 85vh;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: translate(110%, -50%);
    transition: transform 0.3s ease, opacity 0.2s ease;
    opacity: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: none;
}
.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.side-panel-title {
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 1px;
}
.side-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.side-panel-header .btn {
    padding: 6px 10px;
    font-size: 0.9em;
}
.side-panel-close {
    color: #fff;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: saturate(120%) blur(1px);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset;
}
.side-panel-close:hover {
    background: rgba(255,255,255,0.35);
}
.side-panel.open {
    transform: translate(-50%, -50%);
    opacity: 1;
    pointer-events: auto;
}
.side-panel.closed {
    transform: translate(110%, -50%);
    opacity: 0;
    pointer-events: none;
}
/* Largura maior para o painel de PERÍCIAS */
#perSidePanel.side-panel {
    width: 900px;
}
.side-handles {
    position: fixed;
    right: 0;
    top: 40%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 61;
}
.side-handle {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    color: #fff;
    transition: transform .15s ease, filter .15s ease, background .15s ease;
    background: rgba(0,0,0,0.3);
}
.side-handle:hover {
    transform: translateX(-2px);
    filter: brightness(1.05);
}
.handle-notes {
    background: var(--primary);
}
.handle-rit {
    background: var(--primary);
}
.handle-hab {
    background: var(--primary);
}
.handle-per {
    background: var(--primary);
}
.handle-dice {
    background: var(--primary);
}
.handle-dice:hover {
    background: var(--primary-hover);
}
.handle-dice svg {
    color: #fff;
}
#fichaSidePanel .side-panel-header {
    justify-content: flex-end;
}
.side-handle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.side-panel-tabs {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}
.side-panel-footer {
    display: flex;
    justify-content: flex-end;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
}
.side-panel-footer .btn {
    padding: 6px 10px;
    font-size: 0.9em;
}
.side-tab {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    color: #ccc;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}
.side-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.side-panel-body {
    padding: 12px;
    overflow: auto;
    flex: 1;
    min-height: 0;
}
.side-content {
    display: none;
    width: 100%;
}

/* ===== NAVBAR USER AVATAR & DROPDOWN ===== */
.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #555;
    transition: border-color 0.3s;
    object-fit: cover;
    background: rgba(138, 43, 226, 0.1);
}
.nav-avatar:hover {
    border-color: var(--primary);
}
.user-nav-menu { display: inline-block; }

/* ===== IMAGE UPLOAD BUTTON ===== */
.btn-img-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 6px;
    background: rgba(138, 43, 226, 0.15);
    border: 1px solid rgba(138, 43, 226, 0.4);
    color: var(--primary);
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.btn-img-upload:hover {
    background: rgba(138, 43, 226, 0.3);
}

.user-dropdown {
    position: absolute;
    top: 44px;
    right: 0;
    background: #121214;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 6px 0;
    min-width: 160px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.user-dropdown.hidden { display: none; }
.user-dropdown button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #fff;
    text-align: left;
    cursor: pointer;
    font-family: monospace;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}
.user-dropdown button:hover { background: rgba(255,255,255,0.06); }
.user-dropdown .dropdown-logout { color: #ff4d4d; }
.user-dropdown .dropdown-logout:hover { background: rgba(255,77,77,0.1); }

/* ===== PROFILE PAGE ===== */
.perfil-background {
    min-height: 100vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #0e0e10;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    box-sizing: border-box;
}
#viewPerfil {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.perfil-glass-card {
    background: rgba(18, 18, 20, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 2rem;
    width: 100%;
    max-width: 620px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    position: relative;
}
.perfil-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
}
.perfil-back-btn {
    margin: 0;
}
.perfil-edit-gear {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #ccc;
    font-size: 1.3em;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
    line-height: 1;
}
.perfil-edit-gear:hover { background: rgba(138,43,226,0.2); color: #fff; border-color: #8a2be2; }
.perfil-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.25);
    margin-bottom: 1rem;
    background: #222;
}
.perfil-username {
    font-size: 1.4em;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-align: center;
    word-break: break-word;
}
.perfil-like-btn {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.75em;
    vertical-align: middle;
    margin-left: 4px;
    position: relative;
    user-select: none;
    transition: transform 0.15s ease;
}
.perfil-like-btn:active {
    transform: scale(1.3);
}
.perfil-like-icon {
    color: #666;
    transition: color 0.25s ease, opacity 0.25s ease;
    opacity: 1;
    -webkit-text-stroke: 1.5px currentColor;
    font-size: 1.15em;
}
.perfil-like-btn.liked .perfil-like-icon {
    color: #8a2be2;
}
.perfil-like-count {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75em;
    font-weight: 700;
    color: #ccc;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.perfil-like-btn:hover .perfil-like-icon {
    opacity: 0;
}
.perfil-like-btn:hover .perfil-like-count {
    opacity: 1;
}
.perfil-like-btn.liked:hover .perfil-like-count {
    color: #8a2be2;
}
.perfil-bio {
    text-align: center;
    opacity: 0.75;
    font-style: italic;
    margin-bottom: 1rem;
    max-width: 90%;
    word-break: break-word;
}
.estagio-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}
.estagio-standart { background: #444; color: #ccc; }
.estagio-silver { background: linear-gradient(135deg, #e2e8f0, #a1a1aa); color: #1a1a1a; }
.estagio-gold { background: linear-gradient(135deg, #f5d76e, #f0a500); color: #1a1a1a; }

.btn-catarse {
    background: linear-gradient(135deg, #3bb273, #2d8e5c);
    color: #fff;
    padding: 10px 22px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 0.9em;
    transition: filter 0.3s;
    display: inline-block;
}
.btn-catarse:hover { filter: brightness(1.15); }

.perfil-stats {
    width: 100%;
    margin-top: 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 1rem;
}
.perfil-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-family: monospace;
    font-size: 0.9em;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.perfil-stat-item:last-child { border-bottom: none; }
.perfil-stat-clickable { cursor: pointer; transition: background 0.2s; border-radius: 4px; padding: 8px 4px; }
.perfil-stat-clickable:hover { background: rgba(138,43,226,0.1); }
.perfil-stat-list { padding: 0 4px 8px; max-height: 200px; overflow-y: auto; }

.perfil-edit-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 1rem 0;
}
.perfil-edit-form input,
.perfil-edit-form textarea {
    background: rgba(255,255,255,0.06);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px 12px;
    color: #fff;
    font-size: 0.9em;
    outline: none;
    font-family: inherit;
}
.perfil-edit-form input:focus,
.perfil-edit-form textarea:focus {
    border-color: var(--primary);
}
.perfil-edit-form textarea { resize: vertical; min-height: 60px; }
.perfil-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.perfil-edit-actions .btn { flex: 1; }
.side-content.active {
    display: block;
}
.side-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 59;
    pointer-events: none;
}
.side-panel-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.side-panel-backdrop.closed {
    opacity: 0;
    pointer-events: none;
}

/* === MODAL EDITAR CRIATURA DO CAMPO DE BATALHA === */
#modalEditCombatCreature .glossario-detail-content {
    overflow-x: hidden;
    box-sizing: border-box;
}
#modalEditCombatCreature .glossario-detail-content .inp-dark {
    box-sizing: border-box;
}

/* ===== HOMEBREW ===== */
.homebrew-card:hover {
    border-color: #8a2be2 !important;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}
.homebrew-assign-row:hover {
    border-color: #8a2be2 !important;
    background: #22223a !important;
}
#modalEditCombatCreature .glossario-detail-body {
    padding: 12px 20px 16px;
}
#modalEditCombatCreature .glossario-detail-section textarea {
    width: 100%;
    box-sizing: border-box;
}
#modalEditCombatCreature .row[data-row="atributo"] {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}
@media (max-width: 600px) {
    #modalEditCombatCreature .glossario-detail-content {
        max-width: 100vw;
        width: 100vw;
        border-radius: 0;
        max-height: 100vh;
    }
    #modalEditCombatCreature .glossario-detail-header {
        padding: 12px 14px;
    }
    #modalEditCombatCreature .glossario-detail-body {
        padding: 10px 14px 14px;
    }
}

/* === CONDIÇÕES ATIVAS === */
.condicoes-ativas-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 0 2px;
    min-height: 0;
}
.condicoes-ativas-bar:empty {
    display: none;
}
.condicoes-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.condicao-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: opacity 0.15s;
    border: 1px solid;
}
.condicao-badge:hover {
    opacity: 0.8;
}
.condicao-badge.badge-auto {
    background: rgba(255, 77, 79, 0.15);
    color: #ff4d4f;
    border-color: rgba(255, 77, 79, 0.4);
}
.condicao-badge.badge-manual {
    background: rgba(255, 77, 79, 0.15);
    color: #ff4d4f;
    border-color: rgba(255, 77, 79, 0.4);
}
.condicao-badge .badge-x {
    font-size: 0.9em;
    opacity: 0.6;
    margin-left: 2px;
}
.condicao-badge .badge-x:hover {
    opacity: 1;
}
.condicoes-add-btn {
    font-size: 0.72em !important;
    padding: 3px 10px !important;
    border-radius: 12px !important;
    white-space: nowrap;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.condicoes-add-btn:hover {
    opacity: 1;
}

/* Modal Condições */
.condicoes-modal-content {
    background: linear-gradient(135deg, rgba(25, 25, 40, 0.98) 0%, rgba(35, 25, 40, 0.98) 100%);
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: 14px;
    width: 92vw;
    max-width: 420px;
    max-height: 80vh;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(138, 43, 226, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.condicoes-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.condicoes-modal-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #fff;
}
.condicoes-modal-body {
    padding: 10px 14px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.condicoes-modal-footer {
    padding: 10px 14px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}
.condicoes-modal-footer .btn-primary {
    width: 100%;
    padding: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}
.condicao-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s;
}
.condicao-item:hover {
    background: rgba(255,255,255,0.04);
}
.condicao-item input[type="checkbox"] {
    accent-color: #ff4d4f;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}
.condicao-item-info {
    flex: 1;
    min-width: 0;
}
.condicao-item-nome {
    font-size: 0.9em;
    font-weight: 700;
    color: #eee;
}
.condicao-item-tipo {
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
}
.condicao-item-tipo.tipo-medo { background: rgba(138, 43, 226, 0.25); color: #c084fc; }
.condicao-item-tipo.tipo-paralisia { background: rgba(59, 130, 246, 0.25); color: #60a5fa; }
.condicao-item-tipo.tipo-mental { background: rgba(236, 72, 153, 0.25); color: #f472b6; }
.condicao-item-tipo.tipo-sentidos { background: rgba(34, 197, 94, 0.25); color: #4ade80; }
.condicao-item-tipo.tipo-fadiga { background: rgba(245, 158, 11, 0.25); color: #fbbf24; }
.condicao-item-tipo.tipo-carga { background: rgba(255, 77, 79, 0.25); color: #ff6b6b; }
.condicao-item-tipo.tipo-outro { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.condicao-item-resumo {
    font-size: 0.78em;
    color: #888;
    margin-top: 2px;
    line-height: 1.3;
}

/* === ROLADOR DE DADOS PERSONALIZADO === */
.dice-roller-content {
    background: linear-gradient(135deg, rgba(25, 25, 40, 0.98) 0%, rgba(35, 25, 40, 0.98) 100%);
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: 14px;
    width: 92vw;
    max-width: 360px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(138, 43, 226, 0.2);
    overflow: hidden;
}
.dice-roller-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dice-roller-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #fff;
}
.dice-roller-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.dice-roller-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dice-roller-row label {
    font-size: 0.8em;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dice-roller-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dice-type-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: #ccc;
    font-weight: bold;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.15s;
}
.dice-type-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
    color: #fff;
}
.dice-type-btn.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.8);
    color: #fff;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}
.dice-roller-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.dice-rule-option {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: #ccc;
    cursor: pointer;
    user-select: none;
}
.dice-rule-option input[type="radio"] {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.dice-roller-roll-btn {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Rodadas para morrer / enlouquecer */
.rodadas-tracker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.25);
    border-radius: 8px;
    margin: 4px 0;
}
.rodadas-title {
    font-size: 0.8em;
    color: #aaa;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rodadas-circles {
    display: flex;
    gap: 8px;
}
.rodadas-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #555;
    border: 2px solid #777;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.rodadas-circle:hover {
    border-color: #9b59b6;
}
.rodadas-circle.active {
    background: #9b59b6;
    border-color: #c084fc;
}
