refactor: split monolithic index.php into separate CSS/JS files

Move inline styles and scripts to assets/css/style.css and assets/js/app.js
This commit is contained in:
markmental 2026-02-06 12:15:30 -05:00
commit 75a7c9a13b
3 changed files with 951 additions and 953 deletions

521
assets/css/style.css Normal file
View file

@ -0,0 +1,521 @@
:root {
--bg-primary: #0a0e14;
--bg-secondary: #151b24;
--bg-tertiary: #1f2937;
--accent-primary: #00ffcc;
--accent-secondary: #ff00ff;
--text-primary: #e8edf3;
--text-secondary: #8b95a8;
--border-color: #2d3748;
--shadow-glow: 0 0 20px rgba(0, 255, 204, 0.3);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Archivo', sans-serif;
background: linear-gradient(135deg, var(--bg-primary) 0%, #0d1117 50%, var(--bg-secondary) 100%);
color: var(--text-primary);
min-height: 100vh;
overflow-x: hidden;
}
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background:
radial-gradient(circle at 20% 50%, rgba(0, 255, 204, 0.05) 0%, transparent 50%),
radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.05) 0%, transparent 50%);
pointer-events: none;
z-index: 0;
}
.container {
position: relative;
max-width: 1600px;
margin: 0 auto;
padding: 2rem;
z-index: 1;
}
header {
text-align: center;
margin-bottom: 3rem;
animation: slideDown 0.8s ease-out;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
h1 {
font-family: 'Orbitron', sans-serif;
font-size: 3.5rem;
font-weight: 900;
background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
letter-spacing: 0.05em;
text-transform: uppercase;
margin-bottom: 0.5rem;
filter: drop-shadow(0 0 30px rgba(0, 255, 204, 0.5));
}
.subtitle {
color: var(--text-secondary);
font-size: 0.9rem;
letter-spacing: 0.2em;
text-transform: uppercase;
}
.main-layout {
display: grid;
grid-template-columns: 350px 1fr;
gap: 2rem;
animation: fadeIn 1s ease-out 0.3s both;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.sidebar {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 1.5rem;
height: fit-content;
position: sticky;
top: 2rem;
backdrop-filter: blur(10px);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.media-type-tabs {
display: flex;
gap: 0.5rem;
margin-bottom: 1.5rem;
}
.tab-btn {
flex: 1;
padding: 0.75rem;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
color: var(--text-secondary);
font-family: 'Orbitron', sans-serif;
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.05em;
cursor: pointer;
border-radius: 6px;
transition: all 0.3s ease;
}
.tab-btn:hover {
background: var(--bg-primary);
border-color: var(--accent-primary);
color: var(--accent-primary);
}
.tab-btn.active {
background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
border-color: var(--accent-primary);
color: var(--text-primary);
font-weight: 700;
box-shadow: var(--shadow-glow);
}
.file-browser {
max-height: 600px;
overflow-y: auto;
padding-right: 0.5rem;
}
.file-browser::-webkit-scrollbar {
width: 6px;
}
.file-browser::-webkit-scrollbar-track {
background: var(--bg-tertiary);
border-radius: 3px;
}
.file-browser::-webkit-scrollbar-thumb {
background: var(--accent-primary);
border-radius: 3px;
}
.folder {
margin-bottom: 0.5rem;
}
.folder-header {
display: flex;
align-items: center;
padding: 0.6rem 0.8rem;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
font-size: 0.9rem;
}
.folder-header:hover {
background: var(--bg-primary);
border-color: var(--accent-primary);
transform: translateX(3px);
}
.folder-icon {
margin-right: 0.5rem;
font-size: 1.1rem;
transition: transform 0.2s ease;
}
.folder.open .folder-icon {
transform: rotate(90deg);
}
.folder-content {
display: none;
padding-left: 1.5rem;
margin-top: 0.5rem;
}
.folder.open .folder-content {
display: block;
}
.file-item {
display: flex;
align-items: center;
padding: 0.6rem 0.8rem;
margin-bottom: 0.3rem;
background: var(--bg-primary);
border: 1px solid transparent;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
font-size: 0.85rem;
}
.file-item:hover {
border-color: var(--accent-primary);
background: var(--bg-tertiary);
transform: translateX(5px);
box-shadow: -3px 0 0 0 var(--accent-primary);
}
.file-item.active {
background: linear-gradient(90deg, rgba(0, 255, 204, 0.15) 0%, transparent 100%);
border-color: var(--accent-primary);
color: var(--accent-primary);
box-shadow: -3px 0 0 0 var(--accent-primary);
}
.file-icon {
margin-right: 0.5rem;
font-size: 1rem;
}
.player-section {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 2rem;
backdrop-filter: blur(10px);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.player-container {
background: var(--bg-primary);
border: 2px solid var(--border-color);
border-radius: 12px;
padding: 2rem;
min-height: 400px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
}
.player-container::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle, rgba(0, 255, 204, 0.03) 0%, transparent 70%);
animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.1);
opacity: 0.8;
}
}
.player-placeholder {
text-align: center;
color: var(--text-secondary);
z-index: 1;
}
.player-placeholder-icon {
font-size: 4rem;
margin-bottom: 1rem;
opacity: 0.3;
}
video, audio {
max-width: 100%;
max-height: 500px;
border-radius: 8px;
box-shadow: 0 10px 40px rgba(201, 137, 225, 0.63);
z-index: 1;
}
audio {
width: 100%;
}
.now-playing {
margin-top: 1.5rem;
padding: 1.5rem;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 8px;
text-align: center;
}
.now-playing-label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--text-secondary);
margin-bottom: 0.5rem;
}
.now-playing-title {
font-family: 'Orbitron', sans-serif;
font-size: 1.3rem;
color: var(--accent-primary);
font-weight: 600;
}
.player-controls-row {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
margin-top: 1rem;
z-index: 1;
}
.audio-track-label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--text-secondary);
font-family: 'Orbitron', sans-serif;
}
.audio-track-select {
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 0.55rem 0.75rem;
border-radius: 8px;
outline: none;
min-width: 220px;
font-family: 'Archivo', sans-serif;
}
.audio-track-select:focus {
border-color: var(--accent-primary);
box-shadow: var(--shadow-glow);
}
.audio-track-hint {
color: var(--text-secondary);
font-size: 0.8rem;
margin-top: 0.5rem;
z-index: 1;
text-align: center;
}
.loading {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid var(--border-color);
border-top-color: var(--accent-primary);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
.overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.72);
backdrop-filter: blur(6px);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
padding: 1.5rem;
}
.login-card {
width: 100%;
max-width: 420px;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 14px;
box-shadow: 0 10px 40px rgba(0,0,0,0.6);
padding: 1.75rem;
}
.login-title {
font-family: 'Orbitron', sans-serif;
font-size: 1.4rem;
color: var(--accent-primary);
margin-bottom: 0.35rem;
}
.login-subtitle {
color: var(--text-secondary);
font-size: 0.9rem;
margin-bottom: 1.25rem;
}
.login-row {
display: flex;
flex-direction: column;
gap: 0.4rem;
margin-bottom: 0.9rem;
}
.login-row label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--text-secondary);
font-family: 'Orbitron', sans-serif;
}
.login-row input {
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 0.75rem 0.85rem;
border-radius: 10px;
outline: none;
font-family: 'Archivo', sans-serif;
}
.login-row input:focus {
border-color: var(--accent-primary);
box-shadow: var(--shadow-glow);
}
.login-actions {
display: flex;
gap: 0.75rem;
margin-top: 1rem;
align-items: center;
justify-content: space-between;
}
.btn {
cursor: pointer;
border: 1px solid var(--border-color);
border-radius: 10px;
padding: 0.75rem 1rem;
font-family: 'Orbitron', sans-serif;
letter-spacing: 0.05em;
text-transform: uppercase;
font-size: 0.85rem;
transition: all 0.2s ease;
background: var(--bg-tertiary);
color: var(--text-primary);
}
.btn-primary {
background: linear-gradient(135deg, #093c31 0%, var(--accent-secondary) 100%);
border-color: var(--accent-primary);
color: var(--text-primary);
font-weight: 700;
box-shadow: var(--shadow-glow);
}
.btn:hover {
transform: translateY(-1px);
}
.login-error {
color: #ff6b6b;
margin-top: 0.75rem;
font-size: 0.9rem;
display: none;
}
.topbar {
display: flex;
justify-content: flex-end;
margin-bottom: 1rem;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@media (max-width: 1024px) {
.main-layout {
grid-template-columns: 1fr;
}
.sidebar {
position: static;
}
h1 {
font-size: 2.5rem;
}
}