@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap'); *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { --bg: #0f0f11; --surface: #1a1a1f; --surface2: #22222a; --border: #2a2a35; --accent: #7c6af7; --accent-dim: #7c6af720; --accent-hover: #9585fa; --text: #e8e8f0; --text-dim: #777788; --text-muted: #444455; --success: #4ade80; --error: #f87171; --radius: 6px; --font: 'IBM Plex Sans', sans-serif; --mono: 'IBM Plex Mono', monospace; } html, body { width: 440px; min-height: 200px; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 13px; line-height: 1.5; overflow-x: hidden; } /* ── Views ── */ .view { display: flex; flex-direction: column; } .view.hidden { display: none !important; } /* ── Loading ── */ #view-loading { align-items: center; justify-content: center; gap: 12px; padding: 48px; color: var(--text-dim); font-size: 13px; } .spinner { width: 22px; height: 22px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* ── Setup / error / success ── */ .setup-box, .success-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px 32px; text-align: center; color: var(--text-dim); font-size: 13px; } .setup-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); } .setup-icon svg { stroke: var(--text-dim); } .setup-icon.err { color: var(--error); font-size: 20px; font-weight: 700; } .success-icon { width: 44px; height: 44px; border-radius: 50%; background: #4ade8015; border: 1px solid #4ade8040; color: var(--success); font-size: 22px; display: flex; align-items: center; justify-content: center; } .success-box p { font-size: 14px; font-weight: 600; color: var(--text); } .success-box a { color: var(--accent); text-decoration: none; font-size: 12px; } .success-box a:hover { text-decoration: underline; } /* ── Header ── */ header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px; border-bottom: 1px solid var(--border); background: var(--surface); } .logo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--text); } .logo svg { stroke: var(--accent); flex-shrink: 0; } .page-title { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; font-size: 12px; color: var(--text-dim); } .header-actions { display: flex; gap: 4px; } .icon-btn { background: transparent; border: 1px solid transparent; border-radius: var(--radius); padding: 5px 6px; cursor: pointer; color: var(--text-dim); display: flex; align-items: center; transition: all .12s; } .icon-btn:hover { border-color: var(--border); color: var(--text); background: var(--surface2); } .icon-btn svg { display: block; } /* ── Tabs ── */ .tabs { display: flex; position: relative; border-bottom: 1px solid var(--border); background: var(--surface); padding: 0 14px; gap: 2px; } .tab { background: none; border: none; color: var(--text-dim); font-family: var(--font); font-size: 12px; font-weight: 500; padding: 8px 12px; cursor: pointer; position: relative; transition: color .12s; border-bottom: 2px solid transparent; margin-bottom: -1px; } .tab:hover { color: var(--text); } .tab.active { color: var(--accent); border-bottom-color: var(--accent); } /* ── Tab panels ── */ .tab-panel { flex: 1; } .tab-panel.hidden { display: none; } #md-editor { display: block; width: 100%; height: 260px; background: var(--bg); border: none; border-bottom: 1px solid var(--border); color: var(--text); font-family: var(--mono); font-size: 12px; line-height: 1.7; padding: 14px; resize: none; outline: none; } #md-editor::placeholder { color: var(--text-muted); } .preview-body { height: 260px; overflow-y: auto; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--bg); font-size: 13px; line-height: 1.7; } /* preview markdown styles */ .preview-body h1 { font-size: 18px; margin: 0 0 12px; border-bottom: 1px solid var(--border); padding-bottom: 6px; } .preview-body h2 { font-size: 15px; margin: 16px 0 8px; } .preview-body h3 { font-size: 13px; font-weight: 600; margin: 14px 0 6px; } .preview-body p { margin: 0 0 10px; } .preview-body blockquote { border-left: 3px solid var(--accent); margin: 10px 0; padding: 4px 12px; color: var(--text-dim); background: var(--accent-dim); border-radius: 0 4px 4px 0; } .preview-body code { background: var(--surface2); border: 1px solid var(--border); border-radius: 3px; padding: 1px 5px; font-family: var(--mono); font-size: 11px; } .preview-body pre { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; margin: 10px 0; } .preview-body pre code { background: none; border: none; padding: 0; } .preview-body a { color: var(--accent); } .preview-body img { max-width: 100%; border-radius: 4px; margin: 8px 0; } .preview-body table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12px; } .preview-body th, .preview-body td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; } .preview-body th { background: var(--surface2); } .preview-body hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; } .preview-body ul, .preview-body ol { padding-left: 20px; margin: 0 0 10px; } /* ── Images section ── */ #images-section { border-bottom: 1px solid var(--border); background: var(--surface); } .images-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; font-size: 12px; color: var(--text-dim); } .badge { display: inline-block; background: var(--accent-dim); color: var(--accent); border-radius: 10px; padding: 1px 6px; font-size: 10px; font-weight: 600; margin-left: 4px; } .toggle-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 11px; } .toggle-label input { accent-color: var(--accent); cursor: pointer; } #images-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; max-height: 90px; overflow-y: auto; } .img-chip { display: flex; align-items: center; gap: 5px; background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px 3px 5px; font-size: 11px; color: var(--text-dim); max-width: 160px; } .img-chip img { width: 20px; height: 20px; object-fit: cover; border-radius: 2px; flex-shrink: 0; } .img-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; } .img-chip .remove-img { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; line-height: 1; padding: 0; flex-shrink: 0; } .img-chip .remove-img:hover { color: var(--error); } .img-chip.skipped { opacity: .4; } /* ── Tags row ── */ #tags-row { padding: 6px 14px; border-bottom: 1px solid var(--border); background: var(--surface); } #tags-input { width: 100%; background: transparent; border: none; outline: none; color: var(--accent); font-family: var(--mono); font-size: 12px; padding: 2px 0; } #tags-input::placeholder { color: var(--text-muted); font-family: var(--font); } /* ── Char counter ── */ .char-counter { padding: 3px 14px; font-size: 10px; color: var(--text-muted); font-family: var(--mono); text-align: right; background: var(--bg); border-bottom: 1px solid var(--border); } /* ── Footer ── */ footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--border); gap: 8px; } .footer-left, .footer-right { display: flex; align-items: center; gap: 8px; } select { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-dim); font-family: var(--font); font-size: 12px; padding: 5px 8px; outline: none; cursor: pointer; transition: border-color .12s; } select:focus { border-color: var(--accent); } select option { background: var(--surface); } .secondary-btn { background: transparent; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-dim); font-family: var(--font); font-size: 12px; padding: 6px 10px; cursor: pointer; transition: all .12s; } .secondary-btn:hover { border-color: var(--accent); color: var(--accent); } .send-btn { display: flex; align-items: center; gap: 6px; background: var(--accent); border: none; border-radius: var(--radius); color: #fff; font-family: var(--font); font-size: 12px; font-weight: 600; padding: 7px 14px; cursor: pointer; transition: background .12s, transform .08s; } .send-btn:hover { background: var(--accent-hover); } .send-btn:active { transform: scale(.97); } .send-btn:disabled { opacity: .5; cursor: default; } .send-btn svg { flex-shrink: 0; } /* scrollbar */ ::-webkit-scrollbar { width: 4px; height: 4px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); } /* mode badge */ #mode-toggle.mode-selection { color: var(--accent); background: var(--accent-dim); border-color: var(--accent); }