/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #00ff88;
}

.generator-container {
    background-color: #2d2d2d;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

textarea {
    width: 100%;
    height: 150px;
    padding: 1rem;
    border: 2px solid #00ff88;
    border-radius: 5px;
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    background-color: #00ff88;
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

button:hover:not(:disabled) {
    background-color: #00cc66;
    transform: translateY(-2px);
}

.video-preview {
    position: relative;
    background-color: #1a1a1a;
    border-radius: 5px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #00ff88;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .generator-container {
        padding: 1rem;
    }
}