- Browser renders PDF exactly as-is using its built-in viewer (Chrome/Edge/Firefox) - No external dependencies - just a blob URL in an <iframe> - Page navigation via #page=N fragment syncs PDF view with playback position - Fixed flex layout so iframe fills remaining height correctly - Removed PDF.js script tag Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
400 lines
16 KiB
CSS
400 lines
16 KiB
CSS
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
:root {
|
|
--bg: #0d0d0d;
|
|
--bg2: #161616;
|
|
--bg3: #212121;
|
|
--bg4: #2a2a2a;
|
|
--accent: #7c3aed;
|
|
--accent-h: #9d6fff;
|
|
--text: #e8e8e8;
|
|
--text-m: #888;
|
|
--text-d: #444;
|
|
--hl: rgba(124,58,237,.18);
|
|
--hl-active: rgba(124,58,237,.5);
|
|
--border: #232323;
|
|
--topbar-h: 54px;
|
|
--player-h: 76px;
|
|
--sidebar-w: 270px;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Inter', system-ui, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ── TOP BAR ─────────────────────────────── */
|
|
.topbar {
|
|
height: var(--topbar-h);
|
|
background: var(--bg2);
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 18px;
|
|
flex-shrink: 0;
|
|
}
|
|
.logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
|
|
.topbar-right { display: flex; align-items: center; gap: 6px; }
|
|
|
|
/* ── USER MENU ────────────────────────────── */
|
|
.user-menu { position: relative; }
|
|
.user-btn {
|
|
display: flex; align-items: center; gap: 6px;
|
|
background: var(--bg3); border: 1px solid var(--border);
|
|
border-radius: 8px; color: var(--text-m); cursor: pointer;
|
|
font-family: inherit; font-size: 13px; padding: 6px 12px;
|
|
transition: all .15s;
|
|
}
|
|
.user-btn:hover { border-color: var(--accent); color: var(--text); }
|
|
.user-dropdown {
|
|
display: none; position: absolute; top: calc(100% + 6px); right: 0;
|
|
background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
|
|
min-width: 160px; z-index: 100; overflow: hidden;
|
|
box-shadow: 0 8px 24px rgba(0,0,0,.5);
|
|
}
|
|
.user-dropdown.open { display: block; }
|
|
.dd-item {
|
|
display: block; width: 100%; text-align: left;
|
|
background: none; border: none; color: var(--text-m);
|
|
cursor: pointer; font-family: inherit; font-size: 13px;
|
|
padding: 10px 16px; transition: background .12s; text-decoration: none;
|
|
}
|
|
.dd-item:hover { background: var(--bg3); color: var(--text); }
|
|
.dd-item.hidden { display: none; }
|
|
|
|
/* ── VERIFICATION BANNER ─────────────────── */
|
|
.verify-banner {
|
|
display: none; align-items: center; gap: 12px; flex-shrink: 0;
|
|
background: rgba(245,158,11,.1); border-bottom: 1px solid rgba(245,158,11,.2);
|
|
padding: 10px 20px; font-size: 13px; color: #fbbf24;
|
|
}
|
|
.verify-banner.show { display: flex; }
|
|
.verify-banner button {
|
|
background: rgba(245,158,11,.2); border: 1px solid rgba(245,158,11,.3); color: #fbbf24;
|
|
border-radius: 6px; padding: 4px 10px; font-size: 12px; font-family: inherit; cursor: pointer; white-space: nowrap;
|
|
}
|
|
.verify-banner .close-btn { margin-left: auto; background: none; border: none; opacity: .6; }
|
|
.verify-banner .close-btn:hover { opacity: 1; }
|
|
|
|
/* ── MAIN LAYOUT ──────────────────────────── */
|
|
.app { display: flex; flex-direction: column; height: 100vh; }
|
|
.main-layout {
|
|
display: flex;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
height: calc(100vh - var(--topbar-h) - var(--player-h));
|
|
}
|
|
|
|
/* ── SIDEBARS ─────────────────────────────── */
|
|
.sidebar-left, .sidebar-right {
|
|
width: var(--sidebar-w);
|
|
background: var(--bg2);
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-shrink: 0;
|
|
overflow: hidden;
|
|
transition: width .25s ease;
|
|
}
|
|
.sidebar-left { border-right: 1px solid var(--border); }
|
|
.sidebar-right { border-left: 1px solid var(--border); overflow-y: auto; }
|
|
.sidebar-left.collapsed, .sidebar-right.collapsed { width: 0; }
|
|
|
|
.sidebar-header {
|
|
padding: 14px 16px 10px;
|
|
border-bottom: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
}
|
|
.sidebar-header h3 {
|
|
font-size: 11px; font-weight: 600;
|
|
text-transform: uppercase; letter-spacing: .6px; color: var(--text-m);
|
|
}
|
|
|
|
/* ── TABS ─────────────────────────────────── */
|
|
.tabs { display: flex; padding: 10px 10px 0; gap: 4px; flex-shrink: 0; }
|
|
.tab {
|
|
flex: 1; padding: 7px 4px; background: none; border: none;
|
|
border-radius: 7px; color: var(--text-m); font-size: 12px;
|
|
font-weight: 500; cursor: pointer; transition: all .15s; font-family: inherit;
|
|
}
|
|
.tab:hover { background: var(--bg3); color: var(--text); }
|
|
.tab.active { background: var(--accent); color: #fff; }
|
|
|
|
.tab-content { display: none; flex-direction: column; gap: 10px; padding: 12px; flex: 1; overflow: hidden; }
|
|
.tab-content.active { display: flex; }
|
|
|
|
/* ── FORM ELEMENTS ────────────────────────── */
|
|
textarea, .text-field {
|
|
background: var(--bg3); border: 1px solid var(--border);
|
|
border-radius: 8px; color: var(--text); font-family: inherit;
|
|
font-size: 13px; line-height: 1.6; padding: 10px 12px; outline: none;
|
|
transition: border-color .15s; width: 100%;
|
|
}
|
|
textarea { resize: none; flex: 1; min-height: 0; }
|
|
textarea:focus, .text-field:focus { border-color: var(--accent); }
|
|
|
|
/* ── UPLOAD AREA ──────────────────────────── */
|
|
.upload-area {
|
|
border: 2px dashed var(--border); border-radius: 10px;
|
|
padding: 28px 16px; display: flex; flex-direction: column;
|
|
align-items: center; gap: 10px; cursor: pointer;
|
|
color: var(--text-m); transition: all .15s; text-align: center;
|
|
}
|
|
.upload-area strong { color: var(--text); }
|
|
.upload-area:hover, .upload-area.drag-over {
|
|
border-color: var(--accent); background: rgba(124,58,237,.06); color: var(--text);
|
|
}
|
|
.upload-area p { font-size: 13px; line-height: 1.5; }
|
|
.upload-area small { font-size: 11px; color: var(--text-d); line-height: 1.4; }
|
|
|
|
/* ── BUTTONS ──────────────────────────────── */
|
|
.btn-primary {
|
|
background: var(--accent); color: #fff; border: none; border-radius: 8px;
|
|
padding: 10px; font-family: inherit; font-size: 14px; font-weight: 500;
|
|
cursor: pointer; transition: background .15s; width: 100%; flex-shrink: 0;
|
|
}
|
|
.btn-primary:hover { background: var(--accent-h); }
|
|
|
|
.btn-secondary {
|
|
background: var(--bg3); color: var(--text); border: 1px solid var(--border);
|
|
border-radius: 8px; padding: 10px; font-family: inherit; font-size: 13px;
|
|
font-weight: 500; cursor: pointer; transition: all .15s; width: 100%;
|
|
}
|
|
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-h); }
|
|
|
|
.btn-icon {
|
|
background: none; border: none; color: var(--text-m); cursor: pointer;
|
|
padding: 7px; border-radius: 6px; display: flex; align-items: center; transition: all .15s;
|
|
}
|
|
.btn-icon:hover { background: var(--bg3); color: var(--text); }
|
|
|
|
.btn-sz {
|
|
background: var(--bg3); border: 1px solid var(--border); color: var(--text);
|
|
cursor: pointer; padding: 4px 12px; border-radius: 6px; font-size: 13px;
|
|
font-weight: 600; transition: all .15s; font-family: inherit;
|
|
}
|
|
.btn-sz:hover { border-color: var(--accent); color: var(--accent-h); }
|
|
|
|
.btn-sm {
|
|
background: var(--bg3); border: 1px solid var(--border); color: var(--text-m);
|
|
border-radius: 6px; padding: 4px 10px; font-size: 12px; font-family: inherit;
|
|
cursor: pointer; transition: all .15s;
|
|
}
|
|
.btn-sm:hover { border-color: var(--accent); color: var(--text); }
|
|
|
|
/* ── SAVE BUTTON ──────────────────────────── */
|
|
.btn-save {
|
|
display: flex; align-items: center; gap: 6px;
|
|
background: var(--bg3); border: 1px solid var(--border); color: var(--text-m);
|
|
border-radius: 8px; padding: 6px 14px; font-family: inherit; font-size: 13px;
|
|
cursor: pointer; transition: all .15s; flex-shrink: 0;
|
|
}
|
|
.btn-save:hover { border-color: var(--accent); color: var(--accent-h); }
|
|
|
|
/* ── STATUS TEXT ─────────────────────────── */
|
|
.status-text { font-size: 12px; color: var(--text-m); min-height: 18px; text-align: center; }
|
|
|
|
/* ── MAIN CONTENT AREA ───────────────────── */
|
|
.content-area {
|
|
flex: 1; overflow-y: auto; padding: 44px 56px;
|
|
display: flex; flex-direction: column;
|
|
min-height: 0;
|
|
}
|
|
.content-area.pdf-mode {
|
|
padding: 20px 20px 0;
|
|
overflow: hidden; /* iframe fills remaining height */
|
|
}
|
|
.document-header { margin-bottom: 28px; }
|
|
.doc-title-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
|
|
.document-title { font-size: 22px; font-weight: 700; flex: 1; }
|
|
.document-meta { font-size: 13px; color: var(--text-m); margin-bottom: 8px; }
|
|
.doc-hint { font-size: 12px; color: var(--text-d); }
|
|
|
|
.text-viewer { font-size: 18px; line-height: 1.85; color: var(--text); }
|
|
|
|
.empty-state {
|
|
display: flex; flex-direction: column; align-items: center;
|
|
gap: 14px; padding: 80px 40px; color: var(--text-d); text-align: center;
|
|
}
|
|
.empty-state p { font-size: 16px; color: var(--text-m); }
|
|
.empty-state span { font-size: 13px; }
|
|
|
|
/* Sentence spans */
|
|
.s {
|
|
cursor: pointer; border-radius: 4px; padding: 2px 2px;
|
|
transition: background .12s; display: inline;
|
|
}
|
|
.s:hover { background: var(--hl); }
|
|
.s.active {
|
|
background: var(--hl-active);
|
|
color: #fff;
|
|
border-radius: 4px;
|
|
box-shadow: 0 0 0 2px rgba(124,58,237,.3);
|
|
}
|
|
.para-gap { display: block; height: .9em; }
|
|
|
|
/* ── NEXTCLOUD FILE BROWSER ──────────────── */
|
|
.nc-path-bar {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
|
|
padding: 6px 10px; font-size: 12px; color: var(--text-m); flex-shrink: 0;
|
|
}
|
|
#nc-path-display { font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.nc-file-list {
|
|
flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
|
|
min-height: 0;
|
|
}
|
|
.nc-item {
|
|
display: flex; align-items: center; gap: 8px;
|
|
padding: 7px 10px; border-radius: 7px; cursor: pointer;
|
|
font-size: 13px; color: var(--text-m); transition: all .12s;
|
|
border: 1px solid transparent;
|
|
}
|
|
.nc-item:hover { background: var(--bg3); color: var(--text); border-color: var(--border); }
|
|
.nc-item.dir { color: var(--accent-h); }
|
|
.nc-item .nc-icon { flex-shrink: 0; opacity: .7; }
|
|
|
|
/* ── SAVED DOCS LIST ─────────────────────── */
|
|
.saved-list {
|
|
flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; min-height: 0;
|
|
}
|
|
.saved-item {
|
|
padding: 10px 12px; border-radius: 8px; cursor: pointer;
|
|
border: 1px solid var(--border); background: var(--bg3); transition: all .12s;
|
|
}
|
|
.saved-item:hover { border-color: var(--accent); background: rgba(124,58,237,.06); }
|
|
.saved-item-title { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
.saved-item-meta { font-size: 11px; color: var(--text-m); margin-top: 3px; }
|
|
|
|
/* ── VIEW TOGGLE ────────────────────────── */
|
|
.doc-title-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
|
|
.view-toggle {
|
|
display: flex; background: var(--bg3); border: 1px solid var(--border);
|
|
border-radius: 8px; padding: 3px; gap: 2px;
|
|
}
|
|
.view-btn {
|
|
background: none; border: none; border-radius: 6px; color: var(--text-m);
|
|
cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 500;
|
|
padding: 4px 12px; transition: all .15s;
|
|
}
|
|
.view-btn.active { background: var(--accent); color: #fff; }
|
|
.view-btn:hover:not(.active) { color: var(--text); background: var(--bg4); }
|
|
|
|
/* ── PDF VIEWER ──────────────────────────── */
|
|
.pdf-viewer {
|
|
flex: 1;
|
|
min-height: 0; /* essential: lets flex child shrink below content size */
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
#pdf-pages {
|
|
flex: 1;
|
|
min-height: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
#pdf-iframe {
|
|
flex: 1;
|
|
min-height: 0;
|
|
width: 100%;
|
|
border: none;
|
|
display: block;
|
|
}
|
|
|
|
/* ── SETTINGS SIDEBAR ────────────────────── */
|
|
.setting-group { padding: 16px; border-bottom: 1px solid var(--border); }
|
|
.setting-label {
|
|
display: block; font-size: 11px; font-weight: 600;
|
|
text-transform: uppercase; letter-spacing: .5px; color: var(--text-m); margin-bottom: 10px;
|
|
}
|
|
.select {
|
|
width: 100%; background: var(--bg3); border: 1px solid var(--border);
|
|
border-radius: 8px; color: var(--text); font-family: inherit; font-size: 13px;
|
|
padding: 8px 10px; outline: none; cursor: pointer; transition: border-color .15s;
|
|
}
|
|
.select:focus { border-color: var(--accent); }
|
|
.select:disabled { opacity: .45; cursor: not-allowed; }
|
|
|
|
/* Voice lock notice */
|
|
.lock-notice {
|
|
display: none; margin-top: 8px; font-size: 11px; color: #f59e0b;
|
|
background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.2);
|
|
border-radius: 6px; padding: 5px 10px;
|
|
}
|
|
.lock-notice.visible { display: block; }
|
|
|
|
.slider { width: 100%; accent-color: var(--accent); cursor: pointer; margin-bottom: 10px; display: block; }
|
|
|
|
.speed-presets { display: flex; gap: 4px; flex-wrap: wrap; }
|
|
.speed-btn {
|
|
background: var(--bg3); border: 1px solid var(--border); color: var(--text-m);
|
|
border-radius: 6px; padding: 4px 8px; font-size: 12px; font-family: inherit;
|
|
cursor: pointer; transition: all .15s;
|
|
}
|
|
.speed-btn:hover, .speed-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
|
|
|
|
.font-size-row { display: flex; align-items: center; gap: 12px; }
|
|
.font-size-row span { flex: 1; text-align: center; font-size: 13px; color: var(--text-m); }
|
|
|
|
/* ── PLAYER BAR ─────────────────────────── */
|
|
.player-bar {
|
|
height: var(--player-h); background: var(--bg2);
|
|
border-top: 1px solid var(--border); display: flex;
|
|
align-items: center; padding: 0 24px; gap: 20px; flex-shrink: 0;
|
|
}
|
|
.player-left { flex: 1; min-width: 0; }
|
|
.now-playing {
|
|
font-size: 13px; color: var(--text-m);
|
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
}
|
|
.player-center { display: flex; align-items: center; gap: 14px; }
|
|
|
|
.ctrl-btn {
|
|
background: none; border: none; color: var(--text-m); cursor: pointer;
|
|
padding: 8px; border-radius: 50%; display: flex; align-items: center;
|
|
transition: all .15s;
|
|
}
|
|
.ctrl-btn:hover { background: var(--bg3); color: var(--text); }
|
|
|
|
.play-btn {
|
|
width: 50px; height: 50px; border-radius: 50%; border: none;
|
|
background: var(--accent); color: #fff; cursor: pointer;
|
|
display: flex; align-items: center; justify-content: center;
|
|
transition: all .15s; flex-shrink: 0;
|
|
}
|
|
.play-btn:hover { background: var(--accent-h); transform: scale(1.05); }
|
|
|
|
.player-right { flex: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
|
|
.progress-text { font-size: 12px; color: var(--text-m); }
|
|
.progress-track {
|
|
width: 180px; height: 4px; background: var(--bg4);
|
|
border-radius: 2px; cursor: pointer; overflow: hidden;
|
|
}
|
|
.progress-fill {
|
|
height: 100%; background: var(--accent); border-radius: 2px;
|
|
width: 0%; transition: width .3s ease;
|
|
}
|
|
|
|
/* ── LOADING OVERLAY ─────────────────────── */
|
|
.loading-overlay {
|
|
display: none; position: fixed; inset: 0;
|
|
background: rgba(0,0,0,.65); z-index: 200;
|
|
flex-direction: column; align-items: center; justify-content: center; gap: 16px;
|
|
}
|
|
.loading-overlay.show { display: flex; }
|
|
.spinner {
|
|
width: 38px; height: 38px; border: 3px solid var(--bg4);
|
|
border-top-color: var(--accent); border-radius: 50%;
|
|
animation: spin .7s linear infinite;
|
|
}
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
|
|
/* ── SCROLLBAR ───────────────────────────── */
|
|
::-webkit-scrollbar { width: 5px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
|