/**
 * Estilos globales para todos los juegos Neurok
 */

/* Reset y estilos base */
.juegos-neurok-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.juegos-neurok-container * {
    box-sizing: border-box;
}

/* Modal para ingresar nombre */
.juego-neurok-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.juego-neurok-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

.juego-neurok-modal-content h2 {
    color: #2c3e50;
    margin-top: 0;
    text-align: center;
}

.juego-neurok-modal-content .score-info {
    text-align: center;
    font-size: 1.1em;
    color: #27ae60;
    margin: 15px 0;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 6px;
}

.juego-neurok-modal-content input[type="text"] {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.juego-neurok-modal-content input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.save-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.save-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.save-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tabla de ranking */
.ranking-table-container {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ranking-table-container h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ranking-table th,
.ranking-table td {
    padding: 12px;
    text-align: left;
}

.ranking-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.ranking-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.ranking-table tbody tr:hover {
    background-color: #f8f9fa;
}

.ranking-table tbody tr.top-three {
    background: linear-gradient(90deg, #fff9e6 0%, #ffffff 100%);
    font-weight: 600;
}

.ranking-table tbody tr.top-three:hover {
    background: linear-gradient(90deg, #fff3d0 0%, #f8f9fa 100%);
}

.no-ranking {
    text-align: center;
    color: #7f8c8d;
    padding: 40px 20px;
    font-style: italic;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .juego-neurok-modal-content {
        margin: 20% auto;
        padding: 20px;
        max-width: 90%;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .ranking-table {
        font-size: 0.9em;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 8px 4px;
    }
}

/* Footer común */
.juego-footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 40px;
    border-top: 1px solid #eee;
}

.juego-footer strong {
    color: #2c3e50;
}
