/* CSS Custom Properties (Variables) for consistent theming */
:root {
    /* Color palette */
    --primary-bg: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
    --canvas-bg: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    --panel-bg: rgba(0, 0, 0, 0.55);
    --text-primary: #f5f5f5;
    --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    
    /* Button colors */
    --button-bg: rgba(0, 0, 0, 0.3);
    --button-border: rgba(255, 255, 255, 0.15);
    --button-hover-border: rgba(255, 255, 255, 0.25);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border radius */
    --radius-sm: 5px;
    --radius-md: 6px;
    --radius-lg: 8px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.3s ease-in-out;
    --transition-slow: 0.5s ease;
    
    /* Z-index layers */
    --z-tooltip: 10;
    --z-modal: 20;
    --z-options: 29;
    --z-overlay: 40;
}

/* Utility classes for common patterns */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible {
    outline: 2px solid #c084fc;
    outline-offset: 2px;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

/* Flex utilities */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Glass effect utility */
.glass-effect {
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
}

/* Common shadow utilities */
.shadow-soft {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.shadow-medium {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.shadow-hard {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* Animation utilities */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -1px, 0);
    }
}