@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(90deg, #4a90e2, #50e3c2);
    color: #fff;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    margin: 0;
    font-weight: 700;
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.full-width {
    grid-column: 1 / -1;
}

label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #555;
}

input[type="text"],
input[type="number"],
textarea,
select {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #4a90e2;
    outline: none;
}

textarea {
    resize: vertical;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-group label {
    margin-bottom: 0;
    margin-right: 0.5rem;
}

button {
    grid-column: 1 / -1;
    padding: 1rem;
    background: linear-gradient(90deg, #50e3c2, #4a90e2);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: opacity 0.3s;
    margin-top: 1rem;
}

button:hover {
    opacity: 0.9;
}

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

#video-results {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

#video-results video {
    width: calc(50% - 0.5rem);
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hidden {
    display: none;
}

#loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #4a90e2;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

#error-container {
    color: #e74c3c;
    background-color: #fbeae5;
    border: 1px solid #e74c3c;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}