/* ===== CSS Custom Properties ===== */
:root {
    /* Modern Clean Palette inspired by auralyticsai.com */
    --primary: 236 72% 79%; /* #A5B4FC */
    --primary-dark: 238 83% 67%; /* #818CF8 */
    --primary-light: 236 93% 94%; /* #EEF2FF */
    
    /* Secondary Colors */
    --secondary: 251 91% 95%; /* #F1F5F9 */
    --accent: 14 83% 53%; /* #EA580C */
    --success: 142 76% 36%; /* #10B981 */
    --warning: 43 96% 56%; /* #F59E0B */
    --danger: 0 84% 60%; /* #EF4444 */
    
    /* Neutral Colors - Clean White Theme */
    --background: 0 0% 100%; /* #FFFFFF */
    --surface: 210 20% 98%; /* #F8FAFC */
    --surface-light: 220 14% 96%; /* #F1F5F9 */
    --muted: 220 13% 91%; /* #E2E8F0 */
    --border: 220 13% 91%; /* #E2E8F0 */
    
    /* Text Colors */
    --text-primary: 222 84% 5%; /* #0F172A */
    --text-secondary: 215 25% 27%; /* #334155 */
    --text-muted: 215 16% 47%; /* #64748B */
    --text-light: 210 40% 98%; /* #F8FAFC */
    
    /* Modern Clean Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #a78bfa 0%, #c084fc 100%);
    --gradient-hero: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(168, 139, 250, 0.1) 100%);
    --gradient-card: linear-gradient(145deg, rgba(102, 126, 234, 0.05) 0%, rgba(168, 139, 250, 0.05) 100%);
    --gradient-button: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --container-padding: 1.5rem;
    --section-padding: 5rem 0;
    
    /* Animation */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --animation-duration: 0.3s;
}

/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--text-primary));
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.main-content {
    padding-top: 76px; /* Account for fixed navbar */
    min-height: calc(100vh - 76px);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: hsl(var(--text-primary));
}

.text-gradient {
    background: var(--gradient-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: hsl(var(--text-secondary));
}

/* ===== Navigation ===== */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid hsl(var(--border));
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: hsl(var(--text-primary)) !important;
    background: var(--gradient-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    color: hsl(var(--text-secondary)) !important;
}

.nav-link:hover {
    color: hsl(var(--primary-dark)) !important;
    transform: translateY(-1px);
}

.badge {
    font-weight: 600;
    border-radius: 6px;
}

/* ===== Buttons ===== */
.btn {
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-button);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-outline-primary {
    border: 2px solid hsl(var(--primary));
    color: hsl(var(--primary));
    background: transparent;
}

.btn-outline-primary:hover {
    background: hsl(var(--primary));
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
}

.card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
    border-color: hsl(var(--primary-dark));
}

.card-header {
    background: hsl(var(--surface));
    border-bottom: 1px solid hsl(var(--border));
    padding: 1.5rem;
    border-radius: 20px 20px 0 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: hsl(var(--surface));
    border-top: 1px solid hsl(var(--border));
    padding: 1.5rem;
    border-radius: 0 0 20px 20px;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: hsl(var(--background));
    color: hsl(var(--text-primary));
    overflow: hidden;
}

.hero-decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-button);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    top: 40%;
    right: 5%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

.hero-badge .badge {
    background: var(--gradient-button);
    color: white;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.25rem;
    color: hsl(var(--text-secondary));
    line-height: 1.6;
}

/* ===== Dashboard Mockup ===== */
.dashboard-mockup {
    background: hsl(var(--background));
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid hsl(var(--border));
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.mockup-header {
    background: hsl(var(--surface));
    border-bottom: 1px solid hsl(var(--border));
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.workflow-item {
    padding: 12px;
    border-radius: 12px;
    background: hsl(var(--surface));
    border: 1px solid hsl(var(--border));
    transition: var(--transition);
}

.workflow-item:hover {
    border-color: hsl(var(--primary-dark));
    transform: translateX(5px);
}

.workflow-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-button);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.running {
    background: #3b82f6;
    animation: pulse 2s infinite;
}

.status-indicator.success {
    background: #10b981;
}

.status-indicator.pending {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    z-index: 1;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.stat-item h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero-visual {
    position: relative;
    z-index: 2;
}

/* ===== Workflow Demo Animation ===== */
.workflow-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.workflow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    min-width: 120px;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.workflow-node.active {
    background: rgba(34, 197, 94, 0.3);
    animation-delay: 0s;
}

.workflow-node.processing {
    background: rgba(59, 130, 246, 0.3);
    animation-delay: 0.5s;
}

.workflow-node.complete {
    background: rgba(16, 185, 129, 0.3);
    animation-delay: 1s;
}

.workflow-node i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.workflow-arrow {
    color: rgba(255, 255, 255, 0.7);
    animation: slideRight 2s infinite;
}

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

@keyframes slideRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* ===== Workflow Cards ===== */
.workflow-card {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition);
    background: hsl(var(--background));
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid hsl(var(--border));
}

.workflow-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
    border-color: hsl(var(--primary-dark));
}

.workflow-card .card-header {
    background: var(--gradient-hero);
    color: hsl(var(--text-primary));
    border: none;
    position: relative;
}

.workflow-price {
    text-align: right;
}

.price-amount {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ===== Feature Cards ===== */
.feature-card {
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border-radius: 12px;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient-button);
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* ===== Pricing Cards ===== */
.pricing-card {
    border: 2px solid hsl(var(--border));
    border-radius: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    border-color: hsl(var(--primary));
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.pricing-card:hover {
    border-color: hsl(var(--primary));
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    background: var(--gradient-button);
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: hsl(var(--primary));
}

.currency {
    font-size: 1.5rem;
    vertical-align: top;
}

.period {
    font-size: 1rem;
    color: hsl(var(--text-secondary));
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.features-list li:last-child {
    border-bottom: none;
}

/* ===== Dashboard Styles ===== */
.dashboard-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.credits-display {
    text-align: center;
}

.credit-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.stat-card {
    background: hsl(var(--surface));
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid hsl(var(--primary));
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ===== Activity Timeline ===== */
.activity-timeline {
    position: relative;
    padding-left: 2rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: hsl(var(--border));
}

.activity-item {
    position: relative;
    margin-bottom: 2rem;
}

.activity-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--surface));
    border: 2px solid hsl(var(--border));
    color: hsl(var(--text-secondary));
}

.activity-marker.status-success {
    background: hsl(var(--success));
    border-color: hsl(var(--success));
    color: white;
}

.activity-marker.status-failed {
    background: hsl(var(--danger));
    border-color: hsl(var(--danger));
    color: white;
}

.activity-content {
    background: hsl(var(--surface));
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

/* ===== Billing Styles ===== */
.billing-header {
    background: var(--gradient-secondary);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.balance-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.credit-package {
    border: 2px solid hsl(var(--border));
    border-radius: 16px;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.credit-package.featured {
    border-color: hsl(var(--primary));
    box-shadow: var(--shadow-lg);
}

.credit-package:hover {
    border-color: hsl(var(--primary));
    box-shadow: var(--shadow-md);
}

.package-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0 0 0 12px;
}

.package-header {
    background: hsl(var(--muted));
    padding: 2rem 1.5rem;
}

.credit-amount {
    font-size: 3rem;
    font-weight: 800;
    color: hsl(var(--primary));
    margin: 1rem 0;
}

.package-body {
    padding: 1.5rem;
}

.price .amount {
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--primary));
}

/* ===== API Keys Styles ===== */
.api-key-display .form-control {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
}

.code-example {
    background: hsl(var(--text-primary));
    color: hsl(var(--text-light));
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.code-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.method-post {
    background: hsl(var(--success));
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.method-get {
    background: hsl(var(--primary));
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.code-content {
    padding: 1rem;
}

.code-content pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ===== Form Styles ===== */
.form-control {
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background: hsl(var(--surface));
}

.form-control:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group-text {
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    color: hsl(var(--text-secondary));
}

/* ===== Auth Styles ===== */
.auth-section {
    background: var(--gradient-hero);
    min-height: 100vh;
    color: white;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    color: hsl(var(--text-primary));
}

.auth-benefits {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.benefit-item {
    text-align: center;
    padding: 1rem;
}

.benefit-item i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ===== Flash Messages ===== */
.flash-messages {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    z-index: 1050;
    padding: 1rem;
}

.flash-messages .alert {
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border: none;
    box-shadow: var(--shadow-md);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .workflow-demo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .pricing-card.featured {
        transform: none;
        margin-bottom: 2rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .activity-timeline {
        padding-left: 1rem;
    }
    
    .activity-marker {
        left: -1.5rem;
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Utility Classes ===== */
.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.text-primary-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-primary {
    border-color: hsl(var(--primary)) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-md);
}

.rounded-custom {
    border-radius: 12px;
}

/* ===== Loading States ===== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--muted));
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--border));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--text-secondary));
}
