transcription/backend/static/styles.css

493 lines
9.0 KiB
CSS

/* ===== Base ===== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg-primary: #0f0f1a;
--bg-secondary: #1a1a2e;
--bg-tertiary: #16213e;
--bg-hover: #1e2a4a;
--text-primary: #e0e0e0;
--text-secondary: #a0a0b0;
--accent: #4a9eff;
--accent-hover: #6ab2ff;
--success: #4ade80;
--error: #f87171;
--warning: #fbbf24;
--border: #2a2a4a;
--radius: 8px;
--shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
line-height: 1.6;
min-height: 100vh;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}
/* ===== Header ===== */
header {
text-align: center;
padding: 30px 0;
border-bottom: 1px solid var(--border);
margin-bottom: 30px;
}
header h1 {
font-size: 2rem;
font-weight: 600;
margin-bottom: 8px;
}
.subtitle {
color: var(--text-secondary);
font-size: 1rem;
}
/* ===== Upload Section ===== */
.upload-section {
margin-bottom: 30px;
}
.drop-zone {
background: var(--bg-secondary);
border: 2px dashed var(--border);
border-radius: var(--radius);
padding: 40px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
}
.drop-zone:hover {
border-color: var(--accent);
background: var(--bg-tertiary);
}
.drop-zone.drag-over {
border-color: var(--accent);
background: var(--bg-hover);
transform: scale(1.02);
}
.upload-icon {
width: 48px;
height: 48px;
color: var(--accent);
margin-bottom: 12px;
}
.browse-link {
color: var(--accent);
text-decoration: underline;
cursor: pointer;
}
.hint {
color: var(--text-secondary);
font-size: 0.85rem;
margin-top: 8px;
}
/* ===== Queue Status ===== */
.queue-status {
margin-top: 20px;
background: var(--bg-secondary);
border-radius: var(--radius);
padding: 20px;
}
.queue-status h3 {
margin-bottom: 15px;
font-size: 1.1rem;
color: var(--text-primary);
}
.tasks-list {
display: flex;
flex-direction: column;
gap: 10px;
}
.empty-state {
color: var(--text-secondary);
text-align: center;
padding: 20px;
font-style: italic;
}
.task-item {
background: var(--bg-tertiary);
border-radius: var(--radius);
padding: 12px 16px;
border-left: 3px solid var(--accent);
transition: all 0.3s ease;
}
.task-item.success { border-left-color: var(--success); }
.task-item.error { border-left-color: var(--error); }
.task-item.processing { border-left-color: var(--warning); }
.task-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.task-filename {
font-weight: 500;
font-size: 0.9rem;
}
.task-status-badge {
font-size: 0.75rem;
padding: 2px 8px;
border-radius: 12px;
font-weight: 600;
}
.task-status-badge.queued { background: var(--bg-hover); color: var(--text-secondary); }
.task-status-badge.processing { background: rgba(251, 191, 36, 0.2); color: var(--warning); }
.task-status-badge.success { background: rgba(74, 222, 128, 0.2); color: var(--success); }
.task-status-badge.error { background: rgba(248, 113, 113, 0.2); color: var(--error); }
.task-progress-bar {
height: 4px;
background: var(--bg-hover);
border-radius: 2px;
overflow: hidden;
margin-bottom: 6px;
}
.task-progress-fill {
height: 100%;
background: var(--accent);
border-radius: 2px;
transition: width 0.5s ease;
}
.task-item.success .task-progress-fill { background: var(--success); }
.task-item.error .task-progress-fill { background: var(--error); }
.task-message {
font-size: 0.8rem;
color: var(--text-secondary);
}
/* ===== Results Section ===== */
.results-section {
display: grid;
grid-template-columns: 350px 1fr;
gap: 20px;
min-height: 500px;
}
.panel-left, .panel-right {
background: var(--bg-secondary);
border-radius: var(--radius);
padding: 20px;
overflow: hidden;
}
.panel-left h2, .panel-right h2 {
font-size: 1.2rem;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid var(--border);
}
/* ===== File Tree ===== */
.file-tree {
overflow-y: auto;
max-height: calc(100vh - 250px);
}
.folder-item {
margin-bottom: 8px;
}
.folder-header {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
cursor: pointer;
border-radius: var(--radius);
transition: background 0.2s;
white-space: nowrap;
overflow: hidden;
}
.folder-header:hover {
background: var(--bg-hover);
}
.folder-toggle {
font-size: 0.7rem;
color: var(--text-secondary);
width: 16px;
text-align: center;
flex-shrink: 0;
}
.folder-icon {
font-size: 1.1rem;
flex-shrink: 0;
}
.folder-name {
flex: 1;
font-weight: 500;
font-size: 0.9rem;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
.folder-date {
font-size: 0.7rem;
color: var(--text-secondary);
flex-shrink: 0;
}
.folder-delete {
font-size: 1rem;
cursor: pointer;
padding: 2px 6px;
border-radius: 4px;
transition: background 0.2s;
margin-left: 8px;
flex-shrink: 0;
}
.folder-delete:hover {
background: rgba(248, 113, 113, 0.2);
}
.folder-files {
margin-left: 24px;
padding-left: 8px;
border-left: 1px solid var(--border);
}
.file-item {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 10px;
border-radius: var(--radius);
transition: background 0.2s;
cursor: default;
}
.file-item.clickable, .file-download {
cursor: pointer;
text-decoration: none;
color: inherit;
display: flex;
}
.file-item.clickable:hover, .file-download:hover {
background: var(--bg-hover);
}
.file-icon {
font-size: 1rem;
}
.file-name {
flex: 1;
font-size: 0.85rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.file-size {
font-size: 0.7rem;
color: var(--text-secondary);
}
/* ===== Viewer ===== */
.viewer {
overflow-y: auto;
max-height: calc(100vh - 250px);
}
.empty-viewer {
display: flex;
align-items: center;
justify-content: center;
height: 300px;
color: var(--text-secondary);
}
.md-content {
background: var(--bg-tertiary);
border-radius: var(--radius);
overflow: hidden;
}
.md-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
background: var(--bg-hover);
border-bottom: 1px solid var(--border);
}
.md-title {
font-size: 0.85rem;
color: var(--text-secondary);
font-family: monospace;
}
.btn-download {
background: var(--accent);
color: white;
text-decoration: none;
padding: 6px 12px;
border-radius: var(--radius);
font-size: 0.8rem;
transition: background 0.2s;
}
.btn-download:hover {
background: var(--accent-hover);
}
.md-body {
padding: 20px;
line-height: 1.8;
}
.md-body h1 {
font-size: 1.5rem;
margin-bottom: 16px;
color: var(--text-primary);
}
.md-body h2, .md-body h3 {
margin-top: 20px;
margin-bottom: 10px;
}
.md-body p {
margin-bottom: 12px;
}
.md-body strong {
color: var(--accent);
}
.md-body blockquote {
border-left: 3px solid var(--accent);
padding-left: 16px;
margin: 16px 0;
color: var(--text-secondary);
}
.md-body code {
background: var(--bg-hover);
padding: 2px 6px;
border-radius: 4px;
font-family: monospace;
font-size: 0.9em;
}
.md-body pre {
background: var(--bg-hover);
padding: 16px;
border-radius: var(--radius);
overflow-x: auto;
margin: 16px 0;
}
.md-body ul, .md-body ol {
margin-left: 20px;
margin-bottom: 12px;
}
.file-preview {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 300px;
gap: 20px;
}
.error {
color: var(--error);
padding: 20px;
text-align: center;
}
/* ===== Toast ===== */
.toast-container {
position: fixed;
top: 20px;
right: 20px;
z-index: 1000;
display: flex;
flex-direction: column;
gap: 10px;
}
.toast {
padding: 12px 20px;
border-radius: var(--radius);
color: white;
font-size: 0.9rem;
animation: slideIn 0.3s ease;
max-width: 300px;
word-wrap: break-word;
box-shadow: var(--shadow);
}
.toast-info { background: var(--accent); }
.toast-success { background: var(--success); }
.toast-error { background: var(--error); }
.toast-hide {
animation: slideOut 0.3s ease forwards;
}
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
from { transform: translateX(0); opacity: 1; }
to { transform: translateX(100%); opacity: 0; }
}
/* ===== Responsive ===== */
@media (max-width: 768px) {
.results-section {
grid-template-columns: 1fr;
}
header h1 {
font-size: 1.5rem;
}
.drop-zone {
padding: 20px;
}
}