/* public/modules/forme/style.css */

/* =========================================
   ESTRUTURA E FUNDO
   ========================================= */
   body {
    overflow: hidden;
    user-select: none;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh; 
    background: radial-gradient(circle at top right, #1a1a2e 0%, #0f0f1a 100%);
    margin: 0;
}

@keyframes moveBackground { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.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: 10; }

/* =========================================
   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;
}

.game-logo-large { display: flex; align-items: center; margin-bottom: 20px; }
.game-logo-large h1 {
    font-family: var(--font-gamer); font-size: 4rem; line-height: 0.9; margin: 0;
    background: linear-gradient(to right, #fff, var(--neon-blue));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
}

.icon-float {
    font-size: 5rem; margin-right: 20px; color: var(--neon-purple);
    animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.game-desc {
    color: rgba(255,255,255,0.6); font-size: 1.1rem; margin-bottom: 40px;
    max-width: 400px; line-height: 1.5;
}

.btn-neon {
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    border: none; color: white; padding: 18px 30px; border-radius: 50px;
    font-size: 1.2rem; font-weight: 700; letter-spacing: 1px; cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4); transition: 0.4s;
    width: 100%; max-width: 350px; text-transform: uppercase;
    position: relative; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.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;
    border: 1px solid rgba(255,255,255,0.05);
}

.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;
}

.section-title {
    font-family: var(--font-gamer); color: rgba(255,255,255,0.4);
    margin-top: 0; margin-bottom: 15px; letter-spacing: 2px; font-size: 0.9rem; flex-shrink: 0;
}

.themes-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px; overflow-y: auto; padding-right: 5px; padding-bottom: 10px;
}
.themes-grid::-webkit-scrollbar { width: 6px; }
.themes-grid::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.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;
    user-select: none; -webkit-tap-highlight-color: transparent;
}
.theme-card:active { transform: scale(0.95); }
.theme-card.selected {
    background: rgba(0, 243, 255, 0.15); border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 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; line-height: 1.2;}
.theme-count { font-size: 0.7rem; color: rgba(255,255,255,0.5); background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 8px; }

/* =========================================
   RESPONSIVIDADE (MOBILE)
   ========================================= */
@media (max-width: 900px) {
    .menu-content { flex-direction: column; width: 100%; height: 100%; gap: 15px; padding: 10px; }
    .menu-info { flex: 0 0 auto; width: 100%; align-items: center; text-align: center; padding: 10px 0; }
    .game-logo-large h1 { font-size: 2.5rem; }
    .icon-float { font-size: 3rem; margin-right: 10px; }
    .game-desc { display: none; }
    .btn-neon { width: 90%; padding: 15px; font-size: 1rem; }
    .themes-wrapper {
        flex: 1; width: 100%; border-radius: 20px 20px 0 0;
        border-bottom: none; padding: 20px 15px; background: rgba(0,0,0,0.2);
    }
    .themes-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); padding-bottom: 50px; }
}

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

.game-header-bar { 
    width: 100%; max-width: 700px; display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 20px; padding: 0 20px; box-sizing: border-box; 
}
.score-box { background: rgba(255,255,255,0.1); padding: 8px 20px; border-radius: 30px; display:flex; align-items: center; gap:10px; font-family: var(--font-gamer); font-size: 1.2rem; }

.game-container { 
    width: 100%; max-width: 800px; display: flex; flex-direction: column; align-items: center; 
    gap: 30px; padding: 10px; box-sizing: border-box; flex: 1; justify-content: center;
}

/* SLOTS */
.slots-container { 
    display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; 
    width: 100%; max-width: 95vw; 
}

.slot {
    width: 55px; height: 65px;
    background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.15);
    border-radius: 12px; display: flex; justify-content: center; align-items: center;
    font-size: 2rem; font-family: var(--font-gamer); font-weight: bold; cursor: pointer;
    transition: 0.2s; user-select: none;
}
.slot.filled { 
    background: rgba(0, 243, 255, 0.1); border-color: var(--neon-blue); 
    transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0, 243, 255, 0.15); color: white;
}

/* --- NOVO: Slot de Espaço (Invisível mas ocupa espaço) --- */
.slot-space {
    width: 30px; /* Largura do espaço */
    height: 65px;
    background: transparent;
    border: none;
    pointer-events: none; /* Não clicável */
}

/* POOL (Teclado) */
.pool-container { 
    display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; 
    max-width: 600px; padding: 10px; background: rgba(0,0,0,0.2); border-radius: 20px;
}
.letter-btn {
    width: 48px; height: 48px;
    background: linear-gradient(145deg, #2e2e42, #252535); 
    border: 1px solid rgba(255,255,255,0.1); border-bottom: 3px solid #151520;
    border-radius: 10px; color: white; font-family: var(--font-gamer); font-size: 1.5rem; 
    cursor: pointer; transition: 0.1s; touch-action: manipulation;
}
.letter-btn:active { transform: translateY(3px); border-bottom-width: 0px; }
.letter-btn:disabled { opacity: 0.2; transform: translateY(3px); border-bottom-width: 0px; filter: grayscale(1); }

/* MOBILE AJUSTES */
@media (max-width: 600px) {
    .game-container { gap: 15px; justify-content: flex-start; padding-top: 20px; }
    
    .slot {
        width: 11vw; height: 13vw; max-width: 50px; max-height: 60px;
        min-width: 35px; min-height: 45px; font-size: 1.4rem; gap: 4px; border-radius: 8px;
    }
    .slot-space {
        width: 4vw; /* Espaço menor no celular */
        height: 13vw; max-height: 60px;
    }
    .slots-container { gap: 4px; }
    
    .letter-btn {
        width: 11vw; height: 11vw; max-width: 45px; max-height: 45px; font-size: 1.2rem;
    }
    .pool-container { width: 100%; background: transparent; }
}

/* FEEDBACK & MODAL */
.feedback-box { 
    height: 40px; margin-top: 10px; opacity: 0; font-weight: bold; 
    transition: 0.3s; padding: 8px 24px; border-radius: 30px; 
    background: rgba(0,0,0,0.8); backdrop-filter: blur(4px);
    position: absolute; bottom: 80px;
}

.shake { animation: shake 0.4s ease-in-out; border-color: var(--neon-red) !important; color: var(--neon-red); }
@keyframes shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-5px);} 75%{transform:translateX(5px);} }

.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.9); z-index: 999; display: flex; justify-content: center; align-items: center; }
.modal-content { background: #1a1a2e; padding: 30px; border-radius: 20px; text-align: center; border: 1px solid rgba(255,255,255,0.1); width: 85%; max-width: 350px; }
.victory-icon { font-size: 80px; color: var(--neon-green); margin-bottom: 10px; }
.final-score-box { background: rgba(255,255,255,0.05); padding: 15px; border-radius: 10px; margin: 20px 0; }
.final-score-box h3 { margin: 5px 0 0; font-size: 2rem; color: white; }