* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overscroll-behavior-y: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    min-height: 100vh;
    padding: 20px 0;
}

/* Classe utilitaire pour masquer les éléments */
.hidden {
    display: none !important;
}

.chat-container {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.chat-header h1 {
    font-size: 1.5rem;
    color: #1a73e8;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.4;
}

.message.user .message-content {
    background-color: #1a73e8;
    color: white;
}

.message.bot .message-content {
    background-color: #f0f2f5;
    color: #1a1a1a;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

#chat-form {
    display: flex;
    gap: 10px;
}

#message-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#message-input:focus {
    border-color: #1a73e8;
}

button {
    padding: 12px 24px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #1557b0;
}

/* Animation pour les nouveaux messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation: slideIn 0.3s ease-out;
}

/* Styles pour le jeu */
.game-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 32px;
}

.game-header {
    text-align: center;
    margin-bottom: 24px;
    color: #1a73e8;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.question-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1a73e8;
    transition: border-left-color 0.3s ease;
}

.question-container.answered {
    border-left-color: #6c757d;
}

.question-text {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.options-container {
    display: grid;
    gap: 10px;
}

.option {
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1rem;
}

.option:hover {
    border-color: #1a73e8;
    background-color: #f8f9fa;
}

.option.selected {
    border-color: #1a73e8;
    background-color: #e3f2fd;
}

.option.correct {
    border-color: #4caf50;
    background-color: #e8f5e8;
}

.option.incorrect {
    border-color: #f44336;
    background-color: #ffebee;
}

.players-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.players-container h3 {
    margin-bottom: 15px;
    color: #333;
}

.player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: white;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.player.host {
    border-left: 4px solid #1a73e8;
    background-color: #f8f9fa;
}

.player.current-player {
    background-color: #e3f2fd;
    border-color: #1a73e8;
}

.player.winner {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.controls {
    margin-top: 20px;
    text-align: center;
}

.btn {
    margin: 0 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #1a73e8;
    color: white;
}

.btn-primary:hover {
    background-color: #1557b0;
}

.btn-success {
    background-color: #4caf50;
    color: white;
}

.btn-success:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.player-result {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.player-result.correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.player-result.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.scores-final {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.scores-final h2 {
    color: #1a73e8;
    margin-bottom: 20px;
}

#winner {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffc107;
    margin-bottom: 20px;
}

#final-scores-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 768px) {
    .game-container {
        margin: 10px;
        padding: 20px;
    }
    
    .options-container {
        grid-template-columns: 1fr;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .controls {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        margin: 0;
    }
}
