:root {
    /* Cores Base */
    --bg: #15100c;
    --card-bg: #140f0c;
    --sheet-bg: #20160f;
    
    /* Textos */
    --text-main: #f7f1e8;
    --text-muted: #bfa48f;
    
    /* Dourados e Acentos */
    --gold: #d4af37;
    --gold-dim: #be9e67;
    --gold-glow: rgba(212, 175, 55, 0.6);
    --line-color: #6b5646;
    
    /* Glassmorphism (Novo Design) */
    --glass-bg: rgba(30, 23, 18, 0.75);
    --glass-border: rgba(212, 175, 55, 0.3);
}

* { box-sizing: border-box; }

html, body {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font: 16px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu;
    background: var(--bg);
    color: var(--text-main);
    margin: 0;
}

/* ================================================================= 
   ESTRUTURA PRINCIPAL (LAYOUT)
   ================================================================= */
.app-wrap {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    padding-bottom: 40px;
    
    /* NOVO: Respiro lateral para mobile */
    padding-left: 10px;
    padding-right: 10px;
}

/* Layout Desktop (Centralizado com sombra) */
@media (min-width: 900px) {
    body {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 32px;
    }
    .app-wrap {
        width: 435px;
        background: var(--bg);
        border-radius: 28px;
        border: 12px solid #0d0a08;
        box-shadow: 0 30px 120px rgba(0, 0, 0, .55), 0 4px 16px rgba(0, 0, 0, .35) inset;
        padding: 18px;
        padding-top: 0;
    }
    .card_results, .copy {
        margin-left: 8px;
        margin-right: 8px;
    }
    .app-hero-section {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
    }
}


    .menu-trigger-btn {
        position: absolute;
        top: 20px;
        left: 20px;
        z-index: 1100; /* Garante que fique acima de quase tudo */
        
        /* Tamanho aumentado para toque */
        width: 40px;
        height: 40px;
        border-radius: 7px;
        
        /* CORES - DESTAQUE TOTAL */
        background-color: #d4af37; /* Dourado Sólido */
        background-image: linear-gradient(135deg, #d4af37 0%, #bfa48f 100%);
        border: 2px solid rgba(255, 255, 255, 0.8);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        
        padding: 0;
        cursor: pointer;
        
        /* Centralização */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        margin-right: 15px;
        
        background-image: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(191, 158, 49, 0.9));
backdrop-filter: blur(4px);
    }

.sidebar-category-title {
    color: #ffba00;
    font-weight: bold;
    font-size: 12px;
    margin-top: 10px
}
    
    /* Rótulo "VEJA MAIS" acima do menu */
.menu-trigger-btn::before {
    content: "MENU";
    position: absolute;
    top: -14px; /* Posição acima do botão */
    left: 50%;
    transform: translateX(-50%);
    
    font-size: 10px; /* Fonte pequena e discreta */
    font-weight: 700; /* Negrito para leitura */
    color: #000; /* Preto (conforme sua imagem) */
    /* Se o fundo da imagem for escuro, talvez precise de um contorno branco ou cor #fff */
    /* text-shadow: 0 0 2px #fff; (Opcional se precisar de contraste) */
    
    white-space: nowrap;
    letter-spacing: 0.5px;
    pointer-events: none; /* Garante que o clique vá para o botão */
    opacity: 0.8;
}

/* Opcional: Se quiser que o texto suma quando o menu abrir */
body.menu-open .menu-trigger-btn::before {
    display: none;
}

    /* Linhas do Menu (Escuras para contraste no Ouro) */
    .menu-trigger-btn span {
        display: block;
        width: 24px;
        height: 3px;
        background-color: #15100c; /* Cor escura do tema */
        border-radius: 4px;
        transition: all 0.3s ease;
    }

    /* Hover */
    .menu-trigger-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.8); /* Glow Amarelo */
        border-color: #fff;
    }

    /* ESCONDE o botão externo quando o menu está aberto */
    body.menu-open .menu-trigger-btn {
        opacity: 0;
        pointer-events: none;
        transform: scale(0.8);
    }

    /* --- BACKDROP ESCURO (Fundo ao abrir) --- */
    .menu-backdrop-overlay {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.8); /* Um pouco mais escuro */
        backdrop-filter: blur(4px);
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s;
    }
    body.menu-open .menu-backdrop-overlay {
        opacity: 1; visibility: visible;
    }

    /* --- PAINEL LATERAL --- */
    .app-sidebar {
        position: fixed;
        top: 0; left: 0;
        width: 280px;
        height: 100%;
        background: #15100c;
        border-right: 1px solid #333;
        z-index: 1060; /* Acima de tudo */
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    body.menu-open .app-sidebar {
        transform: translateX(0);
    }

    /* --- CABEÇALHO DO MENU INTERNO --- */
    .sidebar-header {
        padding: 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.02);
    }
    
    .sidebar-header h3 {
        margin: 0;
        font-size: 0.9rem;
        color: #d4af37; /* Gold */
        text-transform: uppercase;
        letter-spacing: 2px;
        font-weight: 800;
    }

    /* Botão de Fechar INTERNO (O "X") */
    .sidebar-close-btn {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.1); /* Adicionei borda leve */
        border-radius: 50%;
        width: 32px; height: 32px;
        color: #ccc;
        cursor: pointer;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.2s;
    }
    .sidebar-close-btn svg { width: 20px; height: 20px; fill: currentColor; }
    .sidebar-close-btn:hover { 
        color: #d4af37; 
        border-color: #d4af37;
        transform: rotate(90deg); 
        background: rgba(212, 175, 55, 0.1);
    }

    /* --- NAVEGAÇÃO --- */
    .sidebar-nav {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 8px; /* Espaço um pouco maior */
        overflow-y: auto;
    }

    .nav-link {
        display: flex;
        align-items: center;
        padding: 9px 5px;
        color: #ccc;
        text-decoration: none;
        font-weight: 500;
        border-radius: 12px;
        transition: all 0.2s;
        border: 1px solid transparent;
        font-size: 0.95rem;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #fff;
        padding-left: 20px;
        border-color: rgba(255,255,255,0.1);
    }

    .nav-link.active {
        background: rgba(212, 175, 55, 0.15);
        color: #d4af37;
        border-color: rgba(212, 175, 55, 0.4);
        font-weight: 700;
    }

    .nav-icon { margin-right: 15px; width: 22px; height: 22px; fill: currentColor; }

    .sidebar-footer {
        margin-top: auto;
        padding: 20px;
        text-align: center;
        font-size: 0.75rem;
        color: #666;
        border-top: 1px solid rgba(255,255,255,0.05);
    }


/* Loader Global */
#global-loader {
    position: fixed; inset: 0; background: var(--bg);
    z-index: 99999; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #fff;
}
#global-loader .spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Reportar Erro (Botão Flutuante) */
#reportar-container {
    position: fixed; bottom: 20px; right: 20px;
    text-align: center; z-index: 9999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
#reportar-container.show { opacity: 1; pointer-events: auto; }

#btn-reportar-erro {
    background-color: #735019;
    color: white; border: none; border-radius: 50%;
    width: 50px; height: 50px; font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    cursor: pointer; transition: transform 0.2s;
}
#btn-reportar-erro:hover { transform: scale(1.1); }
#reportar-texto {
    font-size: 10px; margin-top: 4px;
    color: var(--gold-dim);
    text-shadow: 0 1px 2px #000;
}
.img-icon-erro { width: 24px; height: 24px; }

/* Modal Reportar */
.modal-reportar {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-reportar.active { opacity: 1; pointer-events: auto; }

.modal-content {
    background: #1f1b17; color: #fff;
    border-radius: 12px; padding: 20px;
    width: 90%; max-width: 400px;
    border: 1px solid #444;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.modal-content h3 {
    margin-top: 0; color: var(--gold); text-align: center;
    text-transform: uppercase; font-size: 14px; letter-spacing: 1px;
}
.modal-content textarea, .modal-content input {
    width: 100%; background: #15100c; color: #fff;
    border: 1px solid #444; border-radius: 6px;
    padding: 10px; margin: 10px 0 15px; font-family: inherit;
}
.modal-buttons { display: flex; gap: 10px; }
.modal-buttons button {
    flex: 1; padding: 10px; border: none; border-radius: 6px;
    font-weight: 600; cursor: pointer;
}
#erro-enviar { background: var(--gold); color: #15100c; }
#erro-cancelar { background: #333; color: #ccc; }

/* ================================================================= 
   RODAPÉ (COPYRIGHT & REDES SOCIAIS)
   ================================================================= */
.copy {
    width: 100%;
    font-size: 11px;
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    padding-bottom: 30px;
    border-top: 1px solid rgba(107, 86, 70, 0.3);
    padding-top: 20px;
}

.link-copy { color: #ccc; text-decoration: none; transition: color 0.2s; }
.link-copy:hover { color: var(--gold); }

/* Botões de App (Store) */
.buttons_app {
    display: flex; justify-content: center; gap: 12px;
    margin-top: 5px; margin-bottom: 15px;
}
.buttons_app img {
    height: 38px; width: auto;
    transition: transform 0.2s; cursor: pointer;
}
.buttons_app img:hover { transform: scale(1.05); }

/* Ícones Redes Sociais */
.copy-social {
    width: 100%; margin-top: 15px;
    display: flex; justify-content: center; gap: 15px;
}
.item-social {
    width: 28px; height: 28px;
    transition: transform 0.2s; opacity: 0.8;
}
.item-social:hover { transform: scale(1.15); opacity: 1; }


/* ================================================================= 
   ESTILOS DO GAME.PHP (Preservados aqui)
   ================================================================= */
.phone-frame {
    background-color: var(--bg);
    width: 100%; max-width: 420px; 
    height: auto; min-height: 80vh; 
    border-radius: 32px;
    box-shadow: 0 0 0 10px #1a1614, 0 30px 60px rgba(0,0,0,0.8);
    overflow: hidden; position: relative; display: flex; flex-direction: column;
    border: 1px solid #333;
}
.game-stage {
    width: 100%; aspect-ratio: 1 / 1; flex: none; position: relative;
    border-bottom: 2px solid var(--gold);
    background: radial-gradient(circle at center bottom, #3d3228 0%, var(--bg) 70%);
    z-index: 1;
}
.image-container { width: 100%; height: 100%; position: relative; }
.horse-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: contain; object-position: center center;
    transition: opacity 0.6s ease-in-out;
}
.badge-container {
    position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%);
    z-index: 10; display: flex; align-items: center; gap: 10px;
    width: max-content; max-width: 98%;
}
.result-badge {
    background-color: var(--gold); color: #15100c;
    padding: 8px 20px; border-radius: 99px;
    font-size: 1.1rem; font-weight: 800; text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5); border: 2px solid #fff;
    text-align: center; min-width: 120px;
}
.controls-wrapper {
    flex: 1; width: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start;
    padding: 40px 20px 20px 20px; background-color: var(--bg);
}
.slots-container { display: flex; gap: 10px; justify-content: space-between; width: 100%; margin-bottom: 30px; padding: 0 5px; }
.slot-wrapper { display: flex; flex-direction: column; align-items: center; width: 23%; }
.gene-slot {
    width: 100%; aspect-ratio: 1 / 1; 
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(223, 172, 111, 0.3); 
    border-radius: 16px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    cursor: pointer; transition: all 0.2s ease; padding: 4px;
}
.gene-slot.filled { 
    border-color: var(--gold); 
    background: rgba(30, 23, 18, 0.9); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.slot-val { font-size: 2rem; font-weight: 400; color: #fff; line-height: 1; margin-bottom: 4px; }
.slot-desc { font-size: 0.55rem; color: #ccc; text-transform: uppercase; font-weight: 600; }
.actions-row { display: flex; gap: 10px; width: 100%; margin-top: 10px; margin-bottom: 30px; }
.btn-action {
    flex: 1; background: transparent; color: var(--text-muted);
    border: 1px solid #444; padding: 12px; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s;
}
.btn-primary { border-color: var(--gold); color: var(--gold); background: rgba(223, 172, 111, 0.1); }