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

.video-generator {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.video-generator::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.video-generator::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

.container {
    position: relative;
    z-index: 1;
}

.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
    opacity: 0;
    transform: translateY(-30px);
    }
    to {
    opacity: 1;
    transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.hero-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

.upload-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 50px auto;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
    opacity: 0;
    transform: translateY(30px);
    }
    to {
    opacity: 1;
    transform: translateY(0);
    }
}

.upload-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    width: 280px;
    height: 320px;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.upload-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upload-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.upload-card:hover::before {
    opacity: 1;
}

.upload-card.active {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.upload-label {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.upload-hint {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    text-align: center;
}

input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    top: 0;
    left: 0;
    z-index: 3;
}

.preview-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    animation: zoomIn 0.4s ease-out;
}

@keyframes zoomIn {
    from {
    opacity: 0;
    transform: scale(0.8);
    }
    to {
    opacity: 1;
    transform: scale(1);
    }
}

.preview-container.show {
    display: flex;
}

.preview-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

.file-name {
    color: white;
    font-size: 0.85rem;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    background: rgba(0,0,0,0.3);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.arrow-container {
    animation: fadeInUp 0.8s ease-out 0.4s both;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
}

.arrow {
    font-size: 3rem;
    color: rgba(255,255,255,0.6);
    animation: slideRight 1.5s ease-in-out infinite;
}

@keyframes slideRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.action-section {
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.generate-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 18px 60px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(245, 87, 108, 0.4);
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(245, 87, 108, 0.6);
}

.generate-btn:hover:not(:disabled)::before {
    left: 100%;
}

.generate-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.2);
}

.generate-btn.processing {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    animation: processingPulse 1.5s ease-in-out infinite;
}

@keyframes processingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 30px;
}

.modal-title {
    font-weight: 700;
    font-size: 1.5rem;
}

.btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
}

#outputVideo {
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .upload-container { gap: 30px; }
    .upload-card { width: 240px; height: 280px; }
    .arrow { display: none; }
}
