/* ==========================================================================
   Configurações Globais e Fontes
   ========================================================================== */
:root {
    --sand-bg: #f4f1ea;       /* Cor de areia para o fundo */
    --dark-text: #4a4a4a;      /* Cor de texto principal, mais suave que preto */
    --primary-gold: #c59d3a;   /* Dourado para detalhes e botões */
    --dark-gold: #ab842c;      /* Dourado mais escuro para hover */
    --light-gray: #e0e0e0;     /* Cinza claro para bordas */
    --white: #ffffff;         /* Branco puro */
    --dark-bg: #2c2c2c;        /* Fundo escuro para o menu/rodapé */
    --font-main: 'Roboto', sans-serif;
    --font-title: 'Teko', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--sand-bg);
    color: var(--dark-text);
    line-height: 1.7;
}

/* ==========================================================================
   Menu de Navegação
   ========================================================================== */
.navbar {
    background-color: var(--dark-bg);
    padding: 15px 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-title);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-gold);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-gold);
}

.login-button {
    background-color: var(--primary-gold);
    color: var(--white) !important; /* Força a cor do texto a ser branca */
    padding: 8px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background-color: var(--dark-gold);
    color: var(--white) !important;
}

/* ==========================================================================
   Estilos do Menu Dropdown do Usuário (Versão PHP)
   ========================================================================== */
.user-dropdown-container {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 120%; 
    right: 0;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    overflow: hidden;
}

.user-dropdown-container:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    color: var(--dark-text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--sand-bg);
}

/* ==========================================================================
   Seção de Compra Principal
   ========================================================================== */
.purchase-section {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.purchase-container {
    width: 100%;
    max-width: 500px;
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--light-gray);
}

.total-display {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 25px;
}

.total-label {
    display: block;
    font-size: 1rem;
    color: #888;
    margin-bottom: 5px;
}

.total-value {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--dark-text);
    line-height: 1;
}

.slider-container {
    margin-bottom: 30px;
}

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

.slider-label {
    font-weight: 500;
}

.slider-value {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-gold);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: var(--light-gray);
    border-radius: 5px;
    outline: none;
    opacity: 0.9;
    transition: opacity .2s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-gold);
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary-gold);
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.slider-markers {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #999;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-main);
}

button[type="submit"], .form-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(145deg, var(--primary-gold), var(--dark-gold));
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(197, 157, 58, 0.3);
}

button[type="submit"]:hover, .form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 157, 58, 0.4);
}

/* Display do PIX */
#pix-display {
    width: 100%;
    max-width: 500px;
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--light-gray);
    text-align: center;
}

#pix-display h2 {
    font-family: var(--font-title);
    font-size: 2rem;
    margin-bottom: 15px;
}

#pix-qrcode {
    max-width: 220px;
    width: 100%;
    margin: 15px auto;
    border: 1px solid var(--light-gray);
    padding: 10px;
    border-radius: 8px;
}

.pix-copy-paste { display: flex; margin-top: 10px; }
#pix-code { flex-grow: 1; border-radius: 5px 0 0 5px; padding: 10px; border: 1px solid var(--light-gray); border-right: none; }
#copy-button { padding: 0 15px; background-color: #eee; border: 1px solid var(--light-gray); border-radius: 0 5px 5px 0; cursor: pointer; }
.pix-warning { margin-top: 20px; font-size: 0.9rem; color: #888; }
.hidden { display: none; }

/* ==========================================================================
   Seção de Informações
   ========================================================================== */
.info-section {
    background-color: #e9e5dc;
    padding: 60px 20px;
    border-top: 1px solid var(--light-gray);
}

.info-container {
    max-width: 800px;
    margin: 0 auto;
}

.info-container h2 {
    font-family: var(--font-title);
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 25px;
    color: var(--dark-text);
}

.info-container h3 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-gold);
    padding-left: 10px;
}

.info-container p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.info-container ul {
    list-style: none;
    padding-left: 0;
}

.info-container ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.info-container ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--primary-gold);
    font-weight: bold;
}

.security-note {
    margin-top: 30px;
    padding: 15px;
    background-color: var(--sand-bg);
    border-left: 4px solid var(--primary-gold);
    border-radius: 0 4px 4px 0;
}

/* ==========================================================================
   Rodapé
   ========================================================================== */
footer {
    background-color: var(--dark-bg);
    color: #aaa;
    text-align: center;
    padding: 25px 20px;
}

/* Spinner de Carregamento */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Estilos da Página de Acesso (acesso.html)
   ========================================================================== */
.access-section {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.form-container {
    width: 100%;
    max-width: 450px;
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--light-gray);
}

.form-container h2 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-text);
}

.toggle-form {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

.toggle-form a {
    color: var(--primary-gold);
    font-weight: bold;
    text-decoration: none;
}

.toggle-form a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Estilos das Mensagens de Feedback (Erro/Sucesso)
   ========================================================================== */
.message {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
}

.message.hidden {
    display: none;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* ==========================================================================
   Estilos da Página Minha Conta e Painel Admin
   ========================================================================== */
.account-section {
    padding: 60px 20px;
}

.account-container, .admin-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--light-gray);
}

.admin-container {
    max-width: 1200px; /* Mais largo para caber mais colunas */
}

.account-container h2, .admin-container h2 {
    font-family: var(--font-title);
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: var(--dark-text);
}

.account-container p, .admin-container p {
    margin-bottom: 30px;
    font-size: 1.05rem;
    color: #666;
}

.history-table-container {
    overflow-x: auto;
}

#history-table, #admin-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

#history-table th, #history-table td,
#admin-history-table th, #admin-history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

#history-table th, #admin-history-table th {
    background-color: #f8f8f8;
    font-weight: 500;
    color: #555;
}

#history-table tbody tr:last-child td,
#admin-history-table tbody tr:last-child td {
    border-bottom: none;
}

.loading-row, .empty-row {
    text-align: center !important;
    color: #888;
    padding: 40px;
    font-style: italic;
}

.status {
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: capitalize;
    color: var(--white);
    text-align: center;
    display: inline-block;
}

.status.pago { background-color: #28a745; }
.status.pendente { background-color: #ffc107; color: #333; }
.status.cancelado { background-color: #dc3545; }
.status.reembolsado { background-color: #6c757d; }

/* ==========================================================================
   Estilos dos Filtros do Painel de Admin
   ========================================================================== */
.filter-container {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-container span {
    font-weight: 500;
    color: #555;
}

.filter-btn {
    padding: 8px 15px;
    border: 1px solid var(--light-gray);
    background-color: var(--white);
    color: var(--dark-text);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.filter-btn.active {
    background-color: var(--primary-gold);
    color: var(--white);
    border-color: var(--primary-gold);
}

/* ==========================================================================
   Estilos dos Botões de Ajuste Rápido
   ========================================================================== */
.quick-adjust-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Cria 6 colunas de tamanho igual */
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 30px; /* Aumenta o espaço antes do campo "Nome do Personagem" */
}

.adjust-btn {
    padding: 10px 5px; /* Padding vertical maior que horizontal */
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark-text);
    background-color: #e9e5dc; /* Cor de areia um pouco mais escura */
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.adjust-btn:hover {
    background-color: var(--primary-gold);
    color: var(--white);
    border-color: var(--dark-gold);
    transform: translateY(-1px);
}

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

/* ==========================================================================
   Estilos do Modal de Pagamento
   ========================================================================== */
.modal-overlay {
    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;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none; /* Impede cliques quando escondido */
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
}

/* Reutilizando estilos do PIX display */
.modal-content h2 { font-family: var(--font-title); font-size: 1.8rem; margin-bottom: 15px; }
.modal-content img { max-width: 200px; margin: 15px auto; border: 1px solid var(--light-gray); padding: 10px; border-radius: 8px; }
.modal-content .pix-copy-label { margin-top: 15px; }
.modal-content .pix-copy-paste { display: flex; margin-top: 10px; }
.modal-content #modal-pix-code { flex-grow: 1; }
.modal-content #modal-copy-button { cursor: pointer; }

.action-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    background-color: var(--primary-gold);
    color: var(--white);
    transition: background-color 0.2s ease;
}

.action-btn:hover {
    background-color: var(--dark-gold);
}

/* ==========================================================================
   Estilos do Gerenciamento de Pedidos (Admin)
   ========================================================================== */
.status-select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #fff;
}

.status-select:disabled {
    background-color: #f8f8f8;
    border-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 10px; /* Ajuste para remover a seta */
}

.comments-section {
    background-color: #fafafa;
    padding: 15px;
    margin-top: 10px;
}

.comment {
    font-size: 0.9rem;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 8px;
    margin-bottom: 8px;
}
.comment:last-child { border-bottom: none; margin-bottom: 0; }
.comment p { margin: 0; }
.comment-meta { font-size: 0.8rem; color: #888; }
.comment-meta strong { color: #555; }

.add-comment-form { display: flex; gap: 10px; margin-top: 15px; }
.add-comment-form input { flex-grow: 1; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
.add-comment-form button { padding: 8px 12px; font-size: 0.9rem; }

/* ==========================================================================
   Estilos dos Botões de Pacote (index.php)
   ========================================================================== */
.quick-adjust-container {
    display: flex;
    justify-content: center; /* Centraliza os botões */
    gap: 10px; /* Espaço entre os botões */
    margin-top: 20px; /* Espaço acima dos botões */
    flex-wrap: wrap; /* Permite que os botões quebrem a linha em telas pequenas */
}

.package-btn {
    background-color: #e9e5dc; /* Tom de areia, como a seção de info */
    color: var(--dark-text);
    border: 1px solid var(--light-gray);
    padding: 8px 16px;
    border-radius: 20px; /* Cantos bem arredondados para o efeito "pílula" */
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease; /* Transição suave para hover */
}

.package-btn:hover {
    background-color: var(--primary-gold); /* Dourado no hover */
    color: var(--white); /* Texto branco no hover */
    border-color: var(--dark-gold);
    transform: translateY(-2px); /* Efeito de levantar o botão */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Estilo para a mensagem de incentivo de login */
.login-incentive {
    margin-top: 25px;
    padding: 15px;
    background-color: #fef8e7; /* Um amarelo/dourado bem claro */
    border: 1px solid #fbebb9;
    border-radius: 8px;
    text-align: center;
}

.login-incentive p {
    margin: 0;
    font-size: 0.9rem;
    color: #856404; /* Um tom de marrom/dourado escuro */
    line-height: 1.5;
}

.login-incentive a {
    color: #856404;
    font-weight: bold;
    text-decoration: underline;
}

/* Estilo para links extras no formulário (Esqueci a senha) */
.form-extra-links {
    text-align: right;
    margin-top: 10px; /* Puxa para mais perto do botão */
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.form-extra-links a {
    color: var(--dark-text);
    text-decoration: none;
}

.form-extra-links a:hover {
    color: var(--primary-gold);
    text-decoration: underline;
}

/* ==========================================================================
   Estilos da Página "Sobre"
   ========================================================================== */

/* Cabeçalho da Página */
.page-header {
    background-color: var(--dark-bg);
    color: var(--white);
    text-align: center;
    padding: 50px 20px;
}

.page-header h1 {
    font-family: var(--font-title);
    font-size: 3.5rem;
    color: var(--primary-gold);
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.2rem;
    color: #ccc;
}

/* Seção de Conteúdo "Sobre" */
.about-section {
    padding: 60px 20px;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-text {
    flex: 2; /* O texto ocupa 2/3 do espaço */
}

.about-image {
    flex: 1; /* A imagem ocupa 1/3 do espaço */
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.about-text h2 {
    font-family: var(--font-title);
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--dark-text);
}

.about-text h3 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-gold);
    padding-left: 10px;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-text ul {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.about-text ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.about-text ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--primary-gold);
    font-weight: bold;
}

/* Botão de Chamada para Ação (Call to Action) */
.cta-button {
    display: inline-block;
    margin-top: 20px;
    background: linear-gradient(145deg, var(--primary-gold), var(--dark-gold));
    color: var(--white);
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 157, 58, 0.4);
}

