:root {
    --primary: #6200ea;
    --secondary: #00bfa5;
    --bg: #f5f5f7;
    --panel: #ffffff;
    --danger: #d32f2f;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    margin: 0;
    padding: 20px;
    color: #333;
}

#app-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h1, h2, h3 { margin-top: 0; }
.hidden { display: none !important; }
.mono { font-family: 'Courier New', Courier, monospace; font-weight: bold; }

.panel {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

input, button, textarea {
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

button:hover { background-color: #5300c7; }
button:disabled { background-color: #ccc; cursor: not-allowed; }

/* Layout del Juego */
.game-layout {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 15px;
}

@media (max-width: 768px) {
    .game-layout { grid-template-columns: 1fr; } /* Móvil: una columna */
}

/* Panel de Jugadores */
.players-grid li {
    list-style: none;
    padding: 8px;
    margin-bottom: 5px;
    background: #eee;
    border-radius: 4px;
    display: flex;
    align-items: center;
}
.players-grid .current-turn { border: 2px solid var(--secondary); background: #e0f7fa; }
.players-grid .eliminated { text-decoration: line-through; opacity: 0.7; color: var(--danger); }
.emoji-mood { font-size: 1.5em; margin-right: 10px; }

/* Panel de Turno */
.turn-alert {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
}
.pulse { animation: pulse 1.5s infinite; color: var(--primary); }
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Tabla de Historial */
.table-container { max-height: 300px; overflow-y: auto; }
#history-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
#history-table th, #history-table td { border: 1px solid #ddd; padding: 8px; text-align: center; }
#history-table th { background-color: #f2f2f2; }
.result-tag { display: inline-block; background: #eee; padding: 2px 5px; border-radius: 4px; margin: 2px; }

/* Notas Privadas */
.notes-panel textarea {
    height: 200px;
    resize: vertical;
    font-family: monospace;
}

/* Pantalla Ganador */
.winner-screen { text-align: center; padding: 50px; }
.winner-screen h2 { color: var(--secondary); font-size: 3em; }

/* Notificaciones Toast */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0.95;
    min-width: 250px;
}

.toast.error { background: #d32f2f; }
.toast.info { background: #1976d2; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 0.95; }
}

/* Estilo compacto para el indicador de turno */
#not-turn-panel {
    padding: 5px 10px;       /* Reducimos el relleno drásticamente */
    margin-bottom: 10px;     /* Menos espacio debajo */
    background-color: #e3f2fd; /* Un azul muy suave */
    border: none;            /* Quitamos el borde gris */
    border-left: 4px solid var(--primary); /* Una línea de color para destacar sin ocupar espacio */
    
    /* Alineación para que ocupe menos altura */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
}

#not-turn-panel h3 {
    margin: 0;               /* ¡Clave! Quitamos el margen por defecto del h3 */
    font-size: 0.9rem;       /* Texto más pequeño (aprox 14px) */
    font-weight: normal;     /* Quitamos negrita al texto "Turno de:" */
    color: #555;
}

#current-turn-name {
    font-weight: bold;       /* Solo el nombre en negrita */
    color: var(--primary);   /* Color principal */
    font-size: 1rem;         /* El nombre un pelín más grande */
    margin-left: 5px;
    text-transform: uppercase;
}