// Add CSS for notifications
const style = document.createElement('style');
style.textContent = \`
    .cryptoai-notification {
        position: fixed;
        top: 32px;
        right: 20px;
        background: #667eea;
        color: white;
        padding: 15px 25px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        z-index: 999999;
        animation: slideIn 0.3s ease;
    }
    
    .cryptoai-notification.warning {
        background: #f59e0b;
    }
    
    @keyframes slideIn {
        from {
            transform: translateX(400px);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
\`;
document.head.appendChild(style);`
    },
    frontendCSS: {
      name: 'assets/frontend-style.css',
      icon: <Palette className="w-5 h-5" />,
      type: 'Frontend Styles',
      content: `/* CryptoAi Frontend Styles */

#cryptoai-payment-form {
    background: transparent;
    padding: 20px 0;
}

.cryptoai-crypto-select {
    position: relative;
    margin-bottom: 20px;
}

.cryptoai-crypto-select select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

.cryptoai-crypto-select select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Payment Instructions */
.cryptoai-payment-instructions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    color: white;
}

.cryptoai-payment-header {
    text-align: center;
    margin-bottom: 30px;
}

.cryptoai-payment-header h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.cryptoai-amount-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
}

.cryptoai-amount-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.cryptoai-amount-value {
    font-size: 36px;
    font-weight: bold;
    margin: 0;
}

.cryptoai-wallet-box {
    background: white;
    color: #333;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.cryptoai-wallet-label {
    font-weight: 600
}

.cryptoai-wrap {
    background: #f5f5f5;
    padding: 20px;
    margin: 20px 20px 0 0;
}

.cryptoai-page-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 32px;
    color: #1e1e1e;
    margin-bottom: 30px;
}

.cryptoai-icon {
    font-size: 36px;
}

/* Stats Cards */
.cryptoai-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cryptoai-stat-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cryptoai-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cryptoai-stat-card.blue { border-left: 5px solid #3b82f6; }
.cryptoai-stat-card.green { border-left: 5px solid #10b981; }
.cryptoai-stat-card.orange { border-left: 5px solid #f59e0b; }
.cryptoai-stat-card.purple { border-left: 5px solid #8b5cf6; }

.cryptoai-stat-icon {
    font-size: 48px;
}

.cryptoai-stat-content h3 {
    font-size: 36px;
    font-weight: bold;
    margin: 0;
    color: #1e1e1e;
}

.cryptoai-stat-content p {
    margin: 5px 0 0;
    color: #666;
    font-size: 14px;
}

/* Charts Grid */
.cryptoai-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Card Styles */
.cryptoai-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cryptoai-card-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cryptoai-card-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.cryptoai-card-body {
    padding: 25px;
}

/* Settings Form */
.cryptoai-settings-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.cryptoai-form-group {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cryptoai-form-group:last-child {
    border-bottom: none;
}

.cryptoai-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.cryptoai-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.cryptoai-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Toggle Switch */
.cryptoai-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    flex-shrink: 0;
}

.cryptoai-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cryptoai-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 30px;
}

.cryptoai-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cryptoai-toggle input:checked + .cryptoai-toggle-slider {
    background-color: #667eea;
}

.cryptoai-toggle input:checked + .cryptoai-toggle-slider:before {
    transform: translateX(30px);
}

/* Wallet Groups */
.cryptoai-wallet-group {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 15px;
}

.cryptoai-wallet-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Buttons */
.cryptoai-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

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

.cryptoai-btn.large {
    padding: 15px 35px;
    font-size: 16px;
}

/* Table */
.cryptoai-table {
    width: 100%;
    border-collapse: collapse;
}

.cryptoai-table thead {
    background: #f9fafb;
}

.cryptoai-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.cryptoai-table td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.cryptoai-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.cryptoai-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.cryptoai-status.completed {
    background: #d1fae5;
    color: #065f46;
}

/* Responsive */
@media (max-width: 768px) {
    .cryptoai-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cryptoai-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .cryptoai-form-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cryptoai-wallet-group {
        flex-direction: column;
        text-align: center;
    }
}