speechify-clone/static/style.css

251 lines
9.8 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,.42);
--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; gap: 6px; }
/* ── 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: 13px;
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; }
/* ── 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); }
/* ── 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;
}
.document-header { margin-bottom: 28px; }
.document-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.document-meta { font-size: 13px; color: var(--text-m); }
.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 1px;
transition: background .12s; display: inline;
}
.s:hover { background: var(--hl); }
.s.active { background: var(--hl-active); color: #fff; border-radius: 4px; }
.para-gap { display: block; height: .9em; }
/* ── 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); }
.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; }