/* ========== Consolidated Stitch Design System ========== */

:root {
    --primary: #0d0df2;
    --primary-glow: rgba(13, 13, 242, 0.15);
    --secondary: #06b6d4;
    --success: #10b981;
    --background-light: #f8fafc;
    --background-dark: #0f172a;

    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Base Styles */
body {
    font-family: var(--font-body);
    background-color: var(--background-light);
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

.font-heading {
    font-family: var(--font-heading);
}

.font-mono {
    font-family: var(--font-mono);
}

/* Glassmorphism */
.glass-panel,
.glass-card,
.glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(13, 13, 242, 0.04);
}

.dark .glass-panel {
    background: rgba(16, 16, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Background Effects */
.mesh-gradient,
.aura-mesh {
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 0% 0%, rgba(13, 13, 242, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.05) 0px, transparent 50%);
    position: relative;
}

.grain-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 50;
}

.hyper-gradient {
    background: linear-gradient(135deg, #0d0df2 0%, #06b6d4 100%);
}

.pulse-gradient {
    background: linear-gradient(90deg, #4f46e5, #06b6d4, #4f46e5);
    background-size: 200% 100%;
    animation: gradient-pulse 3s ease infinite;
}

@keyframes gradient-pulse {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Interactive */
.spring-transition {
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.magnetic-button:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
}

.success-shadow {
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

.rotate-180 {
    transform: rotate(180deg);
}

/* Components */
.ide-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.ide-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.ide-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.editor-glow {
    box-shadow: 0 20px 50px -12px rgba(13, 13, 242, 0.08);
}

.spinner-custom {
    border: 2px solid rgba(79, 70, 229, 0.1);
    border-top: 2px solid #4f46e5;
    border-radius: 50%;
    width: 16px;
    height: 16px;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Custom Overrides for Unified Layout */
main {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.section-enter {
    opacity: 0;
    transform: translateY(10px);
}

.section-enter-active {
    opacity: 1;
    transform: translateY(0);
}