Files
videoscroller/frontend/styles.css

735 lines
13 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
width: 100%;
height: 100%;
-webkit-user-select: none;
user-select: none;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
background: #000;
overflow: hidden;
-webkit-user-select: none;
user-select: none;
-webkit-touch-callout: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
max-height: 100vh;
}
.container {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}
.video-container {
width: 100%;
height: 100%;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.video-item {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
opacity: 0;
transition: opacity 0.3s ease-in-out;
display: flex;
align-items: center;
justify-content: center;
background: #000;
touch-action: none;
z-index: 1;
}
.video-item.active {
opacity: 1;
z-index: 2;
}
.video-item.prev {
opacity: 0;
z-index: 1;
}
.video-item.next {
opacity: 0;
z-index: 1;
}
video {
width: 100%;
height: 100%;
object-fit: contain;
max-width: 100%;
max-height: 100%;
-webkit-user-select: none;
user-select: none;
-webkit-media-controls-panel: auto;
}
/* iOS Safari specific */
video::-webkit-media-controls {
display: none;
}
/* Mobile view - portrait */
@media (max-aspect-ratio: 1/1) {
video {
width: 100%;
height: auto;
object-fit: cover;
}
}
/* Desktop view - landscape */
@media (min-aspect-ratio: 1/1) {
video {
width: auto;
height: 100%;
object-fit: cover;
}
}
.video-info {
position: absolute;
top: 20px;
right: 20px;
color: white;
z-index: 10;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
pointer-events: none;
display: flex;
align-items: center;
gap: 10px;
padding-top: env(safe-area-inset-top);
padding-right: max(20px, env(safe-area-inset-right));
}
.video-title {
font-size: clamp(14px, 4vw, 24px);
font-weight: 600;
margin-bottom: 8px;
display: none;
}
.download-btn {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 20px;
pointer-events: all;
transition: all 0.2s;
flex-shrink: 0;
}
.download-btn:hover {
background: rgba(255, 255, 255, 0.3);
transform: scale(1.1);
}
.download-btn:active {
transform: scale(0.95);
}
.video-controls {
position: absolute;
bottom: 20px;
right: 20px;
display: flex;
flex-direction: column;
gap: 15px;
z-index: 10;
}
.control-btn {
width: 50px;
height: 50px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.3);
border: none;
color: white;
font-size: 20px;
cursor: pointer;
transition: background 0.2s, transform 0.2s;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(10px);
}
.control-btn:hover {
background: rgba(255, 255, 255, 0.5);
transform: scale(1.1);
}
.control-btn:active {
transform: scale(0.95);
}
.loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 18px;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s;
z-index: 20;
}
.loading.show {
opacity: 1;
}
.loading-bar {
position: absolute;
top: 0;
left: 0;
height: 3px;
background: linear-gradient(90deg, #ff006e, #00f5ff);
width: 0%;
transition: width 0.1s linear;
}
.gesture-indicator {
position: absolute;
top: 20px;
left: 20px;
color: rgba(255, 255, 255, 0.5);
font-size: 12px;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s;
}
.gesture-indicator.show {
opacity: 1;
}
/* Swipe animation */
.video-item.swipe-up {
animation: slideUp 0.3s ease-out forwards;
}
.video-item.swipe-down {
animation: slideDown 0.3s ease-out forwards;
}
@keyframes slideUp {
from {
transform: translateY(0);
}
to {
transform: translateY(-100%);
}
}
@keyframes slideDown {
from {
transform: translateY(0);
}
to {
transform: translateY(100%);
}
}
/* Loading spinner */
.spinner {
border: 3px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top: 3px solid #fff;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* ===== LOGIN SCREEN ===== */
.login-screen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s;
}
.login-screen.active {
opacity: 1;
pointer-events: all;
}
.login-container {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(10px);
padding: 40px;
border-radius: 20px;
border: 1px solid rgba(255, 255, 255, 0.1);
max-width: 400px;
width: 90%;
text-align: center;
}
.login-container h1 {
font-size: 48px;
color: #fff;
margin-bottom: 10px;
font-weight: 700;
}
.login-container p {
color: rgba(255, 255, 255, 0.7);
margin-bottom: 30px;
font-size: 16px;
}
#loginForm {
display: flex;
flex-direction: column;
gap: 15px;
}
#pinInput {
padding: 15px;
border: 2px solid rgba(255, 255, 255, 0.2);
border-radius: 10px;
background: rgba(255, 255, 255, 0.1);
color: white;
font-size: 24px;
text-align: center;
letter-spacing: 10px;
transition: all 0.3s;
}
#pinInput:focus {
outline: none;
border-color: #00f5ff;
background: rgba(255, 255, 255, 0.15);
box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
}
#loginForm button {
padding: 15px;
border: none;
border-radius: 10px;
background: linear-gradient(135deg, #ff006e, #00f5ff);
color: white;
font-size: 18px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
#loginForm button:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(255, 0, 110, 0.3);
}
#loginForm button:active {
transform: translateY(0);
}
.error-message {
display: none;
color: #ff4444;
font-size: 14px;
padding: 10px;
background: rgba(255, 68, 68, 0.1);
border-radius: 8px;
border: 1px solid rgba(255, 68, 68, 0.3);
margin-top: 10px;
}
/* ===== MAIN APP ===== */
.main-app {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s;
overflow: hidden;
}
.main-app.active {
opacity: 1;
pointer-events: all;
}
.app-header {
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(10px);
padding: 15px 20px;
padding-top: max(15px, env(safe-area-inset-top));
padding-left: max(20px, env(safe-area-inset-left));
padding-right: max(20px, env(safe-area-inset-right));
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
z-index: 50;
position: sticky;
top: 0;
transition: transform 0.3s ease;
}
.app-header.hidden {
transform: translateY(-100%);
position: fixed;
}
.app-header h2 {
color: white;
font-size: 20px;
font-weight: 600;
}
.header-buttons {
display: flex;
gap: 10px;
}
.btn-small {
padding: 8px 16px;
background: rgba(255, 255, 255, 0.1);
color: white;
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s;
}
.btn-small:hover {
background: rgba(255, 255, 255, 0.2);
}
.btn-small:active {
transform: scale(0.95);
}
.video-viewer-container {
flex: 1;
position: relative;
overflow: hidden;
cursor: pointer;
}
/* ===== MODAL ===== */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: none;
align-items: center;
justify-content: center;
z-index: 999;
}
.modal.show {
display: flex;
}
.modal-content {
background: rgba(20, 20, 30, 0.95);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 15px;
padding: 30px;
max-width: 500px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.modal-header h3 {
color: white;
font-size: 24px;
}
.close-btn {
background: none;
border: none;
color: white;
font-size: 32px;
cursor: pointer;
transition: transform 0.2s;
line-height: 1;
}
.close-btn:hover {
transform: scale(1.2);
}
#uploadForm {
display: flex;
flex-direction: column;
gap: 15px;
}
#uploadForm input[type="file"],
#uploadForm input[type="password"] {
padding: 12px;
border: 2px solid rgba(255, 255, 255, 0.2);
border-radius: 8px;
background: rgba(255, 255, 255, 0.05);
color: white;
font-size: 16px;
transition: all 0.3s;
}
#uploadForm input[type="file"]::file-selector-button {
background: linear-gradient(135deg, #ff006e, #00f5ff);
color: white;
border: none;
padding: 10px 20px;
border-radius: 6px;
cursor: pointer;
font-weight: 600;
transition: all 0.3s;
}
#uploadForm input[type="file"]::file-selector-button:hover {
transform: translateY(-2px);
}
#uploadForm input:focus {
outline: none;
border-color: #00f5ff;
background: rgba(255, 255, 255, 0.1);
box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}
#uploadForm button {
padding: 12px;
background: linear-gradient(135deg, #ff006e, #00f5ff);
color: white;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
#uploadForm button:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(255, 0, 110, 0.3);
}
#uploadForm button:active {
transform: translateY(0);
}
.progress-bar {
width: 100%;
height: 6px;
background: rgba(255, 255, 255, 0.1);
border-radius: 3px;
overflow: hidden;
margin-top: 10px;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, #ff006e, #00f5ff);
width: 0%;
transition: width 0.2s;
}
.file-drop-zone {
border: 2px dashed rgba(0, 245, 255, 0.5);
border-radius: 12px;
padding: 40px 20px;
text-align: center;
cursor: pointer;
transition: all 0.3s;
background: rgba(0, 245, 255, 0.05);
}
.file-drop-zone:hover {
border-color: rgba(0, 245, 255, 0.8);
background: rgba(0, 245, 255, 0.1);
}
.file-drop-zone.drag-over {
border-color: #00f5ff;
background: rgba(0, 245, 255, 0.2);
transform: scale(1.02);
}
.file-drop-zone p {
color: rgba(255, 255, 255, 0.7);
font-size: 14px;
margin: 0;
}
.drop-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
display: none;
align-items: center;
justify-content: center;
z-index: 9999;
pointer-events: none;
}
.drop-overlay.active {
display: flex;
pointer-events: auto;
}
.drop-indicator {
color: white;
font-size: 32px;
font-weight: bold;
text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
animation: pulse 1s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
#progressList {
display: flex;
flex-direction: column;
gap: 12px;
}
.progress-item {
padding: 10px;
background: rgba(255, 255, 255, 0.05);
border-radius: 6px;
border-left: 3px solid #00f5ff;
}
.progress-item-name {
font-size: 12px;
color: rgba(255, 255, 255, 0.8);
margin-bottom: 6px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.progress-item-bar {
width: 100%;
height: 4px;
background: rgba(255, 255, 255, 0.1);
border-radius: 2px;
overflow: hidden;
}
.progress-item-fill {
height: 100%;
background: linear-gradient(90deg, #ff006e, #00f5ff);
width: 0%;
transition: width 0.2s ease;
}
.progress-item.success {
border-left-color: #00ff00;
}
.progress-item.error {
border-left-color: #ff0000;
}
#loginError,
#uploadError {
color: #ff6b6b;
font-size: 14px;
padding: 10px;
background: rgba(255, 107, 107, 0.1);
border-radius: 6px;
border: 1px solid rgba(255, 107, 107, 0.3);
margin-top: 10px;
}
/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
.app-header {
padding: 12px 15px;
}
.app-header h2 {
font-size: 18px;
}
.btn-small {
padding: 6px 12px;
font-size: 12px;
}
.login-container {
padding: 30px 20px;
}
.login-container h1 {
font-size: 36px;
}
.modal-content {
padding: 20px;
}
.modal-header h3 {
font-size: 20px;
}
}