
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f5f6fa;
    --text-color: #34495e;
    --border-color: #bdc3c7;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
}

.upload-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
}

.file-input-wrapper .btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-input-wrapper .btn:hover {
    background-color: #2980b9;
}

.preview-container {
    margin-top: 20px;
    text-align: center;
}

.preview-container audio, .preview-container video {
    max-width: 100%;
    display: none;
}

#submitBtn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

#submitBtn:hover {
    background-color: #27ae60;
}

#submitBtn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#subtitles {
    background-color: black;
    color: white;
    padding: 10px;
    font-size: 18px;
    margin-top: 20px;
    min-height: 50px;
    text-align: left;
    white-space: pre-wrap;
}

.hidden {
    display: none;
}

#error-message {
    color: #e74c3c;
    margin-top: 10px;
}

#progress-bar {
    width: 100%;
    background-color: #ddd;
    margin-top: 10px;
}

#progress {
    width: 0%;
    height: 30px;
    background-color: var(--primary-color);
    text-align: center;
    line-height: 30px;
    color: white;
}

.hidden {
    display: none;
}

#live-subtitle {
    border: 1px solid #ccc;
    padding: 10px;
    margin: 10px 0;
    min-height: 50px;
    background-color: #f0f0f0;
}

#progress-bar {
    width: 100%;
    background-color: #ddd;
}

#progress {
    width: 0%;
    height: 30px;
    background-color: #4CAF50;
    text-align: center;
    line-height: 30px;
    color: white;
}

.download-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.download-button:hover {
    background-color: #45a049;
}