/* public/modules/quiz/style.css */

/* =========================================
   ESTRUTURA GERAL
   ========================================= */
   body {
    overflow: hidden;
    user-select: none;
    display: flex;
    flex-direction: column;
    height: 100vh;
    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;
}

.app-header { z-index: 100; }
.btn-config-header { color: white; text-decoration: none; display: flex; align-items: center; margin-left: 20px; }

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

.menu-content { 
    display: flex; width: 90%; max-width: 1200px; height: 90%; 
    gap: 30px; padding-bottom: 20px; 
}

/* --- CORREÇÃO AQUI: PAINEL ESQUERDO COM SCROLL --- */
.menu-info {
    flex: 1; display: flex; flex-direction: column; padding: 20px;
    background: rgba(255,255,255,0.03); border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    
    /* Adiciona rolagem se o conteúdo (alunos) crescer demais */
    overflow-y: auto; 
    height: 100%;
    min-height: 0; /* Importante para flexbox não travar */
}

/* Scrollbar personalizada para o menu */
.menu-info::-webkit-scrollbar { width: 6px; }
.menu-info::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 4px; }

.section-title {
    color: var(--neon-purple); font-family: var(--font-gamer); 
    font-size: 1.5rem; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px; flex-shrink: 0;
}

.game-logo-large { flex-shrink: 0; }
.icon-float { flex-shrink: 0; }

/* Inputs e Selects */
.input-group label { display: block; color: #aaa; margin-bottom: 5px; font-size: 0.9rem; }
.neon-select, #room-code-input {
    width: 100%; background: #0f0f1a; color: white;
    border: 1px solid var(--neon-purple); padding: 12px; border-radius: 8px;
    font-family: var(--font-main); outline: none; margin-bottom: 15px;
}

/* Checklists (Alunos/Quizzes) */
.checklist-area {
    max-height: 200px; /* Aumentei um pouco */
    overflow-y: auto; 
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 10px; display: grid; gap: 5px;
    margin-bottom: 15px;
}
.checklist-area::-webkit-scrollbar { width: 4px; }
.checklist-area::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 4px; }

.checklist-area label {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 5px; border-radius: 4px; transition: 0.2s;
    font-size: 0.9rem; color: #ddd;
}
.checklist-area label:hover { background: rgba(255,255,255,0.05); }
.checklist-area input[type="checkbox"] { accent-color: var(--neon-purple); width: 16px; height: 16px; }


.btn-neon {
    background: linear-gradient(90deg, var(--neon-purple), #9d00ff);
    border: none; color: white; padding: 15px; border-radius: 8px;
    font-weight: bold; cursor: pointer; text-transform: uppercase;
    box-shadow: 0 0 15px rgba(180, 0, 255, 0.3); transition: 0.3s;
}
.btn-neon:hover { transform: scale(1.02); box-shadow: 0 0 25px rgba(180, 0, 255, 0.5); }

.btn-secondary {
    background: transparent; border: 1px solid rgba(255,255,255,0.2);
    color: white; padding: 12px; border-radius: 8px; cursor: pointer; transition: 0.3s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: white; }

/* Painel Direito (Salas e Aluno) */
.side-panel-container { 
    flex: 0.8; display: flex; flex-direction: column; gap: 20px; 
    overflow-y: auto; /* Permite scroll no lado direito também se precisar */
}

.card-panel {
    background: rgba(255,255,255,0.03); border-radius: 15px; padding: 20px;
    border: 1px solid rgba(255,255,255,0.05); flex-shrink: 0;
}

.simple-list li {
    background: rgba(0,0,0,0.3); padding: 10px; border-radius: 8px;
    margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center;
    border-left: 3px solid var(--neon-blue);
}
.icon-btn { background: none; border: none; cursor: pointer; font-size: 1.2rem; transition: 0.2s; }
.icon-btn:hover { transform: scale(1.2);
    filter: drop-shadow(0 0 5px white); }

/* =========================================
   GAMEPLAY
   ========================================= */
.game-info-bar {
    display: flex; justify-content: space-between; align-items: center;
    width: 90%; max-width: 800px; margin-bottom: 20px;
    background: rgba(20, 10, 30, 0.9); padding: 10px 20px;
    border-radius: 30px; border: 1px solid var(--neon-purple);
}

.player-turn-badge {
    color: var(--neon-yellow); font-weight: bold; font-family: var(--font-gamer);
    text-transform: uppercase; letter-spacing: 1px;
}

#top-score-display {
    color: var(--neon-green); font-weight: bold; font-size: 1.2rem; font-family: var(--font-gamer);
}

.question-card {
    width: 90%; max-width: 900px; min-height: 150px;
    background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.1);
    border-radius: 20px; padding: 30px; text-align: center;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    margin-bottom: 30px; backdrop-filter: blur(10px);
    position: relative;
}

#q-text { font-size: 1.8rem; color: white; margin: 0; line-height: 1.3; }

#quiz-timer {
    font-size: 1.2rem; color: var(--neon-red); font-weight: bold;
    background: rgba(0,0,0,0.5); padding: 5px 15px; border-radius: 20px;
    margin-bottom: 15px; border: 1px solid var(--neon-red);
}

/* Opções */
.options-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    width: 90%; max-width: 900px; margin-bottom: 30px;
}

.quiz-opt-btn {
    background: rgba(30, 20, 50, 0.8); border: 2px solid rgba(180, 0, 255, 0.3);
    border-radius: 15px; padding: 20px; color: white; font-size: 1.2rem;
    cursor: pointer; transition: 0.2s; position: relative; overflow: hidden;
}
.quiz-opt-btn:hover {
    transform: translateY(-3px); border-color: var(--neon-purple);
    background: rgba(180, 0, 255, 0.1); box-shadow: 0 0 20px rgba(180, 0, 255, 0.2);
}

.quiz-opt-btn.correct {
    background: rgba(0, 255, 136, 0.2) !important; border-color: var(--neon-green) !important;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4); animation: pulse 0.5s;
}
.quiz-opt-btn.wrong {
    background: rgba(255, 50, 50, 0.2) !important; border-color: var(--neon-red) !important;
    opacity: 0.6; animation: shake 0.4s;
}

/* Pontos Flutuantes */
.points-float {
    position: absolute; color: var(--neon-green); font-weight: bold; font-size: 2rem;
    pointer-events: none; transition: 1s ease-out; z-index: 1000;
    text-shadow: 0 0 10px var(--neon-green);
}

@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* =========================================
   RESPONSIVIDADE
   ========================================= */
@media (max-width: 900px) {
    .menu-content { flex-direction: column; overflow-y: auto; }
    .options-grid { grid-template-columns: 1fr; }
    #q-text { font-size: 1.4rem; }
    
    .menu-info { overflow-y: visible; height: auto; flex: none; }
}

/* MODAL */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); display: none;
    justify-content: center; align-items: center; z-index: 5000;
}
.modal-content {
    background: #1a0b2e; border: 2px solid var(--neon-purple);
    padding: 30px; border-radius: 20px; text-align: center;
    box-shadow: 0 0 50px rgba(180, 0, 255, 0.2); width: 85%; max-width: 400px;
}
.room-code-big { font-size: 4rem; color: var(--neon-yellow); margin: 10px 0; letter-spacing: 5px; font-family: var(--font-gamer); }

/* ÍCONES E LOGOS */
.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(180, 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); } }

.ranking-list {
    width: 100%; max-height: 200px; overflow-y: auto;
    background: rgba(0,0,0,0.3); border-radius: 10px;
    margin: 15px 0; padding: 10px; text-align: left;
}

.rank-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white; transition: 0.3s;
}

/* Status Online */
.rank-item.online {
    border-left: 3px solid var(--neon-green);
    background: rgba(0, 255, 136, 0.05);
}

/* Status Offline (Desconectado) */
.rank-item.offline {
    border-left: 3px solid var(--neon-red);
    background: rgba(255, 0, 0, 0.05);
    opacity: 0.7;
}
.rank-item.offline span { color: #aaa; }

.status-indicator {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block; margin-right: 8px;
}
.online .status-indicator { background: var(--neon-green); box-shadow: 0 0 5px var(--neon-green); }
.offline .status-indicator { background: var(--neon-red); }

.rank-item:first-child { color: var(--neon-yellow); font-weight: bold; font-size: 1.1rem; }
