/* --- Estilos Globais e Variáveis --- */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --text-color: #3d3d3d;
    --background-color: #f4f6f9;
    --panel-bg: #ffffff;
    --border-radius: 15px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    min-height: 100vh;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* ====================================================== */
/* --- ESTILOS PARA PÁGINAS DE AUTENTICAÇÃO --- */
/* ====================================================== */

body.auth-page {
    background: #fff;
    overflow: hidden;
}

.auth-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.auth-branding {
    flex: 1;
    background: linear-gradient(-45deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.branding-content {
    animation: fadeIn 1s ease-out;
}

.brand-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.branding-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.branding-content p {
    font-size: 1.1rem;
    max-width: 400px;
    line-height: 1.6;
    opacity: 0.8;
}

.auth-form-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

.auth-page .login-container { width: 100%; }
.auth-page .login-panel {
    max-width: 400px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    text-align: left;
}

.auth-page .panel-header h2 { font-size: 2.2rem; color: #333; }
.auth-page .panel-header p { color: #777; }
.auth-page .input-group label { color: #555; }
.auth-page .input-group input { background-color: #f4f6f9; border: 1px solid #e0e0e0; }
.auth-page .panel-footer { text-align: center; margin-top: 20px; }

/* --- BOTÃO DE LOGIN INOVADOR --- */
.btn-login {
    width: 100%; padding: 14px; border: none; border-radius: 8px; color: white; font-size: 1.1rem; font-weight: 600; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease;
    background: linear-gradient(120deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 200%; animation: gradientAurora 4s ease infinite; box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4);
}

@keyframes gradientAurora { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.btn-login::before { content: ''; position: absolute; top: 0; left: -100%; width: 75%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent); transform: skewX(-25deg); transition: left 0.6s ease; }
.btn-login:hover { transform: translateY(-3px); box-shadow: 0 7px 20px rgba(106, 17, 203, 0.5); }
.btn-login:hover::before { left: 125%; }
.btn-login:active { transform: translateY(1px); box-shadow: 0 2px 10px rgba(106, 17, 203, 0.4); }

/* ====================================================== */
/* --- ESTILOS GLOBAIS (INPUTS, NOTIFICAÇÕES) --- */
/* ====================================================== */
.input-group { margin-bottom: 20px; text-align: left; position: relative; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 400; font-size: 0.9rem; color: #444; }
.input-group input, .input-group select { width: 100%; padding: 12px 15px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; font-family: var(--font-family); transition: all 0.3s ease; height: 47px; }
.input-group input:focus, .input-group select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.2); }
.input-group select { background-color: white; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; background-size: 12px; }

.notification { position: fixed; top: 20px; left: 50%; transform: translate(-50%, -150%); padding: 20px 30px; border-radius: 12px; color: white; box-shadow: var(--box-shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-align: center; z-index: 2000; visibility: hidden; transition: transform 0.5s ease-in-out, visibility 0.5s ease-in-out; min-width: 300px; }
.notification.show { transform: translate(-50%, 0); visibility: visible; }
.notification.success { background: rgba(30, 200, 100, 0.85); }
.notification.error { background: rgba(220, 50, 50, 0.85); }
.notification h3 { margin: 0 0 5px 0; font-size: 1.2rem; }
.notification p { margin: 0; font-size: 0.9rem; }

/* ====================================================== */
/* --- ESTILOS DA DASHBOARD "CLEAN & LIGHT" --- */
/* ====================================================== */
.dashboard-container { display: flex; width: 100vw; height: 100vh; background-color: transparent; }
.sidebar { width: 260px; background: var(--panel-bg); border-right: 1px solid #e0e0e0; display: flex; flex-direction: column; padding: 20px; transition: transform 0.4s ease-in-out; }
.sidebar-header { text-align: center; padding-bottom: 20px; border-bottom: 1px solid #eee; margin-bottom: 20px; }
.sidebar-header h3 { font-size: 1.5rem; color: var(--text-color); }
.sidebar-nav { flex-grow: 1; }
.sidebar-nav ul { list-style-type: none; }
.sidebar-nav ul li a { display: flex; align-items: center; padding: 15px 10px; color: #555; text-decoration: none; border-radius: 8px; margin-bottom: 10px; font-weight: 500; transition: all 0.3s ease; }
.sidebar-nav ul li a i { margin-right: 15px; font-size: 1.1rem; width: 20px; text-align: center; color: #888; transition: color 0.3s ease; }
.sidebar-nav ul li a:hover, .sidebar-nav ul li.active a { background-color: #f0f0f0; color: var(--primary-color); }
.sidebar-nav ul li a:hover i, .sidebar-nav ul li.active a i { color: var(--primary-color); }
.btn-logout { display: flex; align-items: center; justify-content: center; width: 100%; padding: 12px; border: none; border-radius: 8px; background: #d9534f; color: white; font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.3s ease; }
.btn-logout:hover { background: #c9302c; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); transform: translateY(-2px); }
.btn-logout i { margin-right: 10px; }
.main-content { flex-grow: 1; padding: 30px; overflow-y: auto; position: relative; }
.main-header { margin-bottom: 40px; padding: 25px 30px; border-radius: var(--border-radius); background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); box-shadow: 0 10px 20px rgba(106, 17, 203, 0.2); animation: slideDownFadeIn 0.8s ease-out; }
.main-header h1 { font-size: 2.2rem; color: white; }
.main-header p { color: rgba(255, 255, 255, 0.8); font-size: 1.1rem; }
@keyframes slideDownFadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.content { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.card, .premiacao-card, .item-finder-card, .organizer-card, .danger-zone-card { background: var(--panel-bg); padding: 30px; border-radius: var(--border-radius); box-shadow: var(--box-shadow); border: 1px solid #f0f0f0; }
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px 0 rgba(31, 38, 135, 0.1); }
.card h4 { margin-bottom: 15px; font-size: 1.3rem; color: var(--text-color); }
.content-section { display: none; opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.content-section.active { display: block; opacity: 1; transform: translateY(0); }
.hamburger-btn { display: none; background: #fff; border: 1px solid #eee; border-radius: 8px; width: 40px; height: 40px; font-size: 1.2rem; color: var(--text-color); cursor: pointer; position: absolute; top: 25px; left: 20px; z-index: 1100; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* --- Estilos dos Painéis da Dashboard --- */
.premiacao-card, .item-finder-card { max-width: 700px; margin: 0 auto; }
.organizer-card { max-width: 1100px; margin: 0 auto; }
.danger-zone-card { max-width: 900px; margin: 0 auto; }

.premiacao-row { display: flex; gap: 20px; }
.premiacao-row .input-group { flex: 1; }
.message { padding: 15px; margin-top: 20px; border-radius: 8px; font-weight: 500; text-align: center; border: 1px solid transparent; }
.message.success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.message.error { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.vip-status-display, .coin-status-display { display: flex; align-items: center; gap: 15px; background-color: #f0f0f0; padding: 12px 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #e0e0e0; animation: fadeIn 0.5s ease; }
.status-label { font-size: 0.9rem; color: #555; font-weight: 500; }
.status-value { font-size: 1rem; font-weight: 700; color: var(--primary-color); }
.coin-status-display { justify-content: space-around; }
.coin-item { display: flex; align-items: center; gap: 8px; }
.coin-item i { font-size: 1.2rem; }
.coin-item span { font-size: 1rem; font-weight: 700; color: var(--text-color); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.finder-inputs { display: flex; align-items: flex-end; gap: 15px; margin-bottom: 25px; }
.finder-operator { font-size: 1.5rem; font-weight: 600; color: #555; padding-bottom: 12px; }
#itemResultContainer { margin-top: 25px; }
.item-result-card { display: flex; align-items: center; background: #f7f7f7; border-radius: 10px; padding: 15px; border: 1px solid #e0e0e0; animation: fadeIn 0.5s ease; }
.item-result-card.error { background-color: #f8d7da; border-color: #f5c6cb; }
.item-result-info { display: flex; flex-direction: column; }
.item-result-info.no-image { margin-left: 0; text-align: center; width: 100%; }
.item-result-name { font-size: 1.3rem; font-weight: 600; color: var(--text-color); }
.item-result-id { font-size: 1rem; color: #555; }
.item-result-card.error .item-result-id { color: #721c24; }

/* --- Estilos dos Botões da Dashboard --- */
.btn-vip, .btn-premiar, .btn-finder, .btn-danger, .btn-organize { width: 100%; padding: 14px; border: none; border-radius: 8px; color: white; font-size: 1.1rem; font-weight: 600; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; margin-top: 10px; }
.btn-vip::before, .btn-premiar::before, .btn-finder::before, .btn-danger::before, .btn-organize::before { content: ''; position: absolute; top: 0; left: -100%; width: 75%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent); transform: skewX(-25deg); transition: left 0.6s ease; }
.btn-vip:hover, .btn-premiar:hover, .btn-finder:hover, .btn-danger:hover, .btn-organize:hover { transform: translateY(-3px); }
.btn-vip:hover::before, .btn-premiar:hover::before, .btn-finder:hover::before, .btn-danger:hover::before, .btn-organize:hover::before { left: 125%; }
.btn-vip:active, .btn-premiar:active, .btn-finder:active, .btn-danger:active, .btn-organize:active { transform: translateY(1px); }

.btn-vip { background: linear-gradient(120deg, #f09819, #ff512f, #f09819); background-size: 200% 200%; animation: gradientAurora 4s ease infinite; box-shadow: 0 4px 15px rgba(240, 152, 25, 0.4); }
.btn-vip:hover { box-shadow: 0 7px 20px rgba(240, 152, 25, 0.5); }
.btn-vip:active { box-shadow: 0 2px 10px rgba(240, 152, 25, 0.4); }
.btn-premiar { background: linear-gradient(120deg, #1d976c, #93f9b9, #1d976c); background-size: 200% 200%; animation: gradientAurora 4s ease infinite; box-shadow: 0 4px 15px rgba(29, 151, 108, 0.4); }
.btn-premiar:hover { box-shadow: 0 7px 20px rgba(29, 151, 108, 0.5); }
.btn-premiar:active { box-shadow: 0 2px 10px rgba(29, 151, 108, 0.4); }
.btn-finder { background: linear-gradient(120deg, var(--primary-color), var(--secondary-color), var(--primary-color)); background-size: 200% 200%; animation: gradientAurora 4s ease infinite; box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4); }
.btn-finder:hover { box-shadow: 0 7px 20px rgba(106, 17, 203, 0.5); }
.btn-finder:active { box-shadow: 0 2px 10px rgba(106, 17, 203, 0.4); }
.btn-danger { background: linear-gradient(120deg, #d32f2f, #e57373, #d32f2f); background-size: 200% 200%; animation: gradientAurora 4s ease infinite; box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4); }
.btn-danger:hover { box-shadow: 0 7px 20px rgba(211, 47, 47, 0.5); }
.btn-danger:active { box-shadow: 0 2px 10px rgba(211, 47, 47, 0.4); }
.btn-organize { background: linear-gradient(120deg, #007bff, #00c6ff, #007bff); background-size: 200% 200%; animation: gradientAurora 4s ease infinite; box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4); }
.btn-organize:hover { box-shadow: 0 7px 20px rgba(0, 123, 255, 0.5); }
.btn-organize:active { box-shadow: 0 2px 10px rgba(0, 123, 255, 0.4); }
.btn-vip:disabled, .btn-premiar:disabled, .btn-finder:disabled, .btn-danger:disabled, .btn-organize:disabled { background: #bdc3c7; cursor: not-allowed; transform: translateY(0); box-shadow: none; animation: none; }
.btn-vip:disabled:before, .btn-premiar:disabled:before, .btn-finder:disabled:before, .btn-danger:disabled:before, .btn-organize:disabled:before { display: none; }

/* --- Estilos do Modal de Confirmação --- */
.modal-overlay { z-index: 1500; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.modal-overlay.visible { opacity: 1; visibility: visible; }
.modal-content { background: var(--panel-bg); padding: 30px 40px; border-radius: 20px; width: 90%; max-width: 500px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); position: relative; transform: scale(0.9); transition: transform 0.4s ease; }
.modal-overlay.visible .modal-content { transform: scale(1); }
.confirmation-modal { max-width: 450px; text-align: center; }
.warning-icon { font-size: 3rem; color: #f0ad4e; margin-bottom: 15px; }
.confirmation-modal .modal-header h2 { font-size: 1.5rem; }
.confirmation-modal .modal-body p { font-size: 1rem; color: #333; line-height: 1.6; margin-bottom: 25px; }
.confirmation-buttons { display: flex; justify-content: center; gap: 15px; }
.confirmation-buttons button { border: none; border-radius: 8px; padding: 12px 25px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; min-width: 120px; }
.btn-confirm { background-color: #d9534f; color: white; }
.btn-confirm:hover { background-color: #c9302c; box-shadow: 0 4px 15px rgba(217, 83, 79, 0.4); transform: translateY(-2px); }
.btn-cancel { background-color: #aaa; color: white; }
.btn-cancel:hover { background-color: #888; transform: translateY(-2px); }

/* --- Estilos para o Select2 --- */
.select2-container { width: 100% !important; box-sizing: border-box; }
.select2-container--default .select2-selection--single { box-sizing: border-box; display: flex !important; align-items: center !important; background-color: #fff; border: 1px solid #ccc; border-radius: 8px; height: 47px !important; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: #444; padding-left: 15px !important; padding-right: 30px !important; }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: #999; }
.select2-container--default.select2-container--focus .select2-selection--single { border-color: var(--primary-color) !important; box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.2) !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 45px; right: 5px; top: 0; display: flex; align-items: center; }
.select2-dropdown { box-sizing: border-box; background-color: white; border: 1px solid #ccc; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.select2-search--dropdown .select2-search__field { border-radius: 6px; border: 1px solid #aaa; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: var(--primary-color); }

/* --- Estilos da Seção Limpar Tabelas --- */
.table-list-container { min-height: 100px; }
.table-list {
    display: grid;
    /* Usa auto-fit para criar colunas responsivas, mas com um tamanho mínimo menor */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 20px; /* Espaçamento vertical e horizontal */
    background-color: #f7f7f7;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    max-height: 400px;
    overflow-y: auto;
}
.custom-checkbox { 
    position: relative; 
    display: flex; /* Alinha a caixa e o texto */
    align-items: center; /* Centraliza verticalmente */
}
.custom-checkbox input[type="checkbox"] { 
    display: none; 
}
.custom-checkbox label { 
    cursor: pointer; 
    padding-left: 30px; /* Espaço para a caixa customizada */
    font-weight: 500; 
    color: #444; 
    display: inline-block;
    line-height: 22px; /* Altura da linha igual à altura da caixa */
    top: 2px; /* ✅ CORREÇÃO AQUI: Empurra o texto 1px para baixo */
}
/* A caixa do checkbox */
.custom-checkbox label:before { 
    content: ''; 
    position: absolute; 
    left: 0; 
    top: 50%; /* Centraliza verticalmente */
    transform: translateY(-50%);
    width: 22px; 
    height: 22px; 
    border: 2px solid #ccc; 
    background: #fff; 
    border-radius: 5px; 
    transition: all 0.2s; 
}
.custom-checkbox label:hover:before { 
    border-color: var(--primary-color); 
}
/* A caixa quando marcada */
.custom-checkbox input[type="checkbox"]:checked + label:before { 
    background: var(--primary-color); 
    border-color: var(--primary-color); 
}
/* O ícone de "check" */
.custom-checkbox input[type="checkbox"]:checked + label:after { 
    content: '\f00c'; 
    font-family: 'Font Awesome 6 Free'; 
    font-weight: 900; 
    position: absolute; 
    left: 5px; 
    top: 50%;
    transform: translateY(-50%);
    color: white; 
    font-size: 12px; 
}
/* Estilo para a tabela perigosa e tooltip */
.custom-checkbox.danger-table label { color: #c9302c; font-weight: 700; font-size: 14px; }
.custom-checkbox.danger-table:hover::after { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background-color: #333; color: white; padding: 8px 12px; border-radius: 6px; font-size: 0.85rem; white-space: nowrap; z-index: 10; opacity: 1; transition: opacity 0.3s; margin-bottom: 5px; }


/* --- Estilos do Organizador de Arquivos --- */
.upload-area { border: 2px dashed #ccc; border-radius: 10px; padding: 30px; text-align: center; cursor: pointer; transition: all 0.3s ease; position: relative; }
.upload-area:hover, .upload-area.active { border-color: var(--primary-color); background-color: #f9f9f9; }
.upload-area input[type="file"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-area-content i { font-size: 3rem; color: var(--primary-color); margin-bottom: 15px; }
.upload-area-content p { color: #555; font-weight: 500; }
.upload-area-content #fileName { display: block; margin-top: 10px; font-weight: 600; color: #1d976c; }
.organizer-result-container { margin-top: 25px; animation: fadeIn 0.5s ease; }
#organizedText { width: 100%; height: 400px; padding: 15px; border: 1px solid #e0e0e0; border-radius: 8px; background-color: #f9f9f9; font-family: 'Consolas', 'Courier New', monospace; font-size: 0.9rem; resize: vertical; margin-bottom: 15px; }
.btn-copy { display: block; margin-left: auto; padding: 10px 20px; border: none; border-radius: 8px; background-color: #007bff; color: white; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
.btn-copy:hover { background-color: #0056b3; transform: scale(1.05); }

/* --- ✅ NOVA SEÇÃO: BARRA DE ROLAGEM PERSONALIZADA --- */
/* Funciona em navegadores baseados em WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
/* O trilho da barra */
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
/* O "polegar" (a parte que se move) */
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
/* Efeito ao passar o mouse sobre o polegar */
::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* --- Estilos do Botão de Backup --- */
.btn-backup {
    width: 100%; padding: 14px; border: none; border-radius: 8px; color: white; font-size: 1.1rem; font-weight: 600; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; margin-top: 10px;
    background: linear-gradient(120deg, #343a40, #6c757d, #343a40); /* Gradiente cinza/preto profissional */
    background-size: 200% 200%;
    animation: gradientAurora 4s ease infinite;
    box-shadow: 0 4px 15px rgba(52, 58, 64, 0.4);
}
.btn-backup:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(52, 58, 64, 0.5);
}
.btn-backup:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(52, 58, 64, 0.4);
}
.btn-backup::before { content: ''; position: absolute; top: 0; left: -100%; width: 75%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transform: skewX(-25deg); transition: left 0.6s ease; }
.btn-backup:hover::before { left: 125%; }
.btn-backup:disabled { background: #bdc3c7; cursor: not-allowed; transform: translateY(0); box-shadow: none; animation: none; }

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
    .auth-container { flex-direction: column; }
    .auth-branding { display: none; }
    .auth-form-container { flex: 1; align-items: flex-start; padding-top: 50px; }
    
    .sidebar { position: fixed; left: 0; top: 0; height: 100%; z-index: 1200; transform: translateX(-100%); }
    .sidebar.visible { transform: translateX(0); }
    .hamburger-btn { display: block; }
    .main-content { padding: 20px; padding-top: 90px; }
    .main-header { padding: 20px; }
    .main-header h1 { font-size: 1.6rem; text-align: center; }
    .main-header p { font-size: 1rem; text-align: center; }
    .content { grid-template-columns: 1fr; gap: 20px; }
    .premiacao-row { flex-direction: column; gap: 0; }
    .finder-inputs { flex-direction: column; align-items: stretch; }
    .finder-operator { text-align: center; padding-bottom: 0; }
    .table-list { grid-template-columns: 1fr; }
}

/* ====================================================== */
/* --- NOVA SEÇÃO: ESTILOS PARA EDITAR PERSONAGEM --- */
/* ====================================================== */

.character-list {
    display: grid;
    /* ESTA LINHA É A MAIS IMPORTANTE: */
    /* Ela cria colunas responsivas, com no mínimo 150px de largura cada. */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 30px;
}

.character-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.07);
    border-color: var(--primary-color);
}

.character-card.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.3);
}

.character-card i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.character-card.selected i {
    color: white;
}

.character-card span {
    font-weight: 600;
}

.no-char-message {
    grid-column: 1 / -1; /* Ocupa todas as colunas */
    text-align: center;
    color: #777;
    padding: 20px;
}

.status-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.status-message.online {
    background-color: #f8d7da; /* Vermelho claro */
    color: #721c24;
    border-color: #f5c6cb;
}
.status-message.online i { color: #d9534f; margin-right: 8px; }

.status-message.offline {
    background-color: #d4edda; /* Verde claro */
    color: #155724;
    border-color: #c3e6cb;
}
.status-message.offline i { color: #28a745; margin-right: 8px; }

.status-message.error {
     background-color: #fff3cd; /* Amarelo claro */
    color: #856404;
    border-color: #ffeeba;
}
.status-message.error i { color: #ffc107; margin-right: 8px; }


.character-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.btn-save-char {
    width: 100%; padding: 14px; border: none; border-radius: 8px; color: white; font-size: 1.1rem; font-weight: 600; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; margin-top: 10px;
    background: linear-gradient(120deg, #007bff, #00c6ff, #007bff);
    background-size: 200% 200%;
    animation: gradientAurora 4s ease infinite;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}
.btn-save-char:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 123, 255, 0.5);
}
.btn-save-char:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.4);
}
.btn-save-char::before { content: ''; position: absolute; top: 0; left: -100%; width: 75%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transform: skewX(-25deg); transition: left 0.6s ease; }
.btn-save-char:hover::before { left: 125%; }
.btn-save-char:disabled { background: #bdc3c7; cursor: not-allowed; transform: translateY(0); box-shadow: none; animation: none; }

/* Estilo para a área de texto do inventário */
.inventory-textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f4f6f9;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    resize: vertical;
    line-height: 1.4;
    word-break: break-all;
}

/* Estilo para a área de texto do inventário */
.inventory-textarea {
    width: 100%; height: 150px; padding: 10px; border: 1px solid #ccc;
    border-radius: 8px; background-color: #f4f6f9; font-family: 'Courier New', monospace;
    font-size: 0.85rem; resize: vertical; line-height: 1.4; word-break: break-all;
}

/* --- ESTILOS DO INVENTÁRIO VISUAL --- */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 320px; /* 8 colunas * 40px */
    height: 320px; /* 8 linhas * 40px */
    background-color: rgba(0,0,0,0.2);
    border: 2px solid #555;
    border-radius: 4px;
    margin-top: 15px;
    position: relative;
}
.inventory-item {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid #777;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated; /* Mantém a pixel art dos itens */
}
.item-tooltip {
    display: none;
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #111;
    color: white;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #f09819;
    z-index: 100;
    white-space: nowrap;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.inventory-item:hover .item-tooltip {
    display: block;
}
.item-tooltip .item-name {
    color: #f09819;
    font-weight: bold;
}
.item-tooltip .item-options {
    color: #2575fc;
}

/* --- ESTILOS DO PAINEL DE EQUIPAMENTOS --- */
.equipment-panel {
    width: 258px;  /* Largura exata da imagem */
    height: 270px; /* Altura exata da imagem */
    background-image: url('equipment.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    margin: 15px auto;
    position: relative; /* Essencial para o posicionamento dos slots */
    border: 1px solid #444;
    border-radius: 4px;
}
.equipment-slot {
    position: absolute; /* Posicionamento exato de cada slot */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}
#equip-slot-0 { top: 7px;   left: 7px;   width: 72px; height: 60px; } /* Pet */
#equip-slot-1 { top: 7px;   left: 93px;  width: 72px; height: 60px; } /* Elmo */
#equip-slot-2 { top: 7px;   left: 179px; width: 72px; height: 60px; } /* Asa */
/* Linha 2 */
#equip-slot-3 { top: 75px;  left: 7px;   width: 72px; height: 60px; } /* Arma Esquerda */
#equip-slot-4 { top: 75px;  left: 93px;  width: 32px; height: 32px; } /* Pendente */
#equip-slot-5 { top: 75px;  left: 179px; width: 72px; height: 60px; } /* Arma Direita */
/* Linha 3 */
#equip-slot-6 { top: 139px; left: 7px;   width: 72px; height: 60px; } /* Luvas */
#equip-slot-7 { top: 115px; left: 93px;  width: 72px; height: 85px; } /* Armadura */
#equip-slot-8 { top: 139px; left: 179px; width: 32px; height: 32px; } /* Anel Esquerdo */
/* Linha 4 */
#equip-slot-9 { top: 204px; left: 93px;  width: 72px; height: 60px; } /* Calças */
#equip-slot-10{ top: 175px; left: 179px; width: 32px; height: 32px; } /* Anel Direito */
#equip-slot-11{ top: 204px; left: 179px; width: 72px; height: 60px; } /* Botas */
.equipment-slot .inventory-item {
    width: 100%;
    height: 100%;
}

.item-tooltip .item-options.excellent {
    color: #82f282; /* Verde para opções excellent */
}

.item-tooltip .item-addopt {
    color: #d982ff; /* Roxo para opções de Jewel of Life */
}
.item-tooltip .item-set-name, .item-tooltip .item-set-opt {
    color: #00ff00; /* Verde para opções de Set/Ancient */
}