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

body {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
}

h1 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #4776E6, #8E54E9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    text-align: center;
    color: #9ca3af;
    margin-bottom: 40px;
}

.drop-area {
    border: 2px dashed #4776E6;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(71, 118, 230, 0.1);
}

.drop-area:hover {
    background-color: rgba(71, 118, 230, 0.15);
    border-color: #8E54E9;
}

.upload-icon img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 8px rgba(142, 84, 233, 0.6));
}

.preview-container, .prompt-container, .result-container {
    margin-top: 30px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
}

.preview-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

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

.remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e53e3e;
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

textarea {
    width: 100%;
    min-height: 120px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    color: white;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 10px;
}

.tip {
    font-size: 14px;
    color: #9ca3af;
    font-style: italic;
}

.generate-btn {
    display: block;
    width: 100%;
    padding: 16px;
    margin-top: 30px;
    background: linear-gradient(90deg, #4776E6, #8E54E9, #b037ff);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(71, 118, 230, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(71, 118, 230, 0.5);
    background: linear-gradient(90deg, #3a67d7, #7e44da, #a030f0);
}

.loading-container {
    margin-top: 30px;
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #4776E6;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

.progress-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #4776E6, #8E54E9);
    width: 0%;
    transition: width 0.5s ease;
}

.video-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#resultVideo {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.hidden {
    display: none;
}

.examples {
    margin-top: 50px;
}

.examples h3 {
    text-align: center;
    margin-bottom: 20px;
}

.example-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.example-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
}

.example-before img, .example-after video {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.arrow {
    font-size: 24px;
    color: #4776E6;
}

@media (max-width: 768px) {
    .example-grid {
        flex-direction: column;
    }
    
    .example-item {
        width: 100%;
    }
}