/* =============================================== */
/* TEMA MEDIEVAL SOMBRIO PARA RPG - por Programador */
/* =============================================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Roboto:wght@400;500&display=swap');

:root {
    --cor-fundo-geral: #0a0a0a;
    --cor-fundo-container: rgba(15, 15, 15, 0.75);
    --cor-borda-container: #b8860b;
    --cor-texto-principal: #e0e0e0;
    --cor-texto-secundario: #a0a0a0;
    --cor-titulo-dourado: #ffd700;
    --cor-progresso-xp: #daa520;
    --cor-botao-sucesso: #28a745;
    --cor-botao-sucesso-hover: #218838;
    --cor-botao-sair: #6c757d;
    --cor-botao-sair-hover: #5a6268;
    --cor-item-lista: #2a2a2a;
    --cor-item-lista-hover: #3c3c3c;
    --cor-input-fundo: #222;
}

/* ===== TELA DE CARREGAMENTO REMOVIDA ===== */

body {
  font-family: 'Roboto', sans-serif;
  background: url('https://images.unsplash.com/photo-1597893723663-d01c13c6c19b?fit=crop&w=1500&q=80') no-repeat center center fixed;
  background-size: cover;
  background-color: var(--cor-fundo-geral);
  color: var(--cor-texto-principal);
  margin: 0;
  padding: 0; /* Removido padding do body */
  display: flex;
  justify-content: center;
  min-height: 100vh;
  box-sizing: border-box;
}

.main-wrapper {
    width: 100%;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px 80px 10px; /* Padding (80px inferior para navbar) */
    box-sizing: border-box;
    min-height: 100vh;
}

.header {
  width: 100%;
  background-color: var(--cor-fundo-container);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid var(--cor-borda-container);
  backdrop-filter: blur(5px);
  margin: 0 0 15px 0;
  min-height: 65px;
  box-sizing: border-box;
}
.level-info {
  display: flex; justify-content: space-between; width: 90%; max-width: 600px;
  margin-bottom: 8px; font-family: 'Cinzel', serif; font-size: 0.8em; color: var(--cor-texto-secundario);
}
.progress-bar {
  width: 90%; max-width: 600px; height: 15px; background: rgba(0,0,0,0.5);
  border: 1px solid var(--cor-borda-container); border-radius: 10px; overflow: hidden;
}
.progress {
  height: 100%; background-color: var(--cor-progresso-xp); border-radius: 8px;
  transition: width 0.4s ease;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
  background-size: 40px 40px;
}
.header-info-bar {
    width: 90%; max-width: 600px; margin: 5px auto 15px auto; text-align: center; font-size: 0.8em; color: #a0a0a0;
}
.header-info-bar a { color: var(--cor-titulo-dourado); text-decoration: none; }
.header-info-bar a:hover { text-decoration: underline; }

.main-container, .container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1; /* Empurra navbar/banners para baixo */
    padding-bottom: 10px;
}

h1, h2, h3 { font-family: 'Cinzel', serif; color: var(--cor-titulo-dourado); text-shadow: 1px 1px 3px #000; margin: 0 0 10px 0; padding: 0; letter-spacing: 1px; }
h1 { font-size: 1.6em; } h2 { font-size: 1.4em; } h3 { font-size: 1.2em; }
h4 {
    font-family: 'Cinzel', serif;
    color: var(--cor-texto-secundario);
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin: 20px 0 10px 0;
    font-size: 1.1em;
}


a {
    color: var(--cor-titulo-dourado);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.welcome-box {
    background: var(--cor-fundo-container); border: 1px solid var(--cor-borda-container); border-radius: 8px;
    padding: 15px; backdrop-filter: blur(5px); box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.welcome-text { flex-grow: 1; }
.welcome-text h2 { font-size: 1.2em; margin-bottom: 5px; }
.welcome-text p { font-size: 0.8em; color: var(--cor-texto-secundario); margin: 0; }
.welcome-actions { display: flex; gap: 10px; }


/* --- SEÇÃO DE BOTÕES (Completa) --- */
button, .btn {
    padding: 10px 15px; font-family: 'Cinzel', serif; font-weight: bold; border-radius: 5px;
    cursor: pointer; transition: background-color 0.2s ease, transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    color: #fff; text-shadow: 1px 1px 2px #000; text-align: center; text-decoration: none; display: inline-block;
    border: 1px solid rgba(0,0,0,0.4); box-shadow: inset 0px 1px 1px rgba(255,255,255,0.1);
}
button:hover:not(:disabled), .btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.3); }
button:active:not(:disabled), .btn:active { transform: translateY(0); box-shadow: inset 0px 1px 2px rgba(0,0,0,0.3); }
button:disabled, .btn:disabled {
    cursor: not-allowed; background-color: #3a3a3a !important; color: #777 !important; opacity: 1;
    border-color: #222 !important; text-shadow: none; box-shadow: none; transform: none;
}
.btn-success { background-color: var(--cor-botao-sucesso); border-color: #1e7e34; }
.btn-success:hover:not(:disabled) { background-color: var(--cor-botao-sucesso-hover); border-color: #1c7430; }
.btn-logout { background-color: var(--cor-botao-sair); border-color: #545b62; }
.btn-logout:hover:not(:disabled) { background-color: var(--cor-botao-sair-hover); border-color: #4e555b; }
.btn-secondary { background-color: #5a6268; border-color: #4e555b; }
.btn-secondary:hover:not(:disabled) { background-color: #4a4e52; }
.btn-danger { background-color: #dc3545; border-color: #bd2130; }
.btn-danger:hover:not(:disabled) { background-color: #c82333; border-color: #b21f2d; }
.btn-primary { background-color: var(--cor-borda-container); color: #111; text-shadow: none; border-color: #a77c0a; }
.btn-primary:hover:not(:disabled) { background-color: #daa520; border-color: #9c7109; }
/* --- FIM BOTÕES --- */
.stats-bar {
    display: flex; justify-content: space-around; background: var(--cor-fundo-container);
    padding: 12px; border-radius: 8px; font-family: 'Cinzel', serif; font-size: 0.9em;
    font-weight: 500; box-shadow: 0 2px 5px rgba(0,0,0,0.3); text-align: center; gap: 10px;
}
.stats-bar span { white-space: nowrap; }

.action-list {
    background: var(--cor-fundo-container); border-radius: 8px; padding: 15px;
    backdrop-filter: blur(5px); box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.action-list h3 { margin-bottom: 15px; padding-bottom: 5px; border-bottom: 1px solid var(--cor-borda-container); font-size: 1.1em; }
.action-item {
    display: flex; justify-content: space-between; align-items: center; background: var(--cor-item-lista);
    padding: 12px 15px; margin-bottom: 8px; border-radius: 5px; text-decoration: none;
    color: var(--cor-texto-principal); font-size: 0.95em; transition: background-color 0.2s ease, transform 0.2s ease;
}
.action-item:last-child { margin-bottom: 0; }
.action-item:hover { background-color: var(--cor-item-lista-hover); transform: translateX(5px); }
.action-badge {
    background-color: var(--cor-borda-container); color: #000; font-weight: bold;
    padding: 3px 8px; border-radius: 10px; font-size: 0.8em;
}

/* --- ESTILOS DA FADA (Original) --- */
.fairy-container { position: fixed; z-index: 1500; top: 70vh; left: 10px; cursor: pointer; animation: float-around 18s ease-in-out infinite; }
.fairy-body { width: 80px; height: 80px; background-image: url('/images/ui/fairy.png?v=1763872063691'); background-size: contain; background-repeat: no-repeat; animation: pulse-glow 2s ease-in-out infinite; }
.fairy-speech-bubble { position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%); width: 150px; padding: 8px; background: rgba(0, 0, 0, 0.8); color: #fff; border: 1px solid var(--cor-borda-container); border-radius: 8px; font-size: 0.8em; text-align: center; opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.fairy-container:hover .fairy-speech-bubble { opacity: 1; }
@keyframes pulse-glow { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes float-around { 0% { transform: translate(0, 0); } 25% { transform: translate(calc(90vw - 80px), -60vh); } 50% { transform: translate(10vw, -30vh); } 75% { transform: translate(calc(85vw - 80px), -5vh); } 100% { transform: translate(0, 0); } }

/* --- RECOMPENSA DIÁRIA (Original) --- */
.daily-reward-toast { display: none; }

/* --- DEBUG (Original) --- */
#debug-toggle { position: fixed; bottom: 80px; right: 10px; width: 30px; height: 30px; background: #ffc107; color: black; border: 1px solid black; border-radius: 50%; z-index: 9999; font-weight: bold; cursor: pointer; text-align: center; line-height: 30px; font-family: sans-serif; }
#debug-panel { position: fixed; bottom: 80px; left: 10px; background: rgba(0,0,0,0.85); border: 1px solid #ffc107; border-radius: 5px; padding: 10px; font-family: 'Courier New', Courier, monospace; font-size: 10px; color: #00ff00; z-index: 9998; display: none; min-width: 150px; max-height: 40vh; overflow-y: auto; }
#debug-panel h4 { margin: 0 0 5px 0; padding: 0; color: #ffc107; font-family: inherit; font-size: 11px; }
#debug-panel p { margin: 2px 0; padding: 0; word-break: break-all; }

/* Erro/Sucesso */
.error, .erro { color: #dc3545; font-weight: bold; text-align: center; margin-top: 10px; }
.success, .sucesso { color: #28a745; font-weight: bold; text-align: center; margin-top: 10px; }

/* Exibição de Recursos */
.resources { text-align: center; font-size: 0.9em; color: var(--cor-texto-secundario); margin-bottom: 15px; padding: 8px; background: rgba(0,0,0,0.2); border-radius: 4px; }
.resources span { margin: 0 8px; }

/* Loader */
.loader-container, #loader { text-align: center; padding: 30px; font-size: 1.2em; color: var(--cor-texto-secundario); font-family: 'Cinzel', serif; }

/* Forms Genéricos */
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], input[type="datetime-local"], textarea, select {
    width: 100%; padding: 10px; margin-bottom: 10px; box-sizing: border-box; background-color: var(--cor-input-fundo, #222); border: 1px solid #444; color: #fff; border-radius: 5px; font-family: 'Roboto', sans-serif; font-size: 0.9em;
}
input[type="datetime-local"] { color-scheme: dark; }
textarea { resize: vertical; min-height: 80px; }
label { display: block; margin-bottom: 5px; font-family: 'Cinzel', serif; font-size: 0.9em; color: var(--cor-texto-secundario); }

/* Modals */
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: none; justify-content: center; align-items: center; z-index: 2000; backdrop-filter: blur(3px); padding: 15px; box-sizing: border-box; }
.modal-content { background: var(--cor-fundo-geral); border: 2px solid var(--cor-borda-container); border-radius: 8px; padding: 20px; width: 100%; max-width: 400px; box-shadow: 0 5px 25px rgba(0,0,0,0.5); }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #444; padding-bottom: 10px; margin-bottom: 15px; }
.modal-header h3 { color: var(--cor-titulo-dourado); margin: 0; }
.modal-close-btn { background: none; border: none; color: white; font-size: 1.8em; cursor: pointer; line-height: 1; padding: 0 5px; }
.modal-body p { margin: 10px 0; font-size: 0.9em; line-height: 1.6; }
.modal-footer { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-footer button { padding: 8px 15px; font-size: 0.9em; }

/* Broadcast Toast (do realtime.js?v=1763872063691) */
#global-broadcast-toast { position:fixed; top:70px; left:50%; transform:translateX(-50%); padding:10px 20px; background:linear-gradient(90deg, #b8860b, #ffd700); color:#111; border-radius:8px; z-index:9999; box-shadow:0 3px 10px rgba(0,0,0,0.5); text-align:center; max-width:90%; font-size:0.9em; }
#global-broadcast-toast p { margin: 5px 0 0 0; }
.broadcast-close-btn { position:absolute; top:5px; right:10px; cursor:pointer; font-size:20px; line-height:1; font-weight:bold; }

/* ===== ESTILOS NAVBAR (Global) ===== */
#navbar-container {
    width: 100%; position: fixed; bottom: 0; left: 0; right: 0;
    display: flex; justify-content: center; min-height: 60px; z-index: 1000;
    pointer-events: none; /* Container pai não clicável */
}
.navbar { /* Estilo do nav.html carregado */
    pointer-events: auto; /* Navbar interna clicável */
    position: relative; display: inline-flex; background-color: var(--cor-fundo-container);
    border: 2px solid var(--cor-borda-container); border-radius: 25px;
    justify-content: center; align-items: center; padding: 5px 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); gap: 20px; margin-bottom: 10px; z-index: 1;
}
.nav-item {
    display: flex; align-items: center; color: var(--cor-texto-principal);
    text-decoration: none; font-size: 1.5em; padding: 5px;
}
.nav-item:hover { color: var(--cor-titulo-dourado); }
/* ===== FIM NAVBAR ===== */
/* ===== NOVO ESTILO BANNER DE EVENTO (Global) - ALTURA AJUSTADA ===== */
#event-banner-container {
    display: none; /* JS controla a exibição */
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto 10px auto; /* Fica acima da navbar */
    padding: 0;
    min-height: 10px;
    position: relative;
    z-index: 1001;
}
.event-banner-item {
    display: block;
    position: relative;
    height: 55px; /* Altura de 55px */
    background: var(--cor-item-lista);
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    border: 1px solid var(--cor-borda-container); /* Borda dourada */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}
.event-banner-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}
.event-banner-bg { /* Imagem de fundo */
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 1;
}
.event-banner-gradient { /* Gradiente escuro */
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(10,10,10,0.8) 0%, rgba(10,10,10,0.5) 60%, rgba(10,10,10,0.2) 100%);
    z-index: 2;
}
.event-banner-content { /* Conteúdo (ícone, título, tempo) */
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px; 
    height: 100%;
    box-sizing: border-box;
}
.event-icon {
    font-size: 2.0em; 
    flex-shrink: 0;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.7));
}
.event-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    text-shadow: 1px 1px 2px #000;
}
.event-title {
    font-weight: bold;
    font-family: 'Cinzel', serif;
    font-size: 1.0em; 
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-timer {
    font-size: 0.8em; 
    color: var(--cor-titulo-dourado);
    font-weight: bold;
    margin-top: 3px; 
}
/* ===== FIM NOVO ESTILO BANNER ===== */
