/* ============================================================ Codle AI Platform — Premium Dark Theme Full glassmorphism + neon glow + smooth animations ============================================================ */ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap'); /* ── Reset & Base ─────────────────────────────────────────── */ *, *::before, *::after { box-sizing: border-box; } :root { --bg-deep: #03000a; --bg-surface: rgba(13, 10, 25, 0.6); --bg-card: rgba(18, 12, 38, 0.65); --bg-glass: rgba(255, 255, 255, 0.03); --bg-glass-hover: rgba(255, 255, 255, 0.08); --border: rgba(139, 92, 246, 0.15); --border-bright: rgba(236, 72, 153, 0.45); --indigo: #8b5cf6; --indigo-bright: #a78bfa; --indigo-dim: #6d28d9; --violet: #f472b6; --cyan: #06b6d4; --emerald: #10b981; --rose: #ef4444; --amber: #f59e0b; --text-primary: #f8fafc; --text-secondary: #cbd5e1; --text-muted: #64748b; --glow-indigo: 0 0 25px rgba(139, 92, 246, 0.4), 0 0 50px rgba(139, 92, 246, 0.15); --glow-pink: 0 0 25px rgba(236, 72, 153, 0.4); --glow-cyan: 0 0 25px rgba(6, 182, 212, 0.4); --radius-sm: 8px; --radius-md: 12px; --radius-lg: 18px; --radius-xl: 24px; --transition: 0.22s cubic-bezier(0.4,0,0.2,1); } body { background: var(--bg-deep) !important; font-family: 'Inter', system-ui, sans-serif !important; color: var(--text-primary) !important; overflow-x: hidden; } /* ── Gradio container override ───────────────────────────── */ .gradio-container { max-width: 1440px !important; margin: 0 auto !important; padding: 0 !important; background: transparent !important; font-family: 'Inter', system-ui, sans-serif !important; } .gradio-container > .main { padding: 0 24px 48px !important; } /* ── Particle canvas (injected by JS) ───────────────────── */ #codle-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; } /* ── Header ──────────────────────────────────────────────── */ #codle-header { position: relative; background: rgba(6,8,16,0.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 14px 32px; display: flex; align-items: center; gap: 12px; margin-bottom: 32px; box-shadow: 0 1px 0 rgba(99,102,241,0.12); z-index: 10; } #codle-logo-wrap { display: flex; align-items: center; justify-content: center; flex-shrink: 0; } #codle-title { background: linear-gradient(90deg, #a78bfa, #f472b6, #06b6d4) !important; -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; font-weight: 800 !important; letter-spacing: 3px !important; animation: text-glow 4s ease-in-out infinite alternate !important; } @keyframes text-glow { from { filter: drop-shadow(0 0 2px rgba(139, 92, 246, 0.25)); } to { filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.65)); } } /* Remove old subtitle and badges — no longer rendered */ #codle-subtitle, #codle-badges, .codle-badge { display: none !important; } /* ── Glass card base ─────────────────────────────────────── */ .glass-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); } .glass-card:hover { border-color: var(--border-bright); box-shadow: 0 8px 32px rgba(0,0,0,0.4), var(--glow-indigo); transform: translateY(-2px); } /* ── Section labels ──────────────────────────────────────── */ .section-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--indigo-bright); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; } .section-label::before { content: ''; display: inline-block; width: 3px; height: 14px; background: linear-gradient(180deg, var(--indigo), var(--cyan)); border-radius: 2px; } /* ── Tab nav (override Gradio) ───────────────────────────── */ .tab-nav { background: rgba(6,8,16,0.8) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-md) !important; padding: 4px !important; margin-bottom: 20px !important; backdrop-filter: blur(12px) !important; } .tab-nav button { background: transparent !important; border: none !important; color: var(--text-secondary) !important; font-weight: 500 !important; font-size: 0.88rem !important; border-radius: var(--radius-sm) !important; padding: 8px 18px !important; transition: all var(--transition) !important; cursor: pointer !important; } .tab-nav button:hover { background: var(--bg-glass-hover) !important; color: var(--text-primary) !important; } .tab-nav button.selected { background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(56,189,248,0.15)) !important; color: var(--indigo-bright) !important; box-shadow: 0 0 12px rgba(99,102,241,0.2) !important; } /* ── Buttons ─────────────────────────────────────────────── */ .btn-primary { background: linear-gradient(270deg, #8b5cf6, #ec4899, #06b6d4) !important; background-size: 600% 600% !important; animation: gradient-shift 8s ease infinite !important; color: #fff !important; border: none !important; font-weight: 700 !important; font-size: 0.95rem !important; padding: 11px 24px !important; border-radius: var(--radius-sm) !important; cursor: pointer !important; transition: transform var(--transition), box-shadow var(--transition), filter var(--transition) !important; box-shadow: 0 4px 18px rgba(139,92,246,0.5) !important; position: relative !important; overflow: hidden !important; } @keyframes gradient-shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.12)); opacity: 0; transition: opacity var(--transition); } .btn-primary:hover { transform: translateY(-2px) scale(1.01) !important; box-shadow: 0 8px 24px rgba(79,70,229,0.65) !important; filter: brightness(1.08) !important; } .btn-primary:hover::after { opacity: 1; } .btn-primary:active { transform: translateY(0) scale(0.99) !important; } .btn-glass { background: var(--bg-glass) !important; border: 1px solid var(--border) !important; color: var(--text-secondary) !important; font-weight: 500 !important; font-size: 0.88rem !important; padding: 9px 18px !important; border-radius: var(--radius-sm) !important; cursor: pointer !important; transition: all var(--transition) !important; backdrop-filter: blur(8px) !important; } .btn-glass:hover { background: var(--bg-glass-hover) !important; border-color: var(--border-bright) !important; color: var(--text-primary) !important; box-shadow: 0 0 12px rgba(99,102,241,0.15) !important; } /* ── Inputs & Dropdowns (Gradio override) ────────────────── */ .gr-input, input[type=text], select, textarea, .block.svelte-1gfkfd6, .wrap.svelte-1gfkfd6 { background: rgba(13,17,23,0.9) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important; color: var(--text-primary) !important; transition: border-color var(--transition), box-shadow var(--transition) !important; font-family: 'Inter', sans-serif !important; } .gr-input:focus, input:focus, select:focus, textarea:focus { border-color: var(--indigo) !important; box-shadow: 0 0 0 2px rgba(99,102,241,0.14) !important; outline: none !important; } /* ── Code editor ─────────────────────────────────────────── */ .code-editor-wrap .cm-editor { background: #060c18 !important; border: 1px solid var(--border) !important; border-radius: var(--radius-md) !important; font-family: 'Fira Code', monospace !important; font-size: 0.88rem !important; } .code-editor-wrap .cm-editor.cm-focused { box-shadow: 0 0 0 2px rgba(99,102,241,0.3) !important; } /* ── Output markdown ─────────────────────────────────────── */ .output-panel { background: rgba(6,8,16,0.9) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-lg) !important; padding: 24px !important; min-height: 0; /* removed forced min-height — content drives height */ color: var(--text-primary) !important; line-height: 1.75 !important; font-size: 0.93rem !important; } /* Explanation tab still benefits from a comfortable minimum */ #tab-explain .output-panel { min-height: 280px; } .output-panel h1, .output-panel h2, .output-panel h3 { color: var(--indigo-bright) !important; border-bottom: 1px solid var(--border) !important; padding-bottom: 6px !important; margin-bottom: 12px !important; } .output-panel code { background: rgba(30,41,59,0.8) !important; color: var(--cyan) !important; padding: 2px 7px !important; border-radius: 5px !important; font-family: 'Fira Code', monospace !important; font-size: 0.85em !important; } .output-panel pre { background: rgba(4,6,14,0.95) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important; padding: 14px !important; overflow-x: auto; } .output-panel pre code { background: transparent !important; color: #e2e8f0 !important; padding: 0 !important; } .output-panel ul, .output-panel ol { padding-left: 22px !important; } .output-panel li { margin-bottom: 6px !important; } /* ── Skeleton loader ─────────────────────────────────────── */ .skeleton-block { background: linear-gradient(90deg, rgba(30,41,59,0.5) 25%, rgba(51,65,85,0.6) 50%, rgba(30,41,59,0.5) 75%); background-size: 200% 100%; border-radius: var(--radius-sm); animation: skeleton-shimmer 1.6s ease-in-out infinite; } @keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } /* ── Toast notifications ─────────────────────────────────── */ #codle-toast-container { position: fixed; bottom: 28px; right: 28px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; } .codle-toast { background: rgba(13,17,23,0.96); border: 1px solid var(--border-bright); border-radius: var(--radius-md); padding: 12px 20px; color: var(--text-primary); font-size: 0.87rem; font-weight: 500; backdrop-filter: blur(16px); box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--glow-indigo); pointer-events: auto; animation: toast-in 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards; display: flex; align-items: center; gap: 10px; max-width: 340px; } .codle-toast.toast-success { border-color: rgba(52,211,153,0.45); } .codle-toast.toast-error { border-color: rgba(248,113,113,0.45); } .codle-toast.toast-info { border-color: rgba(99,102,241,0.45); } @keyframes toast-in { from { opacity:0; transform:translateX(40px) scale(0.9); } to { opacity:1; transform:translateX(0) scale(1); } } @keyframes toast-out { from { opacity:1; transform:translateX(0) scale(1); } to { opacity:0; transform:translateX(40px) scale(0.9); } } /* ── Complexity dashboard ────────────────────────────────── */ #complexity-dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; } .complexity-card { background: var(--bg-card) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-md) !important; padding: 14px 12px !important; text-align: center; transition: all var(--transition) !important; cursor: default; } .complexity-card:hover { border-color: var(--border-bright) !important; box-shadow: 0 6px 20px rgba(139,92,246,0.28), var(--glow-indigo) !important; transform: translateY(-4px) scale(1.02) !important; } .complexity-card .badge-O { font-family: 'Fira Code', monospace; font-size: 1.1rem; font-weight: 700; color: var(--indigo-bright); display: block; margin-bottom: 4px; } .complexity-card .badge-label { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.8px; } /* Complexity class color mapping */ .complexity-card.class-constant .badge-O { color: var(--emerald); } .complexity-card.class-log .badge-O { color: var(--cyan); } .complexity-card.class-linear .badge-O { color: var(--indigo-bright); } .complexity-card.class-linearithmic .badge-O { color: var(--violet); } .complexity-card.class-quadratic .badge-O { color: var(--amber); } .complexity-card.class-exponential .badge-O { color: var(--rose); } /* ── Complexity chart — only visible after analysis ──────── */ #complexity-chart-wrap { position: relative; width: 100%; height: 0; border: none; margin: 0; padding: 0; overflow: hidden; background: rgba(6,8,16,0.9); border-radius: var(--radius-md); transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), border 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important; } /* JS adds .has-chart to reveal it */ #complexity-chart-wrap.has-chart { height: 220px !important; border: 1px solid var(--border) !important; margin-top: 16px !important; margin-bottom: 16px !important; } #complexity-chart-wrap canvas { display: block; width: 100% !important; height: 100% !important; } /* ── Complexity output panel — no wasted min-height ─────── */ #cx-output-wrap .output-panel, .cx-report-panel { min-height: 0 !important; } /* ── Complexity placeholder text ─────────────────────────── */ .cx-placeholder { color: rgba(148,163,184,0.45); text-align: center; padding: 28px 16px; font-size: 0.85rem; line-height: 1.6; } /* ── Execution flow canvas ───────────────────────────────── */ #flow-canvas-container { position: relative; width: 100%; background: radial-gradient(ellipse at 30% 20%, rgba(99,102,241,0.08) 0%, transparent 60%), radial-gradient(ellipse at 70% 80%, rgba(34,211,238,0.06) 0%, transparent 60%), rgba(6,8,16,0.95); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; min-height: 480px; } #flow-canvas-container canvas { display: block; width: 100% !important; height: 480px !important; } .flow-controls { display: flex; gap: 8px; padding: 12px 16px; background: rgba(6,8,16,0.8); border-top: 1px solid var(--border); align-items: center; flex-wrap: wrap; } .flow-controls label { color: var(--text-secondary); font-size: 0.8rem; } .flow-speed-slider { -webkit-appearance: none; width: 100px; height: 4px; background: linear-gradient(90deg, var(--indigo) var(--val, 50%), rgba(30,41,59,0.8) var(--val, 50%)); border-radius: 2px; outline: none; cursor: pointer; } .flow-speed-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--indigo-bright); box-shadow: 0 0 8px var(--indigo); cursor: pointer; } /* ── Code translator split view ──────────────────────────── */ .translator-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 768px) { .translator-split { grid-template-columns: 1fr; } } .split-pane-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 6px 12px; border-radius: var(--radius-sm); margin-bottom: 8px; display: inline-block; } .split-pane-label.original { background: rgba(99,102,241,0.15); color: #a5b4fc; } .split-pane-label.converted { background: rgba(34,211,238,0.12); color: #67e8f9; } /* ── Export toolbar ──────────────────────────────────────── */ .export-toolbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border); margin-top: 12px; } /* ── Command palette ─────────────────────────────────────── */ #codle-cmd-overlay { position: fixed; inset: 0; background: rgba(4,6,14,0.85); z-index: 10000; display: none; align-items: flex-start; justify-content: center; padding-top: 120px; backdrop-filter: blur(8px); } #codle-cmd-overlay.open { display: flex; } #codle-cmd-box { background: rgba(13,17,23,0.98); border: 1px solid var(--border-bright); border-radius: var(--radius-lg); width: 540px; max-width: 90vw; box-shadow: 0 24px 80px rgba(0,0,0,0.7), var(--glow-indigo); overflow: hidden; animation: cmd-in 0.2s cubic-bezier(0.34,1.56,0.64,1); } @keyframes cmd-in { from { opacity:0; transform:scale(0.92) translateY(-16px); } to { opacity:1; transform:scale(1) translateY(0); } } #codle-cmd-input { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--border); padding: 16px 20px; color: var(--text-primary); font-size: 1rem; font-family: 'Inter', sans-serif; outline: none; } .cmd-item { padding: 10px 20px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: background var(--transition); font-size: 0.88rem; } .cmd-item:hover, .cmd-item.selected { background: var(--bg-glass-hover); } .cmd-item .cmd-icon { font-size: 1.1rem; width: 22px; text-align: center; } .cmd-item .cmd-label { color: var(--text-primary); } .cmd-item .cmd-shortcut { margin-left: auto; font-size: 0.72rem; color: var(--text-muted); background: rgba(30,41,59,0.6); padding: 2px 7px; border-radius: 4px; font-family: 'Fira Code', monospace; } /* ── Kbd hint strip ──────────────────────────────────────── */ #codle-kbd-strip { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.72rem; color: var(--text-muted); padding: 10px 0; border-top: 1px solid rgba(30,41,59,0.4); margin-top: 8px; } kbd { background: rgba(30,41,59,0.7); border: 1px solid rgba(51,65,85,0.6); border-radius: 4px; padding: 1px 6px; font-family: 'Fira Code', monospace; font-size: 0.72rem; color: var(--text-secondary); } /* Duplicate complexity chart wrap styling removed to support collapsible layout */ /* ── Gradio label override ───────────────────────────────── */ label.svelte-1b6s6s, .svelte-1gfkfd6 > label { color: var(--text-secondary) !important; font-size: 0.82rem !important; font-weight: 500 !important; letter-spacing: 0.3px !important; } /* ── Scrollbar ───────────────────────────────────────────── */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.55); } /* ── Checkbox override ───────────────────────────────────── */ input[type=checkbox] { accent-color: var(--indigo) !important; width: 16px !important; height: 16px !important; } /* ── File download button ────────────────────────────────── */ .gr-file-preview { background: var(--bg-card) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important; color: var(--text-primary) !important; } /* ── Fade-in utility ─────────────────────────────────────── */ .fade-in { animation: fadeIn 0.4s ease forwards; } @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } /* ── Responsive ──────────────────────────────────────────── */ @media (max-width: 900px) { #codle-header { padding: 14px 18px; } #codle-title { font-size: 1.35rem; } .gradio-container > .main { padding: 0 12px 32px !important; } } @media (max-width: 600px) { #codle-badges { display: none; } .flow-controls { flex-direction: column; align-items: flex-start; } } /* Hide Gradio footer (Use via API, Built with Gradio, Settings) */ footer, .footer, .built-with-gradio, [class*="footer"] { display: none !important; } /* Glass card styling for layouts */ .glass-card { background: var(--bg-card) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-lg) !important; backdrop-filter: blur(16px) !important; -webkit-backdrop-filter: blur(16px) !important; padding: 24px !important; margin-bottom: 24px !important; transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition) !important; } .glass-card:hover { border-color: var(--border-bright) !important; box-shadow: 0 8px 32px rgba(0,0,0,0.4), var(--glow-indigo) !important; transform: translateY(-2px) !important; } /* Premium styling for Gradio Examples & Datasets */ .gr-samples, .gr-examples, div[class*="examples-container"] { background: transparent !important; border: none !important; margin-top: 16px !important; } .gr-samples table, .gr-examples table, table[class*="table"] { background: var(--bg-card) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-md) !important; overflow: hidden !important; border-collapse: separate !important; border-spacing: 0 !important; width: 100% !important; box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important; } .gr-samples th, .gr-examples th, th[class*="table-header"] { background: rgba(6,8,16,0.92) !important; color: var(--indigo-bright) !important; font-weight: 700 !important; font-size: 0.8rem !important; text-transform: uppercase !important; letter-spacing: 1.2px !important; padding: 14px 20px !important; border-bottom: 1px solid var(--border) !important; text-align: left !important; } .gr-samples td, .gr-examples td, td[class*="table-cell"] { padding: 14px 20px !important; color: var(--text-secondary) !important; border-bottom: 1px solid rgba(99,102,241,0.08) !important; background: rgba(13,17,23,0.3) !important; transition: all var(--transition) !important; font-size: 0.85rem !important; } .gr-samples tr:last-child td, .gr-examples tr:last-child td { border-bottom: none !important; } .gr-samples tr:hover td, .gr-examples tr:hover td { background: rgba(99,102,241,0.06) !important; color: var(--text-primary) !important; cursor: pointer !important; } /* Glowing outline for inputs on focus */ .gr-input:focus, input:focus, select:focus, textarea:focus, .cm-editor.cm-focused { border-color: var(--indigo-bright) !important; box-shadow: 0 0 15px rgba(99,102,241,0.38) !important; }