* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Pantallas */
.screen {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.header i {
    margin-right: 10px;
}

/* Botones */
.mode-btn, .level-btn {
    background: white;
    border: none;
    border-radius: 15px;
    padding: 30px 20px;
    margin: 15px 0;
    width: 100%;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mode-btn:hover, .level-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.mode-btn i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
    display: block;
}

.mode-btn h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #333;
}

.mode-btn p {
    color: #666;
    font-size: 0.9rem;
}

/* Niveles */
.levels-grid {
    display: grid;
    gap: 20px;
}

.level-btn {
    padding: 25px;
    text-align: left;
}

.level-btn h3 {
    color: #333;
    margin-bottom: 8px;
}

.level-btn p {
    color: #666;
    font-size: 0.9rem;
}

/* Configuración de equipos */
.team-config {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.input-group select,
.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group select:focus,
.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.team-input {
    margin-bottom: 15px;
}

/* Nuevos estilos para configuración de equipos */
.team-setup-row {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    align-items: center;
}

.team-name-input {
    width: 100% !important;
}

.team-color-select {
    width: 100% !important;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
}

/* Marcador con colores */
.team-score {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.team-score.active {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.team-score.active .team-name {
    color: white !important;
}

.team-name {
    font-weight: 600;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.team-points {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Responsive para configuración de equipos */
@media (max-width: 768px) {
    .team-setup-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .color-preview {
        justify-self: center;
        width: 35px;
        height: 35px;
    }
}

/* Botones de acción */
.start-btn, .action-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.start-btn:hover, .action-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.back-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Pantalla de juego */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: white;
}

.game-info {
    text-align: right;
}

.game-info span {
    display: block;
    margin-bottom: 5px;
}

/* Marcador */
.scoreboard {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.teams-score {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.team-score {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.team-score.active {
    background: #667eea;
    color: white;
}

.team-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.team-points {
    font-size: 1.5rem;
    font-weight: 700;
}

.current-turn {
    text-align: center;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 8px;
    color: #1976d2;
}

/* Tarjeta de pregunta */
.question-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.question-card {
    padding: 30px;
}

.question-card h3 {
    font-size: 1.3rem;
    line-height: 1.5;
    margin-bottom: 25px;
    color: #333;
}

/* Opciones */
.options-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 25px;
}

.option-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.option-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.option-btn.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.option-btn.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Acciones de pregunta */
.question-actions {
    display: flex;
    gap: 15px;
}

.question-actions .action-btn {
    flex: 1;
}

/* Tarjeta de respuesta */
.answer-card {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 30px;
}

.answer-content h4 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.answer-content p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
}

.bible-reference {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 20px;
}

.bible-reference i {
    margin-right: 8px;
}

/* Controles de puntuación */
.scoring-controls {
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

.scoring-controls h4 {
    margin-bottom: 15px;
    color: #333;
}

.score-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.score-btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.score-btn.correct {
    background: #28a745;
    color: white;
}

.score-btn.correct:hover {
    background: #218838;
}

.score-btn.incorrect {
    background: #dc3545;
    color: white;
}

.score-btn.incorrect:hover {
    background: #c82333;
}

/* Resultados finales */
.results-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.winner {
    text-align: center;
    margin-bottom: 30px;
}

.winner h3 {
    color: #ffd700;
    font-size: 2rem;
    margin-bottom: 10px;
}

.winner p {
    font-size: 1.2rem;
    color: #333;
}

.final-scores {
    display: grid;
    gap: 15px;
}

.final-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.final-team.winner {
    background: #fff3cd;
    border: 2px solid #ffd700;
}

.final-team-name {
    font-weight: 600;
}

.final-team-score {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilidades */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .mode-btn, .question-card {
        padding: 20px;
    }
    
    .teams-score {
        grid-template-columns: 1fr;
    }
    
    .score-buttons {
        grid-template-columns: 1fr;
    }
    
    .question-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .question-card h3 {
        font-size: 1.1rem;
    }
    
    .game-header {
        flex-direction: column;
        text-align: center;
    }
    
    .game-info {
        text-align: center;
        margin-top: 10px;
    }
}

.help-section {
    margin: 20px 0;
}

.help-btn {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.options-grid.help-mode {
    border: 2px dashed #ffd700;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    padding: 15px;
}