/* ==================== SISTEMA DE CRÉDITOS - ESTILOS ==================== */

/* Display de Créditos en Sidebar */
#creditosDisplay {
    padding: 12px 16px;
    margin: 12px 16px;
}

.creditos-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.creditos-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.creditos-card.creditos-bajos {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.creditos-card.creditos-bajos .creditos-icon {
    color: #ef4444;
}

.creditos-card.creditos-bajos .creditos-valor {
    color: #ef4444;
}

.creditos-card.creditos-suficientes .creditos-icon {
    color: #8b5cf6;
}

.creditos-card.creditos-ilimitados {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.creditos-card.creditos-ilimitados .creditos-icon {
    color: #10b981;
}

.creditos-card.creditos-ilimitados .creditos-valor {
    color: #10b981;
}

.creditos-icon {
    font-size: 24px;
    color: #8b5cf6;
}

.creditos-info {
    flex: 1;
}

.creditos-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.creditos-valor {
    font-size: 1.25rem;
    font-weight: 700;
    color: #8b5cf6;
    font-family: 'JetBrains Mono', monospace;
}

/* Modal de Créditos Agotados */
.modal-creditos-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-creditos-container {
    background: #1a1f2e;
    border: 1px solid #2d3748;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-creditos-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid #2d3748;
}

.modal-creditos-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.modal-creditos-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0;
}

.modal-creditos-body {
    padding: 32px;
}

.creditos-status {
    background: #131825;
    border: 1px solid #2d3748;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.credito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.credito-item:not(:last-child) {
    border-bottom: 1px solid #2d3748;
}

.credito-label {
    font-size: 0.875rem;
    color: #9ca3af;
}

.credito-valor {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.credito-valor.actual {
    color: #ef4444;
}

.credito-valor.necesarios {
    color: #8b5cf6;
}

.modal-mensaje {
    font-size: 1rem;
    color: #d1d5db;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 24px;
}

.creditos-info-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.creditos-info-box h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #60a5fa;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.creditos-info-box p {
    font-size: 0.875rem;
    color: #9ca3af;
    line-height: 1.6;
    margin: 0;
}

.modal-creditos-footer {
    padding: 24px 32px;
    border-top: 1px solid #2d3748;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-creditos-footer .btn-secondary {
    padding: 12px 24px;
    background: #1a1f2e;
    border: 1px solid #2d3748;
    border-radius: 8px;
    color: #9ca3af;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-creditos-footer .btn-secondary:hover {
    background: #131825;
    color: #e5e7eb;
}

.modal-creditos-footer .btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-creditos-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-creditos-container {
        max-width: 95%;
    }

    .modal-creditos-header,
    .modal-creditos-body,
    .modal-creditos-footer {
        padding: 20px;
    }

    .modal-creditos-footer {
        flex-direction: column;
    }

    .modal-creditos-footer .btn-secondary,
    .modal-creditos-footer .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    /* Compactar display de créditos en sidebar */
    #creditosDisplay {
        padding: 8px 12px;
        margin: 8px 12px;
    }
    
    .creditos-card {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .creditos-icon {
        font-size: 1.25rem;
    }
    
    .creditos-info {
        gap: 2px;
    }
    
    .creditos-label {
        font-size: 0.6875rem;
    }
    
    .creditos-valor {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    #creditosDisplay {
        padding: 6px 8px;
        margin: 6px 8px;
    }
    
    .creditos-card {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .creditos-icon {
        font-size: 1.125rem;
    }
    
    .creditos-label {
        font-size: 0.625rem;
    }
    
    .creditos-valor {
        font-size: 0.9375rem;
    }
}
