/* ========================================================================== Pulpie WebGPU - Modern Dark Sleek Vercel-Inspired Styling Palette: Dark charcoal surfaces, crisp white text, restrained accents. Strict rules: NO gradient text, NO glow accents, full mobile accessibility. ========================================================================== */ :root { --bg-canvas: #0c0d10; --bg-surface: #14161b; --bg-surface-elevated: #1a1c23; --bg-surface-hover: #222530; --bg-input: #101115; --border-subtle: #242732; --border-strong: #333847; --border-focus: #f97316; --text-primary: #f4f4f7; --text-secondary: #9da1b0; --text-muted: #676b7b; --text-inverse: #0c0d10; --accent-orange: #ea580c; --accent-orange-hover: #f97316; --accent-green: #10b981; --accent-red: #ef4444; --accent-amber: #f59e0b; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; --transition-fast: 150ms ease; } *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { font-family: var(--font-sans); background-color: var(--bg-canvas); color: var(--text-primary); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } body { min-height: 100vh; display: flex; flex-direction: column; } /* Layout */ .app-layout { display: flex; flex-direction: column; min-height: 100vh; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } /* Header */ .app-header { border-bottom: 1px solid var(--border-subtle); background-color: var(--bg-canvas); position: sticky; top: 0; z-index: 40; } .header-content { max-width: 1100px; margin: 0 auto; padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; } .brand { display: flex; align-items: center; gap: 0.75rem; } .brand-logo { width: 36px; height: 36px; border-radius: var(--radius-sm); background-color: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; color: var(--accent-orange); flex-shrink: 0; } .brand-title-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; } .brand-name { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; } .badge { font-size: 0.75rem; font-weight: 600; padding: 0.125rem 0.5rem; border-radius: 9999px; font-family: var(--font-mono); } .badge-model { background-color: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); color: var(--text-secondary); } .badge-gpu { background-color: rgba(234, 88, 12, 0.15); border: 1px solid var(--accent-orange); color: var(--accent-orange-hover); } .brand-tagline { font-size: 0.8125rem; color: var(--text-muted); } .header-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; } /* Device Status Pill */ .device-status { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; border-radius: 9999px; background-color: var(--bg-surface); border: 1px solid var(--border-subtle); font-size: 0.8125rem; color: var(--text-secondary); } .status-dot { width: 8px; height: 8px; border-radius: 50%; background-color: var(--text-muted); flex-shrink: 0; } .status-dot.status-ready { background-color: var(--accent-green); } .status-dot.status-warning { background-color: var(--accent-amber); } .status-dot.status-busy { background-color: var(--accent-amber); } .status-dot.status-error { background-color: var(--accent-red); } .badge-wasm { background-color: rgba(56, 189, 248, 0.15); border: 1px solid rgba(56, 189, 248, 0.4); color: #38bdf8; } /* Buttons */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; transition: background-color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast); text-decoration: none; touch-action: manipulation; white-space: nowrap; } .btn:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; } .btn:disabled { opacity: 0.5; cursor: not-allowed; } .btn-primary { background-color: var(--accent-orange); color: #ffffff; border-color: var(--accent-orange); } .btn-primary:hover:not(:disabled) { background-color: var(--accent-orange-hover); border-color: var(--accent-orange-hover); } .btn-secondary { background-color: var(--bg-surface-elevated); border-color: var(--border-subtle); color: var(--text-primary); } .btn-secondary:hover:not(:disabled) { background-color: var(--bg-surface-hover); border-color: var(--border-strong); } .btn-danger { background-color: rgba(239, 68, 68, 0.15); border-color: var(--accent-red); color: var(--accent-red); } .btn-danger:hover:not(:disabled) { background-color: var(--accent-red); color: #ffffff; } .btn-ghost { background: transparent; color: var(--text-secondary); } .btn-ghost:hover { color: var(--text-primary); background-color: var(--bg-surface-hover); } .btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); } .btn-sm { padding: 0.3125rem 0.625rem; font-size: 0.8125rem; } .file-upload-btn { cursor: pointer; } /* Main Container */ .main-content { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; } .app-intro { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.5; } /* Cards */ .card { background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 1.25rem; } /* Model Banner */ .model-banner { border-color: var(--border-strong); background-color: var(--bg-surface-elevated); } .banner-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; } .banner-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); } .banner-desc { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.25rem; } .banner-actions { display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; } /* Progress bar */ .progress-bar-container { display: flex; flex-direction: column; gap: 0.5rem; } .progress-bar-track { height: 8px; background-color: var(--bg-canvas); border-radius: 9999px; overflow: hidden; } .progress-bar-fill { height: 100%; background-color: var(--accent-orange); transition: width 100ms ease-out; } .progress-info { display: flex; justify-content: space-between; font-size: 0.75rem; font-family: var(--font-mono); color: var(--text-muted); } /* Input Card */ .input-header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; } .mode-tabs { display: inline-flex; padding: 0.25rem; background-color: var(--bg-canvas); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); gap: 0.25rem; } .mode-tab { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border-radius: calc(var(--radius-sm) - 2px); font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); background: transparent; border: none; cursor: pointer; transition: color var(--transition-fast), background-color var(--transition-fast); } .mode-tab.active { background-color: var(--bg-surface-elevated); color: var(--text-primary); } .sample-presets { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; } .preset-label { font-size: 0.8125rem; color: var(--text-muted); } .preset-btn { background-color: var(--bg-canvas); border: 1px solid var(--border-subtle); color: var(--text-secondary); padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.75rem; cursor: pointer; transition: var(--transition-fast); } .preset-btn:hover { color: var(--text-primary); border-color: var(--border-strong); background-color: var(--bg-surface-hover); } /* URL Input Form */ .url-input-form { display: flex; gap: 0.75rem; flex-wrap: wrap; } .input-group { flex: 1; min-width: 260px; display: flex; align-items: center; background-color: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 0 0.75rem; transition: border-color var(--transition-fast); } .input-group:focus-within { border-color: var(--border-focus); } .input-prefix { color: var(--text-muted); display: flex; align-items: center; margin-right: 0.5rem; } .input-group input { flex: 1; background: transparent; border: none; color: var(--text-primary); font-size: 0.875rem; padding: 0.625rem 0; outline: none; } .input-group input::placeholder { color: var(--text-muted); } .input-actions { display: flex; align-items: center; gap: 0.25rem; } .btn-input-icon { background: transparent; border: none; color: var(--text-muted); padding: 0.25rem; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; } .btn-input-icon:hover { color: var(--text-primary); } .btn-submit { min-width: 110px; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; } .kbd-hint { font-size: 0.6875rem; font-family: var(--font-mono); background-color: rgba(0, 0, 0, 0.25); padding: 0.125rem 0.3125rem; border-radius: 4px; color: rgba(255, 255, 255, 0.85); } /* Raw HTML View */ .html-input-area { position: relative; width: 100%; } .html-input-area textarea { width: 100%; height: 220px; background-color: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 0.875rem; color: var(--text-primary); font-family: var(--font-mono); font-size: 0.8125rem; resize: vertical; outline: none; line-height: 1.4; } .html-input-area textarea:focus { border-color: var(--border-focus); } .drop-overlay { position: absolute; inset: 0; background-color: rgba(20, 22, 27, 0.92); border: 2px dashed var(--accent-orange); border-radius: var(--radius-sm); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: var(--text-primary); pointer-events: none; } .html-secondary-row { margin-top: 0.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; } .base-url-wrapper { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 260px; font-size: 0.8125rem; color: var(--text-secondary); } .base-url-wrapper input { flex: 1; background-color: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 0.375rem 0.625rem; color: var(--text-primary); font-size: 0.8125rem; outline: none; } .base-url-wrapper input:focus { border-color: var(--border-focus); } .html-action-group { display: flex; align-items: center; gap: 0.5rem; } /* Status Alert */ .status-alert { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.875rem; display: flex; align-items: center; gap: 0.625rem; background-color: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); } .status-alert.error { border-color: var(--accent-red); color: #fca5a5; background-color: rgba(239, 68, 68, 0.1); } .status-alert.info { border-color: var(--accent-orange); color: #fdba74; background-color: rgba(234, 88, 12, 0.1); } /* Results Card */ .results-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 1rem; flex-wrap: wrap; } .results-title { font-size: 1.125rem; font-weight: 600; color: var(--text-primary); } .results-source { font-size: 0.75rem; font-family: var(--font-mono); color: var(--text-muted); word-break: break-all; } .stats-row { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; } .stat-item { display: flex; flex-direction: column; } .stat-label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); } .stat-value { font-size: 0.9375rem; font-weight: 600; font-family: var(--font-mono); color: var(--text-primary); } .stat-highlight { color: var(--accent-green); } /* Output Toolbar */ .output-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; } .output-tabs { display: inline-flex; padding: 0.25rem; background-color: var(--bg-canvas); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); gap: 0.25rem; overflow-x: auto; } .output-tab { background: transparent; border: none; color: var(--text-secondary); font-size: 0.8125rem; font-weight: 600; padding: 0.375rem 0.75rem; border-radius: calc(var(--radius-sm) - 2px); cursor: pointer; white-space: nowrap; transition: var(--transition-fast); } .output-tab.active { background-color: var(--bg-surface-elevated); color: var(--text-primary); } .output-actions { display: flex; align-items: center; gap: 0.5rem; } /* Output Views */ .output-content { background-color: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); min-height: 250px; overflow: hidden; } /* Reader View (Prose) */ .reader-view { padding: 1.5rem; max-width: 820px; margin: 0 auto; color: var(--text-primary); } .reader-view h1, .reader-view h2, .reader-view h3, .reader-view h4 { color: #ffffff; font-weight: 700; margin-top: 1.5em; margin-bottom: 0.5em; line-height: 1.3; } .reader-view h1:first-child { margin-top: 0; } .reader-view p { margin-bottom: 1em; line-height: 1.7; } .reader-view a { color: var(--accent-orange-hover); text-decoration: underline; } .reader-view ul, .reader-view ol { margin-left: 1.5em; margin-bottom: 1em; } .reader-view li { margin-bottom: 0.35em; line-height: 1.6; } .reader-view blockquote { border-left: 3px solid var(--border-strong); padding-left: 1rem; margin: 1em 0; color: var(--text-secondary); font-style: italic; } .reader-view img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 1em 0; border: 1px solid var(--border-subtle); } .reader-view table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.875rem; } .reader-view th, .reader-view td { border: 1px solid var(--border-subtle); padding: 0.5rem 0.75rem; text-align: left; } .reader-view th { background-color: var(--bg-surface-elevated); } /* Monospace Code View */ .code-view { padding: 1.25rem; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.6; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; max-height: 600px; overflow-y: auto; } /* Block Inspector */ .block-inspector-list { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; max-height: 600px; overflow-y: auto; } .inspector-item { border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 0.75rem; background-color: var(--bg-surface); display: flex; flex-direction: column; gap: 0.375rem; } .inspector-item.is-main { border-left: 3px solid var(--accent-green); } .inspector-item.is-other { border-left: 3px solid var(--text-muted); opacity: 0.75; } .inspector-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.75rem; font-family: var(--font-mono); } .inspector-badge { font-weight: 600; padding: 0.125rem 0.375rem; border-radius: 4px; } .inspector-badge.badge-main { background-color: rgba(16, 185, 129, 0.15); color: var(--accent-green); } .inspector-badge.badge-other { background-color: var(--bg-surface-elevated); color: var(--text-muted); } .inspector-code { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); background-color: var(--bg-canvas); padding: 0.5rem; border-radius: 4px; white-space: pre-wrap; word-break: break-all; } /* Modal */ .modal-backdrop { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.75); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 1rem; } .modal-card { background-color: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); max-width: 520px; width: 100%; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; } .modal-header { display: flex; align-items: center; justify-content: space-between; } .modal-header h3 { font-size: 1.125rem; font-weight: 600; color: var(--text-primary); } .modal-body { display: flex; flex-direction: column; gap: 0.75rem; } .cache-info-row { display: flex; justify-content: space-between; font-size: 0.875rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.5rem; } .cache-label { color: var(--text-secondary); } .cache-val { font-family: var(--font-mono); color: var(--text-primary); font-weight: 500; } .modal-help-text { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; margin-top: 0.5rem; } .modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; } /* Footer */ .app-footer { border-top: 1px solid var(--border-subtle); padding: 1.5rem 1.25rem; margin-top: auto; text-align: center; font-size: 0.8125rem; color: var(--text-muted); } .app-footer a { color: var(--text-secondary); text-decoration: underline; } .footer-sub { font-size: 0.75rem; margin-top: 0.25rem; } /* Responsive adjustments */ @media (max-width: 640px) { .header-content { flex-direction: column; align-items: flex-start; } .header-meta { width: 100%; justify-content: space-between; } .input-header-row { flex-direction: column; align-items: flex-start; } .sample-presets { width: 100%; } .url-input-form { flex-direction: column; } .btn-submit { width: 100%; } .results-header { flex-direction: column; } .stats-row { width: 100%; justify-content: space-between; } .output-toolbar { flex-direction: column; align-items: stretch; } .output-actions { justify-content: flex-end; } }