/* trivia.css - Estilos del juego */
#tg-game-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Instrucciones */
#tg-instructions {
    background: #f8f9fa;
    border: 2px solid #0073aa;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

#tg-instructions h3 {
    color: #0073aa;
    margin-top: 0;
}

#tg-instructions ul {
    text-align: left;
    max-width: 500px;
    margin: 20px auto;
    padding-left: 20px;
}

#tg-instructions li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Encabezado del juego */
#tg-game-header {
    display: flex;
    justify-content: space-between;
    background: #0073aa;
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
}

#tg-game-header > div {
    font-size: 1.1em;
}

#tg-game-header span {
    font-weight: normal;
    margin-left: 5px;
}

/* Contenedor de pregunta */
#tg-question-container {
    background: white;
    padding: 30px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#tg-question h3 {
    margin: 0 0 30px 0;
    color: #333;
    font-size: 1.4em;
    line-height: 1.4;
}

/* Respuestas */
#tg-answers {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.tg-answer {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tg-answer:hover:not(.disabled) {
    background: #e9ecef;
    border-color: #0073aa;
    transform: translateY(-2px);
}

.tg-answer.selected {
    border-color: #0073aa;
    background: #e7f1ff;
}

.tg-answer.correct {
    border-color: #28a745;
    background: #d4edda;
}

.tg-answer.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
}

.tg-answer.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.tg-answer-letter {
    width: 40px;
    height: 40px;
    background: #0073aa;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.tg-answer.correct .tg-answer-letter {
    background: #28a745;
}

.tg-answer.incorrect .tg-answer-letter {
    background: #dc3545;
}

.tg-answer-text {
    flex: 1;
    font-size: 1.1em;
    line-height: 1.4;
}

/* Controles */
#tg-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 0 30px 30px;
    background: white;
}

.tg-button {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.tg-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tg-start-button {
    background: #28a745;
    color: white;
    font-size: 1.2em;
    padding: 15px 40px;
    margin-top: 20px;
}

.tg-start-button:hover {
    background: #218838;
    transform: scale(1.05);
}

#tg-next {
    background: #0073aa;
    color: white;
}

#tg-next:hover:not(:disabled) {
    background: #005a87;
}

#tg-quit {
    background: #6c757d;
    color: white;
}

#tg-quit:hover {
    background: #545b62;
}

.tg-primary-button {
    background: #0073aa;
    color: white;
}

/* Categoría */
#tg-category {
    background: #e7f1ff;
    border-left: 4px solid #0073aa;
    padding: 10px 20px;
    margin: 20px 30px;
    border-radius: 4px;
    font-style: italic;
    color: #005a87;
}

/* Resultados */
#tg-results {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

#tg-results h2 {
    color: #0073aa;
    text-align: center;
    margin-bottom: 30px;
}

.tg-results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tg-stat {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.tg-stat h3 {
    color: #495057;
    margin-top: 0;
    font-size: 1.1em;
}

.tg-stat-value {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
    color: #0073aa;
}

/* Revisión de respuestas */
#tg-answers-review {
    margin: 30px 0;
}

.tg-review-list {
    display: grid;
    gap: 15px;
}

.tg-review-item {
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #6c757d;
}

.tg-review-item.correct {
    background: #d4edda;
    border-left-color: #28a745;
}

.tg-review-item.incorrect {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.tg-review-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.95em;
}

.tg-review-your-answer,
.tg-review-correct {
    flex: 1;
    min-width: 200px;
}

.tg-review-status {
    font-weight: bold;
    font-size: 1.2em;
}

.tg-review-item.correct .tg-review-status {
    color: #28a745;
}

.tg-review-item.incorrect .tg-review-status {
    color: #dc3545;
}

/* Mensajes */
.tg-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.tg-message.success {
    background: #28a745;
}

.tg-message.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Acciones del juego */
#tg-game-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    #tg-game-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    #tg-question-container {
        padding: 20px;
    }
    
    #tg-controls {
        flex-direction: column;
        gap: 10px;
        padding: 0 20px 20px;
    }
    
    .tg-button {
        width: 100%;
    }
    
    .tg-results-stats {
        grid-template-columns: 1fr;
    }
    
    #tg-game-actions {
        flex-direction: column;
    }
    
    .tg-review-details {
        flex-direction: column;
        gap: 5px;
    }
    
    .tg-review-your-answer,
    .tg-review-correct {
        min-width: auto;
    }
}