/* Credits Page Styles */
.ai-credits-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-credits-header {
    text-align: center;
    margin-bottom: 40px;
}

.ai-credits-header h1 {
    color: #1a1a1a;
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.ai-credits-header p {
    color: #666;
    font-size: 18px;
    margin: 0;
}

/* Status Section */
.ai-status-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.ai-status-card {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ai-status-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.ai-status-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.ai-status-content h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.ai-credits-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.credits-number {
    font-size: 32px;
    font-weight: 700;
    color: #007cba;
}

.credits-label {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.ai-plan-display {
    display: flex;
    align-items: center;
}

.plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;
}

.plan-badge.basic {
    background: #e8f5e8;
    color: #2d5a2d;
}

.plan-badge.premium {
    background: #fff3cd;
    color: #856404;
}

.plan-badge.pro {
    background: #d1ecf1;
    color: #0c5460;
}

/* Sections */
.ai-section {
    margin-bottom: 48px;
}

.ai-section-header {
    text-align: center;
    margin-bottom: 32px;
}

.ai-section-header h2 {
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.ai-section-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Action Cards */
.ai-subscription-actions,
.ai-credit-actions,
.ai-account-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.ai-action-card {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.ai-action-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.ai-action-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 24px auto;
}

.ai-action-content h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.ai-action-content p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

/* Buttons */
.ai-primary-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
}

.ai-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.3);
}

.ai-secondary-btn {
    background: transparent;
    color: #007cba;
    border: 2px solid #007cba;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
}

.ai-secondary-btn:hover {
    background: #007cba;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.3);
}

.ai-danger-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
}

.ai-danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

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

/* Loading */
.ai-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.ai-message {
    padding: 16px 24px;
    border-radius: 12px;
    margin: 24px 0;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

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

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

.ai-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Modal */
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.ai-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ai-modal-header {
    padding: 24px 32px 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.ai-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ai-modal-close:hover {
    background: #f8f9fa;
    color: #1a1a1a;
}

.ai-modal-body {
    padding: 24px 32px;
}

.ai-modal-body p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.ai-modal-footer {
    padding: 0 32px 24px 32px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Animation */
.ai-fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .ai-credits-container {
        padding: 20px 16px;
    }
    
    .ai-credits-header h1 {
        font-size: 28px;
    }
    
    .ai-credits-header p {
        font-size: 16px;
    }
    
    .ai-status-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .ai-status-card {
        padding: 24px;
        flex-direction: column;
        text-align: center;
    }
    
    .ai-status-icon {
        width: 56px;
        height: 56px;
    }
    
    .ai-subscription-actions,
    .ai-credit-actions,
    .ai-account-actions {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .ai-action-card {
        padding: 24px;
    }
    
    .ai-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .ai-modal-header,
    .ai-modal-body,
    .ai-modal-footer {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .ai-modal-footer {
        flex-direction: column;
    }
    
    .ai-primary-btn,
    .ai-secondary-btn,
    .ai-danger-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .ai-credits-header h1 {
        font-size: 24px;
    }
    
    .ai-section-header h2 {
        font-size: 24px;
    }
    
    .credits-number {
        font-size: 28px;
    }
    
    .ai-status-card,
    .ai-action-card {
        padding: 20px;
    }
}

/* État désactivé pour la section Buy Credits */
.ai-disabled {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.ai-disabled .ai-action-icon {
    opacity: 0.5;
}

.ai-disabled .ai-action-content h3,
.ai-disabled .ai-action-content p {
    color: #999;
}

/* Message d'avertissement pour abonnement requis */
.ai-subscription-required {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    gap: 0.75rem;
}

.ai-warning-icon {
    color: #856404;
    flex-shrink: 0;
    margin-top: 2px;
}

.ai-warning-content {
    flex: 1;
}

.ai-warning-content strong {
    display: block;
    color: #5a4a00;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.ai-warning-content p {
    color: #856404;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Bouton désactivé */
.ai-primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
    color: #666;
}

.ai-primary-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive pour le message d'avertissement */
@media (max-width: 768px) {
    .ai-subscription-required {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .ai-warning-icon {
        margin-top: 0;
    }
} 