Files
Media-Coding-Web/public/css/style.css
2026-04-02 20:33:53 +08:00

707 lines
13 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;
}
* {
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: radial-gradient(circle at top left, rgba(249, 250, 252, 0.95), rgba(255, 255, 255, 0.98));
z-index: 50;
padding: 2rem;
}
.login-card {
width: min(480px, 100%);
background: #ffffff;
border: 1px solid rgba(148, 163, 184, 0.3);
border-radius: 24px;
padding: 2rem;
box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}
.login-card h2 {
margin: 0 0 0.75rem;
font-size: 1.75rem;
color: #111827;
}
.login-card p {
color: #6b7280;
margin: 0 0 1.5rem;
}
.login-card label {
display: block;
margin-bottom: 1rem;
color: #4b5563;
font-size: 0.95rem;
}
.login-card label span {
display: block;
margin-bottom: 0.5rem;
}
.login-card input {
width: 100%;
border: 1px solid rgba(148, 163, 184, 0.5);
background: #f8fafc;
color: #111827;
border-radius: 12px;
padding: 0.85rem 1rem;
outline: none;
}
.login-card input:focus {
border-color: #2563eb;
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}
.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;
font-weight: 700;
display: flex;
align-items: center;
justify-content: flex-start;
}
.top-banner.hidden {
display: none;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
border-bottom: 1px solid var(--panel-border);
padding-bottom: 1rem;
}
.section-actions {
display: flex;
flex-wrap: nowrap;
align-items: center;
gap: 0.5rem;
min-width: 0;
justify-content: flex-end;
}
.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;
}
.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-overlay h3 {
margin-bottom: 0.5rem;
font-weight: 600;
}
.player-overlay p {
color: var(--text-secondary);
font-size: 0.9rem;
}
.now-playing {
margin-top: 1.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;
}
.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;
}
.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);
}
.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;
}
}