* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f8fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
}

p {
    text-align: center;
    margin-bottom: 30px;
    color: #7f8c8d;
}

.subtitle {
    color: #666;
    margin-bottom: 20px;
}

.api-notice {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 10px 15px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.api-notice p {
    margin: 0;
    color: #795548;
}

.api-notice a {
    color: #0277bd;
    text-decoration: underline;
}

.api-notice a:hover {
    color: #01579b;
}

.upload-container {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #3498db;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #ecf0f1;
}

.upload-area:hover, .upload-area.active {
    background-color: #e3e8ec;
    border-color: #2980b9;
    transform: scale(1.01);
}

.upload-area.no-drag-support {
    border-style: dashed;
    background-color: #f9f9f9;
}

.no-drag-msg {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 10px;
    font-style: italic;
}

.upload-icon {
    margin-bottom: 15px;
    color: #3498db;
}

.browse-text {
    color: #3498db;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    padding: 2px 4px;
    transition: all 0.2s ease;
}

.browse-text:hover {
    color: #2980b9;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 4px;
}

.preview-container {
    margin-top: 20px;
    text-align: center;
}

#image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.preview-actions {
    margin-top: 15px;
}

.prompt-container {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 100px;
    font-size: 14px;
}

.options-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.option {
    flex: 1;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.primary-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.primary-btn:hover {
    background-color: #2980b9;
}

.primary-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.secondary-btn {
    padding: 8px 16px;
    background-color: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background-color: #dfe6e9;
}

.result-container {
    margin-top: 40px;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.video-container {
    margin-bottom: 20px;
    text-align: center;
}

#result-video {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.loading-container, .error-container {
    text-align: center;
    margin: 40px 0;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: #3498db;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.error-container {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    margin: 20px auto;
}

.error-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

#error-message {
    color: #e53935;
    margin-bottom: 15px;
}

#dismiss-error-btn {
    background-color: #fff;
    border: 1px solid #e53935;
    color: #e53935;
}

#dismiss-error-btn:hover {
    background-color: #ffebee;
}

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

@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 20px auto;
    }
    
    .options-container {
        flex-direction: column;
        gap: 10px;
    }
}