Files
Media-Coding-Web/public/css/style.css
2026-04-04 13:30:00 +08:00

1157 lines
22 KiB
CSS

:root {
--bg-dark: #f8fafc;
--panel-bg: rgba(255, 255, 255, 0.9);
--panel-border: rgba(148, 163, 184, 0.25);
--text-primary: #0f172a;
--text-secondary: #475569;
--accent: #2563eb;
--accent-hover: #1d4ed8;
--accent-glow: rgba(59, 130, 246, 0.25);
--font-main: 'Inter', sans-serif;
}
:root[data-theme="dark"] {
--bg-dark: #0f172a;
--panel-bg: rgba(30, 41, 59, 0.85);
--panel-border: rgba(148, 163, 184, 0.15);
--text-primary: #f8fafc;
--text-secondary: #94a3b8;
--accent: #3b82f6;
--accent-hover: #60a5fa;
--accent-glow: rgba(59, 130, 246, 0.35);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: var(--font-main);
background-color: var(--bg-dark);
color: var(--text-primary);
min-height: 100vh;
display: flex;
justify-content: center;
position: relative;
overflow-x: hidden;
}
.background-effects {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
overflow: hidden;
}
.glow-orb {
position: absolute;
width: 600px;
height: 600px;
border-radius: 50%;
filter: blur(80px);
opacity: 0.4;
animation: float 20s infinite ease-in-out alternate;
}
.orb-1 {
top: -200px;
left: -100px;
background: radial-gradient(circle, #3b82f6, transparent 70%);
}
.orb-2 {
bottom: -200px;
right: -100px;
background: radial-gradient(circle, #8b5cf6, transparent 70%);
animation-delay: -10s;
}
@keyframes float {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(100px, 50px);
}
}
.container {
width: 100%;
max-width: 1200px;
padding: 2rem;
display: flex;
flex-direction: column;
gap: 2rem;
}
header {
text-align: center;
margin-bottom: 1rem;
}
header h1 {
font-size: 3rem;
font-weight: 800;
letter-spacing: -1px;
margin-bottom: 0.5rem;
}
header h1 span {
background: linear-gradient(135deg, #3b82f6, #8b5cf6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
header p {
color: var(--text-secondary);
font-size: 1.1rem;
}
.dashboard {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
gap: 2rem;
align-items: flex-start;
}
.dashboard>* {
min-width: 0;
}
.video-list-section,
.player-section,
.folder-header {
min-width: 0;
}
.login-screen {
position: fixed;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
z-index: 50;
padding: 2rem;
}
.login-card {
width: min(480px, 100%);
background: var(--panel-bg);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid var(--panel-border);
border-radius: 24px;
padding: 2rem;
box-shadow: 0 20px 40px rgba(148, 163, 184, 0.15);
}
.login-card h2 {
margin: 0 0 0.75rem;
font-size: 1.75rem;
color: var(--text-primary);
}
.login-card p {
color: var(--text-secondary);
margin: 0 0 1.5rem;
}
.login-card label {
display: block;
margin-bottom: 1rem;
color: var(--text-secondary);
font-size: 0.95rem;
}
.login-card label span {
display: block;
margin-bottom: 0.5rem;
}
.login-card input {
width: 100%;
border: 1px solid var(--panel-border);
background: rgba(255, 255, 255, 0.08);
color: var(--text-primary);
border-radius: 12px;
padding: 0.85rem 1rem;
outline: none;
}
.login-card input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 4px var(--accent-glow);
}
.login-card .primary-btn {
width: 100%;
margin-top: 0.75rem;
padding: 0.95rem 1rem;
border-radius: 14px;
border: none;
background: #2563eb;
color: #ffffff;
font-size: 1rem;
font-weight: 700;
cursor: pointer;
transition: background 0.2s ease, transform 0.2s ease;
}
.login-card .primary-btn:hover {
background: #1d4ed8;
transform: translateY(-1px);
}
.form-error {
color: #dc2626;
margin-top: 0.75rem;
}
.bucket-panel {
margin-bottom: 1rem;
}
.bucket-panel label {
display: block;
color: #4b5563;
margin-bottom: 0.5rem;
}
.bucket-panel select {
width: 100%;
background: #f8fafc;
color: #111827;
border: 1px solid rgba(148, 163, 184, 0.5);
border-radius: 10px;
padding: 0.5rem 0.75rem;
outline: none;
}
.login-screen.hidden {
display: none;
}
.app-hidden {
display: none;
}
.glass-panel {
background: var(--panel-bg);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid var(--panel-border);
border-radius: 16px;
padding: 1.5rem;
box-shadow: 0 20px 40px rgba(148, 163, 184, 0.15);
}
.top-banner {
background: rgba(255, 255, 255, 0.08);
border: 1px solid var(--panel-border);
border-radius: 16px;
padding: 1rem 1.25rem;
margin-bottom: 1.5rem;
color: var(--text-primary);
font-size: 1.25rem;
display: flex;
align-items: center;
justify-content: space-between;
}
.banner-title {
font-weight: 700;
}
.user-controls {
display: flex;
align-items: center;
gap: 1.5rem;
font-size: 0.95rem;
font-weight: 500;
}
.user-info {
display: flex;
align-items: center;
gap: 0.75rem;
}
#theme-selector {
background: var(--panel-bg);
color: var(--text-primary);
border: 1px solid var(--panel-border);
padding: 0.35rem 0.5rem;
border-radius: 6px;
font-size: 0.9rem;
outline: none;
}
.top-banner.hidden {
display: none;
}
.section-header {
display: block;
margin-bottom: 0.75rem;
}
.banner-left {
display: flex;
align-items: center;
gap: 1.5rem;
}
.banner-actions {
display: flex;
align-items: center;
gap: 0.5rem;
}
.action-btn {
border: none;
background: #2563eb;
color: #ffffff;
font-size: 0.88rem;
font-weight: 600;
padding: 0.6rem 0.9rem;
border-radius: 12px;
min-width: auto;
white-space: nowrap;
cursor: pointer;
transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.action-btn:hover {
background: #1d4ed8;
transform: translateY(-1px);
box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}
.action-btn.danger {
background: #dc2626;
}
.action-btn.danger:hover {
background: #b91c1c;
}
.section-header h2 {
font-size: 1.25rem;
font-weight: 600;
margin: 0;
}
.codec-panel {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1rem;
}
.credentials-panel {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
margin-bottom: 1rem;
}
.credential-field {
display: flex;
flex-direction: column;
min-width: 180px;
flex: 1 1 180px;
}
.credential-field label {
color: var(--text-secondary);
font-size: 0.95rem;
margin-bottom: 0.35rem;
}
.credential-field input {
background: rgba(255, 255, 255, 0.08);
color: var(--text-primary);
border: 1px solid var(--panel-border);
border-radius: 10px;
padding: 0.5rem 0.75rem;
outline: none;
}
.credential-field input:focus {
border-color: var(--accent);
}
.codec-panel label {
color: var(--text-secondary);
font-size: 0.95rem;
}
.codec-panel select {
background: rgba(255, 255, 255, 0.08);
color: var(--text-primary);
border: 1px solid var(--panel-border);
border-radius: 10px;
padding: 0.5rem 0.75rem;
min-width: 110px;
outline: none;
}
.codec-panel select:focus {
border-color: var(--accent);
}
.icon-btn {
background: none;
border: none;
color: var(--text-secondary);
cursor: pointer;
transition: all 0.2s ease;
width: 38px;
height: 38px;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 12px;
}
.icon-btn:hover {
color: var(--text-primary);
background: rgba(255, 255, 255, 0.14);
}
.video-list {
list-style: none;
display: flex;
flex-direction: column;
gap: 0.5rem;
max-height: 500px;
overflow-y: auto;
min-width: 0;
}
.video-list::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.video-list::-webkit-scrollbar-thumb {
background: var(--panel-border);
border-radius: 6px;
}
.video-item {
padding: 1rem;
border-radius: 12px;
background: #ffffff;
border: 1px solid rgba(148, 163, 184, 0.2);
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 1rem;
min-width: 0;
}
.video-item:hover {
background: #f1f5f9;
transform: translateY(-2px);
}
.video-item.active {
background: rgba(59, 130, 246, 0.2);
border-color: var(--accent);
box-shadow: 0 0 15px var(--accent-glow);
}
.video-icon {
width: 40px;
height: 40px;
border-radius: 8px;
background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
display: flex;
align-items: center;
justify-content: center;
color: var(--accent);
}
.video-info {
flex: 1;
overflow: hidden;
min-width: 0;
max-width: 100%;
}
.video-title {
font-weight: 600;
font-size: 0.95rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
padding-bottom: 0.2rem;
}
.video-title::-webkit-scrollbar {
height: 6px;
}
.video-title::-webkit-scrollbar-thumb {
background: var(--panel-border);
border-radius: 6px;
}
.video-meta {
font-size: 0.8rem;
color: var(--text-secondary);
margin-top: 0.25rem;
}
/* Folder tree styles */
.folder-item {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.folder-header {
padding: 1rem;
border-radius: 12px;
background: #ffffff;
border: 1px solid rgba(148, 163, 184, 0.2);
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 1rem;
min-width: 0;
}
.folder-header:hover {
background: #f1f5f9;
}
.folder-icon {
width: 40px;
height: 40px;
border-radius: 8px;
background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
display: flex;
align-items: center;
justify-content: center;
color: var(--accent);
}
.folder-title {
flex: 1;
font-weight: 600;
font-size: 0.95rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
.folder-toggle {
color: var(--text-secondary);
display: flex;
align-items: center;
justify-content: center;
}
.folder-toggle .chevron {
transition: transform 0.3s ease;
}
.folder-item.open>.folder-header .folder-toggle .chevron {
transform: rotate(180deg);
}
.sub-list {
list-style: none;
display: flex;
flex-direction: column;
gap: 0.5rem;
padding-left: 1rem;
margin-top: 0.25rem;
}
.player-wrapper {
position: relative;
width: 100%;
aspect-ratio: 16/9;
background: #111827;
border-radius: 12px;
overflow: hidden;
box-shadow: inset 0 0 20px rgba(148, 163, 184, 0.2);
}
#video-player {
width: 100%;
height: 100%;
object-fit: contain;
outline: none;
cursor: pointer;
}
.player-overlay {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255, 0.9);
color: var(--text-primary);
text-align: center;
padding: 2rem;
z-index: 10;
transition: opacity 0.3s ease;
}
.player-section {
position: relative;
}
.player-overlay h3 {
margin-bottom: 0.5rem;
font-weight: 600;
}
.player-overlay p {
color: var(--text-secondary);
font-size: 0.9rem;
}
.now-playing {
margin-top: 2.5rem;
padding-top: 1.5rem;
border-top: 1px solid var(--panel-border);
}
.now-playing h3 {
font-size: 0.9rem;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 0.5rem;
}
.now-playing p {
font-size: 1.25rem;
font-weight: 600;
}
.custom-controls {
position: relative;
z-index: 12;
margin: -5.75rem 1rem 0;
width: calc(100% - 2rem);
padding: 0.7rem 0.8rem;
border-radius: 14px;
border: 1px solid var(--panel-border);
background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.86));
backdrop-filter: blur(10px);
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
flex-wrap: nowrap;
opacity: 1;
transition: opacity 0.2s ease, transform 0.2s ease;
overflow-x: auto;
}
.custom-controls.controls-faded,
.custom-seek-container.controls-faded {
opacity: 0;
transform: translateY(12px);
pointer-events: none;
}
.controls-left,
.controls-right {
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: nowrap;
flex: 0 0 auto;
}
.control-seek {
min-width: 260px;
flex: 1 1 auto;
display: flex;
align-items: center;
gap: 0.75rem;
}
.control-time {
color: rgba(226, 232, 240, 0.88);
font-size: 0.85rem;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.playback-status {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.8rem;
border-radius: 999px;
background: rgba(15, 23, 42, 0.86);
border: 1px solid rgba(148, 163, 184, 0.18);
color: #e2e8f0;
font-size: 0.9rem;
font-weight: 600;
}
.status-dot {
width: 0.7rem;
height: 0.7rem;
border-radius: 50%;
background: #f59e0b;
box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
}
.playback-status.playing .status-dot {
background: #22c55e;
animation: statusPulse 1.8s ease-in-out infinite;
}
.playback-status.paused .status-dot {
background: #f59e0b;
}
.playback-status.seeking .status-dot {
background: #38bdf8;
animation: statusPulse 1.1s ease-in-out infinite;
}
@keyframes statusPulse {
0%,
100% {
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35);
}
50% {
box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
}
}
.control-btn {
appearance: none;
border: 1px solid rgba(148, 163, 184, 0.24);
background: rgba(30, 41, 59, 0.9);
color: #f8fafc;
border-radius: 999px;
padding: 0.45rem 0.7rem;
font-size: 0.82rem;
font-weight: 600;
cursor: pointer;
transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.icon-btn {
min-width: 2rem;
width: 2rem;
height: 2rem;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 0.95rem;
line-height: 1;
}
.square-btn {
letter-spacing: -0.1em;
font-size: 0.82rem;
}
.control-btn:hover {
transform: translateY(-1px);
background: rgba(51, 65, 85, 0.95);
border-color: rgba(96, 165, 250, 0.45);
}
.control-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.control-popover {
position: relative;
display: inline-flex;
align-items: center;
}
.popover-panel {
position: absolute;
left: 50%;
bottom: calc(100% + 0.55rem);
transform: translateX(-50%) translateY(6px);
opacity: 0;
pointer-events: none;
transition: opacity 0.18s ease, transform 0.18s ease;
padding: 0.55rem 0.6rem;
border-radius: 12px;
border: 1px solid rgba(148, 163, 184, 0.18);
background: rgba(15, 23, 42, 0.96);
box-shadow: 0 12px 24px rgba(2, 6, 23, 0.34);
backdrop-filter: blur(12px);
z-index: 20;
white-space: nowrap;
}
.control-popover:hover .popover-panel,
.control-popover:focus-within .popover-panel {
opacity: 1;
pointer-events: auto;
transform: translateX(-50%) translateY(0);
}
.volume-control {
display: flex;
align-items: center;
gap: 0.45rem;
min-width: 132px;
}
.volume-slider {
width: 72px;
accent-color: #60a5fa;
cursor: pointer;
}
.volume-value {
min-width: 2.7rem;
color: rgba(226, 232, 240, 0.88);
font-size: 0.8rem;
font-variant-numeric: tabular-nums;
}
.speed-control {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.45rem;
color: rgba(226, 232, 240, 0.88);
font-size: 0.8rem;
font-weight: 600;
}
.speed-select {
border-radius: 999px;
border: 1px solid rgba(148, 163, 184, 0.24);
background: rgba(30, 41, 59, 0.9);
color: #f8fafc;
padding: 0.42rem 0.65rem;
font-size: 0.8rem;
outline: none;
cursor: pointer;
}
.seek-bar {
position: relative;
flex: 1 1 auto;
height: 10px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.12);
overflow: visible;
cursor: pointer;
}
.seek-bar-transcode {
position: absolute;
inset: 0 auto 0 0;
width: 0%;
height: 100%;
border-radius: 999px;
background: linear-gradient(90deg, rgba(59, 130, 246, 0.45), rgba(37, 99, 235, 0.82));
}
.seek-bar-progress {
position: relative;
width: 0%;
height: 100%;
border-radius: 999px;
background: linear-gradient(90deg, #f8fafc, #dbeafe);
}
.seek-bar-handle {
position: absolute;
top: 50%;
left: 0;
width: 14px;
height: 14px;
border-radius: 50%;
background: #f8fafc;
border: 2px solid #2563eb;
transform: translate(-50%, -50%);
box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.seek-bar.seeking .seek-bar-handle,
.seek-bar:hover .seek-bar-handle {
transform: translate(-50%, -50%) scale(1.08);
}
.progress-info {
width: 100%;
margin-top: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
align-items: stretch;
}
.progress-text {
color: var(--text-secondary);
font-size: 0.95rem;
}
.progress-bar {
width: 100%;
height: 10px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.12);
overflow: hidden;
}
.progress-fill {
width: 0%;
height: 100%;
background: linear-gradient(90deg, var(--accent), var(--accent-hover));
transition: width 0.25s ease;
}
.progress-fill.transcode-fill {
background: linear-gradient(90deg, #8b5cf6, #6d28d9);
}
/* Phase containers */
.phase-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
width: 85%;
max-width: 420px;
animation: phaseIn 0.4s ease;
}
@keyframes phaseIn {
from {
opacity: 0;
transform: translateY(12px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.phase-container h3 {
font-size: 1.1rem;
font-weight: 700;
margin: 0;
}
.phase-container .phase-detail {
color: var(--text-secondary);
font-size: 0.9rem;
margin: 0;
}
.phase-icon {
width: 64px;
height: 64px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 0.25rem;
}
.phase-icon.download-icon {
background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.15));
color: #0891b2;
animation: pulse-download 2s ease-in-out infinite;
}
@keyframes pulse-download {
0%,
100% {
box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.3);
}
50% {
box-shadow: 0 0 0 12px rgba(6, 182, 212, 0);
}
}
.phase-icon.transcode-icon {
background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(109, 40, 217, 0.15));
color: #7c3aed;
animation: pulse-transcode 2s ease-in-out infinite;
}
@keyframes pulse-transcode {
0%,
100% {
box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3);
}
50% {
box-shadow: 0 0 0 12px rgba(139, 92, 246, 0);
}
}
/* Transcode stats */
.transcode-stats {
display: flex;
gap: 0.75rem;
justify-content: center;
flex-wrap: wrap;
margin-top: 0.25rem;
}
.transcode-stats span {
font-size: 0.8rem;
color: var(--text-secondary);
background: rgba(148, 163, 184, 0.12);
padding: 0.25rem 0.6rem;
border-radius: 8px;
font-weight: 500;
}
.transcode-stats span:empty {
display: none;
}
.play-btn {
margin-top: 1rem;
padding: 0.85rem 1.25rem;
border: none;
border-radius: 999px;
background: var(--accent);
color: #fff;
font-weight: 700;
cursor: pointer;
transition: transform 0.2s ease, background 0.2s ease;
}
.play-btn:hover {
background: var(--accent-hover);
transform: translateY(-1px);
}
.stop-btn {
background: #dc2626;
}
.stop-btn:hover {
background: #b91c1c;
}
.play-btn:disabled {
opacity: 0.65;
background: rgba(37, 99, 235, 0.5);
cursor: not-allowed;
transform: none;
}
.play-btn.hidden {
display: none !important;
}
.hidden {
display: none !important;
}
.spinner-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 3rem 0;
gap: 1rem;
color: var(--text-secondary);
}
.spinner {
width: 40px;
height: 40px;
border: 3px solid rgba(255, 255, 255, 0.1);
border-radius: 50%;
border-top-color: var(--accent);
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Responsive adjustments */
@media (max-width: 900px) {
.dashboard {
grid-template-columns: 1fr;
}
.video-list-section {
order: 2;
}
.player-section {
order: 1;
}
.custom-controls {
align-items: center;
margin: -6.25rem 0.75rem 0;
width: calc(100% - 1.5rem);
}
.controls-left,
.controls-right {
width: auto;
}
.controls-right {
justify-content: flex-end;
}
.playback-status,
.speed-control {
width: auto;
}
.volume-control {
width: auto;
min-width: 112px;
}
.volume-slider {
flex: 0 0 auto;
width: 64px;
}
.control-seek {
min-width: 220px;
}
}