- Complete PHP web application for video subtitle generation - AI-powered transcription using OpenAI Whisper - Translation support via DeepL API (46+ languages) - Video processing with FFmpeg subtitle burning - Dual processing modes: Translate & Burn, and Reburn Subtitles - Comprehensive production installation guide - SystemD service configuration for production deployment - Dark mode responsive web interface - Automated file cleanup and logging system 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
553 lines
No EOL
12 KiB
CSS
Executable file
553 lines
No EOL
12 KiB
CSS
Executable file
/* Import Montserrat font */
|
|
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');
|
|
|
|
/* Variables for consistent colors */
|
|
:root {
|
|
/* Light Mode Colors */
|
|
--primary-color: #2c3e50;
|
|
--secondary-color: #fca12e;
|
|
--accent-color: #e74c3c;
|
|
--success-color: #27ae60;
|
|
--background-color: #ecf0f1;
|
|
--container-bg: #ffffff;
|
|
--text-color: #2c3e50;
|
|
--border-color: #bdc3c7;
|
|
--hover-color: #e39429;
|
|
--subtitle-bg: #f9f9f9;
|
|
--download-bg: #2c3e50;
|
|
--download-hover: #fca12e;
|
|
|
|
/* Font weights */
|
|
--font-light: 300;
|
|
--font-regular: 400;
|
|
--font-medium: 500;
|
|
--font-semibold: 600;
|
|
--font-bold: 700;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Montserrat', sans-serif;
|
|
font-weight: var(--font-regular);
|
|
line-height: 1.6;
|
|
margin: 0;
|
|
padding: 20px;
|
|
background-color: var(--background-color);
|
|
color: var(--text-color);
|
|
transition: background-color 0.3s ease, color 0.3s ease;
|
|
}
|
|
|
|
/* Dark Mode Styles */
|
|
.dark-mode {
|
|
--primary-color: #fca12e;
|
|
--secondary-color: #fca12e;
|
|
--accent-color: #f28b82;
|
|
--success-color: #81c995;
|
|
--background-color: #202124;
|
|
--container-bg: #2a2a2a;
|
|
--text-color: #e8eaed;
|
|
--border-color: #5f6368;
|
|
--hover-color: #e39429;
|
|
--subtitle-bg: #333333;
|
|
--download-bg: #fca12e;
|
|
--download-hover: #e39429;
|
|
}
|
|
|
|
.container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
background-color: var(--container-bg);
|
|
padding: 30px;
|
|
border-radius: 12px;
|
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
h1 {
|
|
text-align: center;
|
|
color: var(--primary-color);
|
|
margin-bottom: 30px;
|
|
font-size: 2.2em;
|
|
font-weight: var(--font-bold);
|
|
letter-spacing: -0.5px;
|
|
}
|
|
|
|
h2 {
|
|
color: var(--primary-color);
|
|
font-size: 1.5em;
|
|
margin-bottom: 20px;
|
|
font-weight: var(--font-semibold);
|
|
letter-spacing: -0.3px;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 25px;
|
|
}
|
|
|
|
.subtitle-styling .form-group {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-weight: var(--font-medium);
|
|
color: var(--primary-color);
|
|
letter-spacing: 0.2px;
|
|
}
|
|
|
|
input[type="file"],
|
|
select {
|
|
width: 100%;
|
|
padding: 12px;
|
|
border: 2px solid var(--border-color);
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-family: 'Montserrat', sans-serif;
|
|
font-weight: var(--font-regular);
|
|
transition: border-color 0.3s ease;
|
|
}
|
|
|
|
input[type="file"]:focus,
|
|
select:focus {
|
|
border-color: var(--secondary-color);
|
|
outline: none;
|
|
}
|
|
|
|
select {
|
|
appearance: none;
|
|
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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: right 1rem center;
|
|
background-size: 1em;
|
|
padding-right: 2.5rem;
|
|
}
|
|
|
|
button {
|
|
background-color: var(--secondary-color);
|
|
color: white;
|
|
padding: 12px 24px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
width: 100%;
|
|
font-size: 16px;
|
|
font-weight: var(--font-semibold);
|
|
font-family: 'Montserrat', sans-serif;
|
|
letter-spacing: 0.3px;
|
|
transition: background-color 0.3s ease, transform 0.2s ease;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: var(--hover-color);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
button:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.progress-bar {
|
|
height: 8px;
|
|
background-color: var(--background-color);
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background-color: var(--success-color);
|
|
width: 0%;
|
|
animation: progress 2s infinite linear;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
@keyframes progress {
|
|
0% { width: 0%; }
|
|
100% { width: 100%; }
|
|
}
|
|
|
|
#status {
|
|
text-align: center;
|
|
color: var(--primary-color);
|
|
font-weight: var(--font-medium);
|
|
margin-top: 10px;
|
|
letter-spacing: 0.2px;
|
|
}
|
|
|
|
.download-links {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
margin-top: 25px;
|
|
}
|
|
|
|
.download-button {
|
|
display: block;
|
|
background-color: var(--download-bg);
|
|
color: white;
|
|
text-decoration: none;
|
|
padding: 14px 24px;
|
|
border-radius: 6px;
|
|
text-align: center;
|
|
font-weight: var(--font-semibold);
|
|
letter-spacing: 0.3px;
|
|
transition: all 0.3s ease;
|
|
margin: 20px
|
|
}
|
|
|
|
.download-button:hover {
|
|
background-color: var(--download-hover);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* Tabs styling */
|
|
.tabs {
|
|
margin-bottom: 30px;
|
|
border-bottom: 2px solid var(--border-color);
|
|
display: flex;
|
|
gap: 5px;
|
|
}
|
|
|
|
.tab-button {
|
|
padding: 12px 24px;
|
|
margin-bottom: -2px;
|
|
border: none;
|
|
background: none;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
font-weight: var(--font-medium);
|
|
color: var(--text-color);
|
|
font-family: 'Montserrat', sans-serif;
|
|
letter-spacing: 0.2px;
|
|
transition: all 0.3s ease;
|
|
border-bottom: 2px solid transparent;
|
|
width: auto;
|
|
}
|
|
|
|
.tab-button:hover {
|
|
color: var(--secondary-color);
|
|
background-color: transparent;
|
|
transform: none;
|
|
}
|
|
|
|
.tab-button.active {
|
|
border-bottom: 2px solid var(--secondary-color);
|
|
color: var(--secondary-color);
|
|
font-weight: var(--font-semibold);
|
|
}
|
|
|
|
.tab-content {
|
|
padding: 25px 0;
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 600px) {
|
|
.container {
|
|
padding: 20px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.8em;
|
|
}
|
|
|
|
.tab-button {
|
|
padding: 10px 15px;
|
|
font-size: 14px;
|
|
}
|
|
}
|
|
|
|
|
|
/* Custom file input styling */
|
|
|
|
/* Hide the default file input */
|
|
input[type="file"] {
|
|
width: 0.1px;
|
|
height: 0.1px;
|
|
opacity: 0;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
z-index: -1;
|
|
}
|
|
|
|
/* Custom file input label */
|
|
input[type="file"] + label {
|
|
display: inline-block;
|
|
padding: 12px 24px;
|
|
background-color: var(--secondary-color);
|
|
color: white;
|
|
font-family: 'Montserrat', sans-serif;
|
|
font-weight: var(--font-semibold);
|
|
font-size: 14px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s ease, transform 0.2s ease;
|
|
text-align: center;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
input[type="file"] + label:hover {
|
|
background-color: var(--hover-color);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
input[type="file"] + label:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* File name display */
|
|
.file-info {
|
|
margin-top: 8px;
|
|
font-size: 14px;
|
|
color: var(--primary-color);
|
|
font-family: 'Montserrat', sans-serif;
|
|
font-weight: var(--font-regular);
|
|
}
|
|
|
|
/* Subtitle styling options */
|
|
.subtitle-styling {
|
|
border: 1px solid var(--border-color);
|
|
padding: 12px;
|
|
margin-bottom: 20px;
|
|
border-radius: 8px;
|
|
background-color: var(--subtitle-bg);
|
|
}
|
|
|
|
.subtitle-styling h3 {
|
|
margin-top: 0;
|
|
margin-bottom: 10px;
|
|
color: var(--primary-color);
|
|
font-size: 1em;
|
|
font-weight: var(--font-medium);
|
|
letter-spacing: -0.2px;
|
|
}
|
|
|
|
.form-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.form-group.half {
|
|
width: calc(50% - 8px);
|
|
}
|
|
|
|
/* Make inputs more consistent */
|
|
.subtitle-styling input[type="number"],
|
|
.subtitle-styling select {
|
|
width: 100%;
|
|
padding: 8px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
font-family: 'Montserrat', sans-serif;
|
|
font-weight: var(--font-regular);
|
|
transition: border-color 0.3s ease;
|
|
box-sizing: border-box;
|
|
height: 32px;
|
|
}
|
|
|
|
.subtitle-styling input[type="number"]:focus,
|
|
.subtitle-styling select:focus {
|
|
border-color: var(--secondary-color);
|
|
outline: none;
|
|
}
|
|
|
|
.subtitle-styling label {
|
|
font-size: 13px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
/* Authentication styles */
|
|
.auth-container {
|
|
z-index: 1000;
|
|
background-color: var(--container-bg);
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
/* Sign-in state: centered and prominent */
|
|
.auth-container.sign-in-state {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
padding: 40px 60px;
|
|
text-align: center;
|
|
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.auth-container.sign-in-state .auth-button {
|
|
background-color: var(--secondary-color);
|
|
color: white;
|
|
padding: 15px 30px;
|
|
border: none;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font-size: 18px;
|
|
font-weight: var(--font-semibold);
|
|
font-family: 'Montserrat', sans-serif;
|
|
transition: background-color 0.3s ease, transform 0.2s ease;
|
|
min-width: 140px;
|
|
}
|
|
|
|
.auth-container.sign-in-state .auth-button:hover {
|
|
background-color: var(--hover-color);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
/* Sign-out state: upper left and compact */
|
|
.auth-container.sign-out-state {
|
|
position: fixed;
|
|
top: 20px;
|
|
left: 20px;
|
|
padding: 10px 15px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.auth-section {
|
|
margin: 5px 0;
|
|
}
|
|
|
|
/* Default auth button styles (for sign-out state) */
|
|
.auth-container.sign-out-state .auth-button {
|
|
background-color: var(--secondary-color);
|
|
color: white;
|
|
padding: 6px 12px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
font-weight: var(--font-medium);
|
|
font-family: 'Montserrat', sans-serif;
|
|
transition: background-color 0.3s ease;
|
|
min-width: 80px;
|
|
}
|
|
|
|
.auth-container.sign-out-state .auth-button:hover {
|
|
background-color: var(--hover-color);
|
|
}
|
|
|
|
.auth-container.sign-out-state .auth-button.secondary {
|
|
background-color: var(--accent-color);
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.auth-container.sign-out-state .auth-button.secondary:hover {
|
|
background-color: #c0392b;
|
|
}
|
|
|
|
.user-info {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
}
|
|
|
|
#welcomeMessage {
|
|
font-size: 12px;
|
|
font-weight: var(--font-medium);
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.user-info span {
|
|
color: var(--primary-color);
|
|
font-weight: var(--font-medium);
|
|
font-size: 16px;
|
|
}
|
|
|
|
/* Dark mode toggle button */
|
|
.dark-mode-toggle {
|
|
position: fixed;
|
|
top: 70px;
|
|
right: 20px;
|
|
z-index: 1000;
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
background-color: var(--secondary-color);
|
|
border: none;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
|
color: white;
|
|
transition: background-color 0.3s ease;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.dark-mode-toggle:hover {
|
|
background-color: var(--hover-color);
|
|
}
|
|
|
|
/* Responsive adjustments for styling options */
|
|
@media (max-width: 600px) {
|
|
.form-row {
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.form-group.half {
|
|
width: 100%;
|
|
}
|
|
|
|
.subtitle-styling {
|
|
padding: 10px;
|
|
}
|
|
|
|
.subtitle-styling input[type="number"],
|
|
.subtitle-styling select {
|
|
padding: 6px;
|
|
}
|
|
|
|
.dark-mode-toggle {
|
|
top: 60px;
|
|
right: 10px;
|
|
width: 36px;
|
|
height: 36px;
|
|
}
|
|
|
|
/* Sign-in state mobile adjustments */
|
|
.auth-container.sign-in-state {
|
|
padding: 30px 40px;
|
|
width: 90%;
|
|
max-width: 320px;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
|
|
.auth-container.sign-in-state .auth-button {
|
|
padding: 12px 24px;
|
|
font-size: 16px;
|
|
min-width: 120px;
|
|
}
|
|
|
|
/* Sign-out state mobile adjustments */
|
|
.auth-container.sign-out-state {
|
|
top: 10px;
|
|
left: 10px;
|
|
padding: 8px 12px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.user-info {
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.auth-container.sign-out-state .auth-button.secondary {
|
|
margin-left: 0;
|
|
margin-top: 8px;
|
|
}
|
|
} |