@import "tailwindcss"; @import "tw-animate-css"; @custom-variant dark (&:is(.dark *)); @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); --font-sans: var(--font-inter-sans); --font-mono: var(--font-ptSans-mono); --color-sidebar-ring: var(--sidebar-ring); --color-sidebar-border: var(--sidebar-border); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-accent: var(--sidebar-accent); --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); --color-sidebar-primary: var(--sidebar-primary); --color-sidebar-foreground: var(--sidebar-foreground); --color-sidebar: var(--sidebar); --color-chart-5: var(--chart-5); --color-chart-4: var(--chart-4); --color-chart-3: var(--chart-3); --color-chart-2: var(--chart-2); --color-chart-1: var(--chart-1); --color-ring: var(--ring); --color-input: var(--input); --color-border: var(--border); --color-destructive: var(--destructive); --color-accent-foreground: var(--accent-foreground); --color-accent: var(--accent); --color-muted-foreground: var(--muted-foreground); --color-muted: var(--muted); --color-secondary-foreground: var(--secondary-foreground); --color-secondary: var(--secondary); --color-primary-foreground: var(--primary-foreground); --color-primary: var(--primary); --color-popover-foreground: var(--popover-foreground); --color-popover: var(--popover); --color-card-foreground: var(--card-foreground); --color-card: var(--card); --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); } :root { --radius: 0.625rem; --background: oklch(1 0 0); --foreground: oklch(0.145 0 0); --card: oklch(1 0 0); --card-foreground: oklch(0.145 0 0); --popover: oklch(1 0 0); --popover-foreground: oklch(0.145 0 0); --primary: oklch(0.205 0 0); --primary-foreground: oklch(0.985 0 0); --secondary: oklch(0.97 0 0); --secondary-foreground: oklch(0.205 0 0); --muted: oklch(0.97 0 0); --muted-foreground: oklch(0.556 0 0); --accent: oklch(0.97 0 0); --accent-foreground: oklch(0.205 0 0); --destructive: oklch(0.577 0.245 27.325); --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); --chart-1: oklch(0.646 0.222 41.116); --chart-2: oklch(0.6 0.118 184.704); --chart-3: oklch(0.398 0.07 227.392); --chart-4: oklch(0.828 0.189 84.429); --chart-5: oklch(0.769 0.188 70.08); --sidebar: oklch(0.985 0 0); --sidebar-foreground: oklch(0.145 0 0); --sidebar-primary: oklch(0.205 0 0); --sidebar-primary-foreground: oklch(0.985 0 0); --sidebar-accent: oklch(0.97 0 0); --sidebar-accent-foreground: oklch(0.205 0 0); --sidebar-border: oklch(0.922 0 0); --sidebar-ring: oklch(0.708 0 0); } .dark { --background: oklch(0.145 0 0); --foreground: oklch(0.985 0 0); --card: oklch(0.205 0 0); --card-foreground: oklch(0.985 0 0); --popover: oklch(0.205 0 0); --popover-foreground: oklch(0.985 0 0); --primary: oklch(0.922 0 0); --primary-foreground: oklch(0.205 0 0); --secondary: oklch(0.269 0 0); --secondary-foreground: oklch(0.985 0 0); --muted: oklch(0.269 0 0); --muted-foreground: oklch(0.708 0 0); --accent: oklch(0.269 0 0); --accent-foreground: oklch(0.985 0 0); --destructive: oklch(0.704 0.191 22.216); --border: oklch(1 0 0 / 10%); --input: oklch(1 0 0 / 15%); --ring: oklch(0.556 0 0); --chart-1: oklch(0.488 0.243 264.376); --chart-2: oklch(0.696 0.17 162.48); --chart-3: oklch(0.769 0.188 70.08); --chart-4: oklch(0.627 0.265 303.9); --chart-5: oklch(0.645 0.246 16.439); --sidebar: oklch(0.205 0 0); --sidebar-foreground: oklch(0.985 0 0); --sidebar-primary: oklch(0.488 0.243 264.376); --sidebar-primary-foreground: oklch(0.985 0 0); --sidebar-accent: oklch(0.269 0 0); --sidebar-accent-foreground: oklch(0.985 0 0); --sidebar-border: oklch(1 0 0 / 10%); --sidebar-ring: oklch(0.556 0 0); } @layer base { * { @apply border-border outline-ring/50; } body { @apply bg-background text-foreground; } html { @apply scroll-smooth; } } .background__noisy { @apply bg-blend-normal pointer-events-none opacity-90; background-size: 25ww auto; background-image: url("/background_noisy.webp"); @apply fixed w-screen h-screen -z-1 top-0 left-0; } .monaco-editor .margin { @apply !bg-neutral-900; } .monaco-editor .monaco-editor-background { @apply !bg-neutral-900; } /* 🚀 BULLETPROOF ZERO-FLASH PREVIEW SYSTEM */ /* Main preview iframe with anti-flash protection */ #preview-iframe { /* Bulletproof anti-flash transitions */ transition: opacity 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Prevent any flash with guaranteed white background */ background-color: #ffffff !important; background-image: none !important; /* Hardware acceleration for ultra-smooth performance */ will-change: opacity; transform: translateZ(0); backface-visibility: hidden; /* Ensure immediate visibility */ opacity: 1; /* Smooth scrolling for content updates */ scroll-behavior: smooth; /* Prevent layout shifts */ min-height: 100%; /* Z-index management */ z-index: 10; } /* Loading state - fade in smoothly */ #preview-iframe.loading { opacity: 0.7; transition: opacity 150ms ease-out; } /* Enhanced container for smooth updates */ .smooth-preview-container { /* Prevent layout jumps and overflow flashes */ overflow: hidden; position: relative; /* Ensure smooth transitions */ will-change: contents; /* Hardware acceleration */ transform: translateZ(0); } /* Support for smooth element transitions within iframes */ .smooth-element-transition { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); will-change: opacity, transform; } .smooth-content-update { animation: smoothContentPulse 0.4s ease-in-out; } @keyframes smoothContentPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.01); opacity: 0.95; } } /* Ultra-smooth fade-in animation for new content with anti-flash */ @keyframes ultraSmoothFadeIn { 0% { opacity: 0; transform: translateY(2px) scale(0.999) translateZ(0); filter: blur(0.5px); } 20% { opacity: 0.7; transform: translateY(1px) scale(0.9995) translateZ(0); filter: blur(0.3px); } 100% { opacity: 1; transform: translateY(0) scale(1) translateZ(0); filter: blur(0px); } } .preview-fade-in { animation: ultraSmoothFadeIn 800ms cubic-bezier(0.23, 1, 0.32, 1) forwards; /* Ensure content is visible during animation */ opacity: 1; } /* Subtle pulse animation for AI working state - ultra smooth */ @keyframes ultraSmoothPulse { 0%, 100% { opacity: 1; transform: translateZ(0); } 50% { opacity: 0.85; transform: scale(0.999) translateZ(0); } } .smooth-pulse { animation: ultraSmoothPulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite; will-change: opacity, transform; } /* Enhanced reduced motion support */ @media (prefers-reduced-motion: reduce) { #preview-iframe { transition: opacity 100ms ease; transform: none !important; filter: none !important; will-change: auto; } .preview-fade-in { animation: none; opacity: 1 !important; transform: none !important; filter: none !important; } .smooth-pulse { animation: none; opacity: 0.9; transform: none !important; } } .monaco-editor .line-numbers { @apply !text-neutral-500; } .matched-line { @apply bg-sky-500/30; } /* 🎨 ENHANCED IFRAME CONTENT TRANSITIONS */ /* Global styles that will be injected into iframe content */ .iframe-smooth-transitions * { /* Smooth transitions for all content changes */ transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1), color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1) !important; /* Hardware acceleration */ will-change: opacity, transform, background-color; transform: translateZ(0); } /* Smooth element entrance animation */ .element-entering { opacity: 0 !important; transform: translateY(5px) scale(0.99) translateZ(0) !important; transition: opacity 300ms cubic-bezier(0.34, 1.56, 0.64, 1), transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1) !important; } .element-entering.entered { opacity: 1 !important; transform: translateY(0) scale(1) translateZ(0) !important; } /* Smooth element exit animation */ .element-leaving { opacity: 1 !important; transform: translateY(0) scale(1) translateZ(0) !important; transition: opacity 250ms cubic-bezier(0.4, 0, 1, 1), transform 250ms cubic-bezier(0.4, 0, 1, 1) !important; } .element-leaving.left { opacity: 0 !important; transform: translateY(-5px) scale(0.98) translateZ(0) !important; } /* Content change highlight effect */ .content-changed { animation: contentHighlight 400ms cubic-bezier(0.4, 0, 0.2, 1) !important; transform: translateZ(0); } @keyframes contentHighlight { 0%, 100% { background-color: transparent !important; box-shadow: none !important; } 30%, 70% { background-color: rgba(59, 130, 246, 0.08) !important; box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1) !important; } } /* Smooth morphing indicator */ .morphing-element { position: relative; } .morphing-element::before { content: ''; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px; background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent ); border-radius: 3px; opacity: 0; animation: morphingGlow 600ms ease-out; pointer-events: none; z-index: 1000; } @keyframes morphingGlow { 0% { opacity: 0; transform: translateX(-100%); } 50% { opacity: 1; transform: translateX(0); } 100% { opacity: 0; transform: translateX(100%); } } /* Ultra-smooth text content updates */ .text-morphing { transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1) !important; } .text-morphing.changing { opacity: 0.7; transform: translateY(1px) translateZ(0); } /* ======================================== SMOOTH PREVIEW TRANSITIONS ======================================== */ /* Basic iframe transition for content changes */ iframe { transition: opacity 0.3s ease-in-out, transform 0.2s ease-out; will-change: opacity; } /* Smooth loading state */ .preview-updating { opacity: 0.8; transition: opacity 0.2s ease-in-out; } /* Prevent flash during iframe content updates */ #preview-iframe-1, #preview-iframe-2 { background: white; transition: opacity 0.2s ease-in-out; } /* Loading indicator for preview updates */ .preview-loading-indicator { transition: opacity 0.2s ease-in-out; } /* Hardware acceleration for smooth transitions */ .preview-container { transform: translateZ(0); will-change: transform; } /* Prevent content jump during updates */ .preview-iframe-wrapper { position: relative; overflow: hidden; }