/* TikTok Parody - Upload Feature Styles */

/* Info Banner */
.upload-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(254, 44, 85, 0.1);
    border: 1px solid rgba(254, 44, 85, 0.3);
    border-radius: 8px;
    margin-bottom: 24px;
}

.upload-info-banner .info-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.upload-info-banner .info-content {
    flex: 1;
}

.upload-info-banner .info-content p {
    margin: 0;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

.upload-info-banner .info-content p:first-child {
    margin-bottom: 4px;
}

.upload-info-banner .info-content strong {
    color: var(--accent-color);
}

/* Upload Steps */
.upload-step {
    display: none;
}

.upload-step.active {
    display: block;
}

/* Step 1: File Selection */
.upload-area {
    width: 100%;
}

.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--primary-bg);
}

.upload-dropzone:hover {
    border-color: var(--accent-color);
    background: rgba(254, 44, 85, 0.05);
}

.upload-dropzone.drag-over {
    border-color: var(--accent-color);
    background: rgba(254, 44, 85, 0.1);
    border-style: solid;
}

.upload-dropzone svg {
    margin: 0 auto 16px;
    opacity: 0.5;
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.upload-hint {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Step 2: Preview & Upload */
.video-preview {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--primary-bg);
    aspect-ratio: 9 / 16;
    max-height: 400px;
}

.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--primary-bg);
}

.caption-input-container {
    margin-bottom: 20px;
    position: relative;
}

.caption-input-container label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

#video-caption {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
}

.char-counter {
    position: absolute;
    bottom: -20px;
    right: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Upload Progress */
.upload-progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--success-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Upload Actions */
.upload-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.upload-actions button {
    flex: 1;
}

/* Step 3: Success */
.upload-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--primary-bg);
    font-weight: bold;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.upload-success h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.upload-success p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* File Validation Error */
.upload-error {
    padding: 12px 16px;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
}

.upload-error.show {
    display: block;
}

.upload-error p {
    font-size: 13px;
    color: #ff3b30;
    margin: 0;
}

/* Thumbnail Generation Preview */
.thumbnail-preview {
    margin-top: 16px;
    padding: 12px;
    background: var(--primary-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.thumbnail-preview-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.thumbnail-preview img {
    width: 100%;
    max-width: 200px;
    border-radius: 4px;
}

/* Username Prompt Modal Styles */
#username-modal .modal-body {
    padding: 24px;
}

#username-modal p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

#username-input {
    margin-bottom: 20px;
}

#submit-username-btn {
    width: 100%;
}

/* Loading State in Upload */
.upload-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 20px;
}

.upload-loading .spinner {
    width: 40px;
    height: 40px;
}

.upload-loading p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .upload-dropzone {
        padding: 40px 20px;
    }
    
    .video-preview {
        max-height: 300px;
    }
    
    .upload-success {
        padding: 30px 16px;
    }
    
    .success-icon {
        width: 64px;
        height: 64px;
        font-size: 36px;
    }
}

/* Drag and Drop Feedback */
.upload-dropzone.processing {
    opacity: 0.6;
    pointer-events: none;
}

.upload-dropzone.processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
