:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #bb86fc;
    --on-primary: #000000;
    --text-color: #ffffff;
    --text-secondary: #aaaaaa;
    --border-radius: 8px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    margin-top: 0;
    color: var(--primary-color);
}

header p {
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="file"],
input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    background-color: #2c2c2c;
    color: var(--text-color);
    box-sizing: border-box;
    font-size: 1rem;
}

small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

input:focus {
    outline: 2px solid var(--primary-color);
}

button[type="submit"],
.btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: var(--on-primary);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s;
    box-sizing: border-box;
}

button[type="submit"]:hover,
.btn:hover {
    background-color: #cca4fd;
}

button[type="submit"]:active,
.btn:active {
    transform: scale(0.98);
}

button:disabled {
    background-color: #555;
    color: #888;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

#status {
    text-align: center;
    margin-top: 2rem;
}

#result {
    margin-top: 2rem;
    text-align: center;
    background-color: #2c2c2c;
    padding: 1rem;
    border-radius: var(--border-radius);
}

#result h2 {
    margin-top: 0;
}

video {
    width: 100%;
    max-height: 300px;
    border-radius: var(--border-radius);
    background-color: #000;
    margin-bottom: 1rem;
}

.loader {
    border: 4px solid #333;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
