/**
 * The Ascend AI Lab - Marketing Agent Styles
 * Beautiful, modern design with gradient accents
 */

:root {
    --ascend-primary: #6366f1;
    --ascend-button: #8b5cf6;
    --ascend-dark: #1e293b;
    --ascend-light: #f8fafc;
    --ascend-border: #e2e8f0;
    --ascend-success: #10b981;
    --ascend-error: #ef4444;
}

.ascend-ai-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    border-radius: 16px;
    overflow: hidden;
    max-width: 900px;
    margin: 40px auto;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
    background: white;
}

/* Header */
.ascend-ai-header {
    background: linear-gradient(135deg, var(--ascend-primary) 0%, var(--ascend-button) 100%);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.ascend-ai-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.ascend-ai-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.ascend-ai-logo {
    flex-shrink: 0;
}

.ascend-ai-title {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ascend-ai-subtitle {
    margin: 4px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Examples Section */
.ascend-ai-examples {
    padding: 24px 32px;
    background: linear-gradient(to bottom, #f8fafc 0%, white 100%);
    border-bottom: 1px solid var(--ascend-border);
}

.ascend-ai-examples-title {
    margin: 0 0 16px 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ascend-dark);
}

.ascend-ai-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.ascend-ai-example-btn {
    padding: 12px 16px;
    background: white;
    border: 2px solid var(--ascend-border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ascend-dark);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.ascend-ai-example-btn:hover {
    border-color: var(--ascend-primary);
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

/* Input Area */
.ascend-ai-input-area {
    padding: 32px;
    background: white;
}

.ascend-ai-prompt {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--ascend-border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
    line-height: 1.6;
    box-sizing: border-box;
}

.ascend-ai-prompt:focus {
    outline: none;
    border-color: var(--ascend-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.ascend-ai-prompt::placeholder {
    color: #94a3b8;
}

.ascend-ai-button {
    width: 100%;
    padding: 16px 32px;
    margin-top: 16px;
    background: linear-gradient(135deg, var(--ascend-button) 0%, var(--ascend-primary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.ascend-ai-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.ascend-ai-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.ascend-ai-button:hover::before {
    left: 100%;
}

.ascend-ai-button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ascend-ai-button-icon {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ascend-ai-button:disabled .ascend-ai-button-icon {
    animation-duration: 1s;
}

/* Results Area */
.ascend-ai-results {
    padding: 32px;
    min-height: 300px;
    background: var(--ascend-light);
    border-top: 1px solid var(--ascend-border);
}

.ascend-ai-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.ascend-ai-placeholder-icon {
    margin-bottom: 20px;
    color: var(--ascend-primary);
}

.ascend-ai-placeholder p {
    margin: 8px 0;
    font-size: 1rem;
}

.ascend-ai-placeholder-hint {
    font-size: 0.875rem;
    color: #94a3b8;
}

.ascend-ai-results .ascend-ai-success {
    animation: fadeInUp 0.5s;
}

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

.ascend-ai-results p {
    margin: 16px 0;
    line-height: 1.7;
    color: var(--ascend-dark);
}

.ascend-ai-results ul,
.ascend-ai-list {
    margin: 16px 0;
    padding-left: 24px;
}

.ascend-ai-results li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: var(--ascend-dark);
}

.ascend-ai-results strong {
    color: var(--ascend-primary);
    font-weight: 600;
}

.ascend-ai-results em {
    font-style: italic;
    color: var(--ascend-button);
}

/* Loader */
.ascend-ai-loader {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.ascend-ai-loader-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--ascend-border);
    border-top: 4px solid var(--ascend-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.ascend-ai-loader-text {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ascend-dark);
}

.ascend-ai-loader-subtext {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

/* Error Message */
.ascend-ai-error {
    padding: 16px 20px;
    background: #fef2f2;
    border-left: 4px solid var(--ascend-error);
    border-radius: 8px;
    color: #991b1b;
    line-height: 1.6;
}

.ascend-ai-error strong {
    color: var(--ascend-error);
}

.ascend-ai-error a {
    color: var(--ascend-error);
    text-decoration: underline;
}

/* Footer */
.ascend-ai-footer {
    padding: 16px 32px;
    background: var(--ascend-light);
    border-top: 1px solid var(--ascend-border);
    text-align: center;
}

.ascend-ai-footer p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

.ascend-ai-footer a {
    color: var(--ascend-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.ascend-ai-footer a:hover {
    color: var(--ascend-button);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ascend-ai-container {
        margin: 20px 10px;
        border-radius: 12px;
    }
    
    .ascend-ai-header {
        padding: 24px;
    }
    
    .ascend-ai-title {
        font-size: 1.25rem;
    }
    
    .ascend-ai-examples {
        padding: 20px 24px;
    }
    
    .ascend-ai-examples-grid {
        grid-template-columns: 1fr;
    }
    
    .ascend-ai-input-area,
    .ascend-ai-results {
        padding: 24px;
    }
    
    .ascend-ai-button {
        font-size: 1rem;
        padding: 14px 24px;
    }
    
    .ascend-ai-footer {
        padding: 16px 24px;
    }
}

/* Print Styles */
@media print {
    .ascend-ai-header,
    .ascend-ai-examples,
    .ascend-ai-input-area,
    .ascend-ai-loader,
    .ascend-ai-footer {
        display: none;
    }
    
    .ascend-ai-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
