/* Qoomly Global Styles - Modern Apple-Inspired Design */

/* Import Inter font for premium typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* CSS Variables for modern theming */
:root {
    /* Premium color palette - matching logo gradient */
    --qoomly-primary: #F66864;
    --qoomly-primary-dark: #E55A56;
    --qoomly-secondary: #F6B68A;
    --qoomly-accent: #F66864;
    --qoomly-success: #34C759;
    --qoomly-warning: #FF9500;
    
    /* Gradient backgrounds - matching logo */
    --qoomly-gradient-primary: linear-gradient(135deg, #F66864 0%, #F6B68A 100%);
    --qoomly-gradient-secondary: linear-gradient(135deg, #F6B68A 0%, #F66864 100%);
    --qoomly-gradient-hero: linear-gradient(135deg, #F66864 0%, #F6B68A 100%);
    --qoomly-gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    
    /* Glass morphism */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    /* Modern spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 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);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Typography */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;
}

/* Global reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #1a202c;
    line-height: 1.6;
    font-weight: var(--font-weight-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Header styling */
.qoomly-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qoomly-header:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Container styles */
.qoomly-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
    position: relative;
}

/* Header section */
.qoomly-header-section {
    text-align: center;
    margin-bottom: var(--space-3xl);
    padding: var(--space-3xl) 0;
    position: relative;
}

.qoomly-header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--qoomly-gradient-primary);
    border-radius: 2px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); }
}

.qoomly-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: var(--font-weight-black);
    background: var(--qoomly-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-lg);
    line-height: 1.2;
    animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.qoomly-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-xl);
    animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

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

/* Modern card design */
.qoomly-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.qoomly-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.qoomly-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 32px 64px 0 rgba(31, 38, 135, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Section titles */
.qoomly-section-title {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: #1e293b;
    margin-bottom: var(--space-xl);
    position: relative;
    padding-left: var(--space-lg);
}

.qoomly-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: var(--qoomly-gradient-primary);
    border-radius: 2px;
}

.qoomly-subsection-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: #334155;
    margin-bottom: var(--space-lg);
}

/* Content styling */
.qoomly-content {
    line-height: 1.8;
}

.qoomly-text {
    color: #475569;
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

/* Grid layouts */
.qoomly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
}

/* Feature boxes */
.qoomly-feature-box {
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.qoomly-feature-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.qoomly-feature-box:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-xl);
}

.qoomly-feature-title {
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
    color: #1e293b;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Lists */
.qoomly-list {
    list-style: none;
    padding: 0;
}

.qoomly-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.qoomly-list li:hover {
    padding-left: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

/* Links */
.qoomly-link {
    color: var(--qoomly-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: all 0.2s ease;
    position: relative;
}

.qoomly-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--qoomly-gradient-primary);
    transition: width 0.3s ease;
}

.qoomly-link:hover::after {
    width: 100%;
}

.qoomly-link:hover {
    color: var(--qoomly-primary-dark);
}

/* Info box */
.qoomly-info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    backdrop-filter: blur(8px);
}

/* Buttons */
.qoomly-button {
    background: var(--qoomly-gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.qoomly-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 ease;
}

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

.qoomly-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Tables */
.qoomly-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.qoomly-table th,
.qoomly-table td {
    padding: var(--space-lg);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.qoomly-table th {
    background: rgba(255, 255, 255, 0.8);
    font-weight: var(--font-weight-semibold);
    color: #1e293b;
}

.qoomly-table tr:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    .qoomly-container {
        padding: var(--space-lg);
    }
    
    .qoomly-card {
        padding: var(--space-lg);
    }
    
    .qoomly-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .qoomly-title {
        font-size: 2.5rem;
    }
}

/* Loading animation */
.qoomly-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--qoomly-primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Scroll animations */
.qoomly-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.qoomly-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating elements */
.qoomly-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

/* Status badges */
.qoomly-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.qoomly-badge-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--qoomly-success);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.qoomly-badge-warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--qoomly-warning);
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.qoomly-badge-error {
    background: rgba(255, 59, 48, 0.1);
    color: var(--qoomly-accent);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

/* Neural Network Animation */
.neural-network {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.neural-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--qoomly-primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: pulse-node 3s ease-in-out infinite;
}

.neural-node.large {
    width: 12px;
    height: 12px;
    background: var(--qoomly-secondary);
    opacity: 0.8;
}

.neural-node.small {
    width: 4px;
    height: 4px;
    opacity: 0.4;
}

.neural-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--qoomly-primary) 20%, 
        var(--qoomly-secondary) 50%, 
        var(--qoomly-primary) 80%, 
        transparent 100%);
    opacity: 0.3;
    animation: pulse-connection 4s ease-in-out infinite;
    transform-origin: left center;
}

.neural-connection.active {
    animation: data-flow 2s linear infinite;
    opacity: 0.6;
}

@keyframes pulse-node {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.6;
        box-shadow: 0 0 0 0 rgba(246, 104, 100, 0.4);
    }
    50% { 
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 0 10px rgba(246, 104, 100, 0);
    }
}

@keyframes pulse-connection {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

@keyframes data-flow {
    0% {
        background: linear-gradient(90deg, 
            var(--qoomly-primary) 0%, 
            transparent 10%, 
            transparent 90%, 
            transparent 100%);
    }
    50% {
        background: linear-gradient(90deg, 
            transparent 0%, 
            transparent 40%, 
            var(--qoomly-primary) 50%, 
            var(--qoomly-secondary) 60%, 
            transparent 90%, 
            transparent 100%);
    }
    100% {
        background: linear-gradient(90deg, 
            transparent 0%, 
            transparent 90%, 
            var(--qoomly-secondary) 100%);
    }
}

/* Floating particles for AI effect */
.ai-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--qoomly-primary);
    border-radius: 50%;
    opacity: 0.4;
    animation: float-particle 8s linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}