/* public/modules/box/style.css */

/* =========================================
   ESTRUTURA GERAL
   ========================================= */
   body {
    overflow: hidden;
    user-select: none;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    background: radial-gradient(circle at center, #1a0b2e 0%, #000000 100%);
    margin: 0;
    font-family: var(--font-main);
}

.hub-container {
    flex: 1; display: flex; flex-direction: column;
    width: 100%; position: relative; overflow: hidden; align-items: center;
}

.nav-back { display:flex; align-items:center; text-decoration:none; color:inherit; padding-left: 20px; transition: 0.3s; }
.app-header { z-index: 100; }

/* =========================================
   MENU DASHBOARD (Setup)
   ========================================= */
.menu-content { display: flex; width: 90%; max-width: 1200px; height: 90%; gap: 40px; align-items: center; padding-bottom: 20px; }
.menu-info { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 20px; min-width: 300px; }

.game-logo-large h1 { font-family: var(--font-gamer); font-size: 3.5rem; line-height: 0.9; margin: 0; background: linear-gradient(to right, #fff, var(--neon-purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 30px rgba(157, 0, 255, 0.3); }
.icon-float { font-size: 5rem; color: var(--neon-purple); margin-bottom: 10px; animation: floatIcon 3s ease-in-out infinite; }
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Botão Neon */
.btn-neon { background: linear-gradient(90deg, var(--neon-purple), #6a00ff); border: none; color: white; padding: 18px 30px; border-radius: 50px; font-size: 1.2rem; font-weight: 700; cursor: pointer; box-shadow: 0 0 20px rgba(157, 0, 255, 0.4); transition: 0.4s; width: 100%; max-width: 350px; text-transform: uppercase; }
.btn-neon:hover { transform: scale(1.05); box-shadow: 0 0 40px rgba(157, 0, 255, 0.6); }
.btn-neon.disabled { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.3); box-shadow: none; cursor: not-allowed; transform: none; }

/* Lista de Temas */
.themes-wrapper { flex: 1.5; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 30px; padding: 30px; height: 100%; display: flex; flex-direction: column; backdrop-filter: blur(10px); overflow: hidden; }
.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; overflow-y: auto; padding-right: 5px;}
.themes-grid::-webkit-scrollbar { width: 6px; }
.themes-grid::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 10px; }

.theme-card { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 20px 10px; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; align-items: center; text-align: center; }
.theme-card.selected { background: rgba(157, 0, 255, 0.15); border-color: var(--neon-purple); box-shadow: 0 0 15px rgba(157, 0, 255, 0.2); }
.theme-icon { font-size: 2rem; margin-bottom: 10px; }
.theme-name { font-weight: 600; font-size: 0.9rem; color: white; margin-bottom: 5px; }
.theme-count { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

/* =========================================
   GAMEPLAY AREA
   ========================================= */
.screen { display: none; width: 100%; height: 100%; flex-direction: column; align-items: center; opacity: 0; transition: opacity 0.3s; }
.screen.active { display: flex; opacity: 1; }

.hud-bar {
    width: 90%; max-width: 800px; display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; background: rgba(255,255,255,0.05); backdrop-filter: blur(10px);
    padding: 10px 20px; border-radius: 30px; border: 1px solid rgba(255,255,255,0.1);
}
.hud-title { font-family: var(--font-gamer); font-size: 1.2rem; color: white; display: flex; align-items: center; gap: 10px; }

/* GRID DE CAIXAS */
.box-grid {
    display: grid; gap: 20px; padding: 20px;
    width: 100%; max-width: 1000px;
    overflow-y: auto; flex: 1;
    /* Centraliza na tela */
    align-content: flex-start; 
}
.box-grid::-webkit-scrollbar { width: 6px; }
.box-grid::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 10px; }

/* CAIXA SURPRESA (ESTILO COFRE) */
.mystery-box {
    background: rgba(30, 20, 40, 0.6);
    border: 2px solid rgba(157, 0, 255, 0.3);
    border-radius: 15px;
    min-height: 100px;
    display: flex; justify-content: center; align-items: center;
    font-family: var(--font-gamer); font-size: 2.5rem; font-weight: bold;
    color: var(--neon-purple);
    cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Efeito de brilho ao passar o mouse */
.mystery-box::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(157, 0, 255, 0.1), transparent);
    transform: rotate(45deg); transition: 0.5s; opacity: 0;
}
.mystery-box:hover::before { opacity: 1; left: 100%; }

.mystery-box:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--neon-purple);
    color: white;
    box-shadow: 0 0 30px rgba(157, 0, 255, 0.4);
    background: rgba(157, 0, 255, 0.1);
}

.mystery-box:active { transform: scale(0.95); }

/* CAIXA ABERTA */
.mystery-box.opened {
    background: rgba(0,0,0,0.3);
    border-color: #444; color: #555;
    box-shadow: none; cursor: default;
    transform: none;
}

/* MODAL DE REVELAÇÃO */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); display: none;
    justify-content: center; align-items: center; z-index: 5000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #1a0b2e; border: 2px solid var(--neon-green);
    padding: 40px; border-radius: 25px; text-align: center;
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.2);
    width: 90%; max-width: 500px;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.reveal-title { font-size: 1rem; color: #aaa; text-transform: uppercase; margin-bottom: 20px; letter-spacing: 2px; }
.reveal-text {
    font-size: 3rem; font-weight: 800; color: var(--neon-green);
    font-family: var(--font-gamer); text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    word-wrap: break-word; line-height: 1.1; margin-bottom: 30px;
}

@keyframes popIn { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }

/* RESPONSIVO */
@media (max-width: 900px) {
    .menu-content { flex-direction: column; gap: 15px; padding: 10px; }
    .menu-info { align-items: center; text-align: center; padding: 10px 0; width: 100%; }
    .themes-wrapper { width: 100%; border-radius: 20px 20px 0 0; padding: 20px 10px; }
    .themes-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}