Subtrans / app /static /styles.css
arjun-ms's picture
Initial commit: Subtrans Subtitle Pipeline
57bbccb
:root {
--bg-color: #050505;
--panel-bg: rgba(25, 25, 28, 0.4);
--panel-border: rgba(255, 255, 255, 0.08);
--text-primary: #ffffff;
--text-secondary: #a1a1aa;
--accent-1: #ff2a5f;
--accent-2: #4a00e0;
--accent-glow: #08f7fe;
--font-heading: 'Syne', sans-serif;
--font-body: 'Epilogue', sans-serif;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: var(--bg-color);
color: var(--text-primary);
font-family: var(--font-body);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow-x: hidden;
position: relative;
padding: 2rem;
}
/* Subtle Film Grain */
.noise-overlay {
position: fixed;
top: 0; left: 0; width: 100%; height: 100%;
pointer-events: none;
z-index: 50;
opacity: 0.04;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}
/* Background Ambient Glowing Orbs */
.ambient-glow {
position: absolute;
border-radius: 50%;
filter: blur(90px);
opacity: 0.4;
z-index: -1;
animation: float 12s infinite alternate ease-in-out;
}
.glow-1 {
width: 450px; height: 450px;
background: radial-gradient(circle, var(--accent-1), transparent 70%);
top: -100px; left: -150px;
}
.glow-2 {
width: 550px; height: 550px;
background: radial-gradient(circle, var(--accent-2), transparent 70%);
bottom: -150px; right: -150px;
animation-delay: -6s;
}
@keyframes float {
0% { transform: translate(0, 0) scale(1); }
100% { transform: translate(40px, 60px) scale(1.1); }
}
.glass-panel {
background: var(--panel-bg);
backdrop-filter: blur(25px);
-webkit-backdrop-filter: blur(25px);
border: 1px solid var(--panel-border);
border-radius: 24px;
padding: 3.5rem;
width: 100%;
max-width: 500px;
box-shadow: 0 40px 80px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.05);
z-index: 10;
animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
opacity: 0;
transform: translateY(40px);
transition: all 0.5s ease;
}
@keyframes slideUp {
to { opacity: 1; transform: translateY(0); }
}
header {
margin-bottom: 2.5rem;
text-align: left;
}
.badge {
display: inline-block;
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 3px;
text-transform: uppercase;
color: var(--text-primary);
border: 1px solid rgba(255, 255, 255, 0.2);
padding: 6px 14px;
border-radius: 100px;
margin-bottom: 1.5rem;
background: rgba(255, 255, 255, 0.03);
}
h1 {
font-family: var(--font-heading);
font-size: 3.5rem;
font-weight: 800;
line-height: 1.05;
margin-bottom: 1.2rem;
letter-spacing: -0.04em;
}
.text-gradient {
background: linear-gradient(135deg, #fff, var(--accent-glow));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: inline-block;
position: relative;
}
.subtitle {
color: var(--text-secondary);
font-size: 1.05rem;
font-weight: 300;
line-height: 1.6;
}
.input-wrapper {
margin-bottom: 1.8rem;
}
.input-wrapper label {
display: block;
margin-bottom: 0.6rem;
font-size: 0.85rem;
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 1.5px;
}
/* File Drag & Drop */
.file-drop-area {
position: relative;
border: 1.5px dashed rgba(255, 255, 255, 0.2);
border-radius: 16px;
padding: 3rem 1.5rem;
text-align: center;
transition: all 0.3s ease;
background: rgba(0, 0, 0, 0.3);
cursor: pointer;
overflow: hidden;
}
.file-drop-area:hover, .file-drop-area.dragover {
border-color: var(--accent-glow);
background: rgba(8, 247, 254, 0.03);
box-shadow: inset 0 0 20px rgba(8, 247, 254, 0.05);
}
.file-drop-area.has-file {
border-style: solid;
border-color: var(--accent-1);
background: rgba(255, 42, 95, 0.05);
}
.file-drop-area svg {
color: var(--text-secondary);
margin-bottom: 1rem;
transition: color 0.3s, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.file-drop-area:hover svg {
color: var(--text-primary);
transform: translateY(-5px);
}
.file-message {
display: block;
font-size: 0.95rem;
color: var(--text-secondary);
font-weight: 400;
}
.highlight {
color: var(--text-primary);
font-weight: 500;
text-decoration: underline;
text-decoration-color: rgba(255,255,255,0.4);
text-underline-offset: 4px;
}
.file-drop-area input[type="file"] {
position: absolute;
top: 0; left: 0; width: 100%; height: 100%;
opacity: 0;
cursor: pointer;
}
/* Custom Select */
.custom-select {
position: relative;
}
.custom-select select {
width: 100%;
appearance: none;
background: rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.15);
color: var(--text-primary);
font-family: var(--font-body);
font-size: 1rem;
padding: 1.2rem 1.5rem;
border-radius: 12px;
cursor: pointer;
transition: all 0.3s;
}
.custom-select select:focus {
outline: none;
border-color: var(--accent-glow);
background: rgba(0, 0, 0, 0.5);
box-shadow: 0 0 0 4px rgba(8, 247, 254, 0.1);
}
.custom-select::after {
content: '';
position: absolute;
right: 1.5rem;
top: 50%;
transform: translateY(-50%);
width: 14px;
height: 14px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: center;
pointer-events: none;
}
.custom-select select option {
background: #111;
color: var(--text-primary);
padding: 1rem;
}
/* Submit Button */
button[type="submit"] {
width: 100%;
position: relative;
background: var(--text-primary);
color: var(--bg-color);
border: none;
padding: 1.2rem;
font-family: var(--font-heading);
font-size: 1.1rem;
font-weight: 700;
border-radius: 12px;
cursor: pointer;
overflow: hidden;
margin-top: 1rem;
transition: transform 0.2s, background 0.3s;
}
button[type="submit"]:hover {
transform: translateY(-2px);
background: #e2e2e2;
}
button[type="submit"]:active {
transform: translateY(1px);
}
button[type="submit"]:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.btn-glow {
position: absolute;
top: 0; left: -100%;
width: 50%; height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
transform: skewX(-20deg);
transition: 0.5s;
}
button[type="submit"]:hover .btn-glow {
left: 150%;
transition: 0.7s;
}
/* Toggle Switch */
.toggle-row {
margin-top: 0.5rem;
}
.toggle-label {
display: flex;
align-items: center;
gap: 0.8rem;
cursor: pointer;
user-select: none;
}
.toggle-label input[type="checkbox"] {
display: none;
}
.toggle-switch {
position: relative;
width: 44px;
height: 24px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 12px;
flex-shrink: 0;
transition: all 0.3s;
}
.toggle-switch::after {
content: '';
position: absolute;
top: 3px;
left: 3px;
width: 16px;
height: 16px;
background: var(--text-secondary);
border-radius: 50%;
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toggle-label input:checked + .toggle-switch {
background: rgba(8, 247, 254, 0.15);
border-color: var(--accent-glow);
}
.toggle-label input:checked + .toggle-switch::after {
left: 23px;
background: var(--accent-glow);
box-shadow: 0 0 8px rgba(8, 247, 254, 0.5);
}
.toggle-text {
font-size: 0.9rem;
font-weight: 500;
color: var(--text-primary);
}
.toggle-hint {
font-size: 0.75rem;
font-weight: 400;
color: var(--text-secondary);
}
/* Utilities */
.hidden {
display: none !important;
}
/* Loading State */
#loading {
margin-top: 3rem;
text-align: center;
animation: fadeIn 0.5s forwards;
}
.cyber-spinner {
position: relative;
width: 60px;
height: 60px;
margin: 0 auto 1.5rem;
}
.cyber-spinner .ring {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
border: 2px solid transparent;
}
.cyber-spinner .ring:nth-child(1) {
border-top-color: var(--accent-1);
border-left-color: var(--accent-1);
animation: spin1 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}
.cyber-spinner .ring:nth-child(2) {
border-bottom-color: var(--accent-glow);
border-right-color: var(--accent-glow);
animation: spin2 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}
@keyframes spin1 { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes spin2 { 0% { transform: rotate(0deg); } 100% { transform: rotate(-360deg); } }
.loading-text {
font-size: 0.95rem;
color: var(--text-secondary);
letter-spacing: 2px;
text-transform: uppercase;
font-weight: 500;
}
/* Results State */
#result {
margin-top: 1rem;
text-align: center;
animation: fadeIn 0.6s forwards;
}
.success-icon {
width: 56px; height: 56px;
border-radius: 50%;
background: rgba(8, 247, 254, 0.1);
color: var(--accent-glow);
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 1.5rem;
border: 1px solid rgba(8, 247, 254, 0.2);
}
#result h3 {
font-family: var(--font-heading);
font-size: 1.8rem;
margin-bottom: 2rem;
font-weight: 700;
}
.download-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.2rem;
}
.download-card {
background: rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 16px;
padding: 1.5rem;
text-decoration: none;
color: var(--text-primary);
display: flex;
flex-direction: column;
align-items: center;
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.download-card:hover {
background: rgba(255, 255, 255, 0.05);
border-color: var(--text-primary);
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.lang-tag {
font-family: var(--font-heading);
font-size: 0.8rem;
font-weight: 700;
letter-spacing: 1.5px;
background: var(--text-primary);
color: var(--bg-color);
padding: 4px 10px;
border-radius: 4px;
margin-bottom: 1rem;
}
.dl-text {
font-size: 0.95rem;
font-weight: 500;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(15px); }
to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
body { padding: 0; }
.glass-panel {
padding: 2.5rem 2rem;
border-radius: 0;
border: none;
min-height: 100vh;
box-shadow: none;
display: flex;
flex-direction: column;
justify-content: center;
}
h1 { font-size: 2.8rem; }
.download-grid { grid-template-columns: 1fr; }
}