/* ------------ File Upload Styles ------------ */
/* Hide default file input */
.form-group input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Wrapper */
.file-upload-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 18px 20px;
    border: 2px dashed rgba(0, 212, 255, 0.4);
    border-radius: var(--border-radius-small);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-height: 80px;
    gap: 12px;
}

.file-upload-label:hover {
    border-color: var(--secondary-color);
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.file-upload-label:active {
    transform: translateY(1px);
}

.file-upload-icon {
    font-size: 1.5rem;
    opacity: 0.7;
    transition: var(--transition);
}

.file-upload-label:hover .file-upload-icon {
    opacity: 1;
    transform: translateY(-2px);
}

.file-upload-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-upload-text .main-text {
    font-weight: 600;
    font-size: 1rem;
}

.file-upload-text .sub-text {
    font-size: 0.85rem;
    opacity: 0.8;
}

.file-upload-label.has-file {
    border-style: solid;
    border-color: var(--secondary-color);
    background: rgba(0, 212, 255, 0.08);
    color: var(--text-primary);
}

.file-upload-label.has-file .file-upload-icon {
    color: var(--secondary-color);
    opacity: 1;
}

.file-upload-label.drag-over {
    border-color: var(--secondary-color);
    background: rgba(0, 212, 255, 0.1);
    color: var(--text-primary);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
    transform: scale(1.02);
}

.file-name {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: calc(var(--border-radius-small) / 2);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    border-left: 3px solid var(--secondary-color);
}

/* Thumbnail preview */
.poster-preview {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--border-radius-small);
    margin-top: 10px;
    display: none;
}

.file-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(255, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.file-upload-label.has-file+.file-remove {
    display: flex;
}

.file-remove:hover {
    background: rgba(255, 0, 0, 0.9);
    transform: scale(1.1);
}

.poster-overlay {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: max-content;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 6px),
        linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(40, 40, 60, 0.85));
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 12px;
    z-index: 5;
    border-radius: 0 0 var(--border-radius-small) var(--border-radius-small);
}

.poster-overlay.below {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    margin: 8px auto 0;
    width: max-content;
    border-radius: var(--border-radius-small);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.poster-overlay .overlay-arrow {
    color: var(--secondary-color);
    font-size: 48px;
    cursor: pointer;
    user-select: none;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.3s, transform 0.3s;
}

.poster-overlay .overlay-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.poster-overlay .thumb-container {
    display: flex;
    overflow: hidden;
    gap: 6px;
}


.poster-overlay .thumb-wrapper {
    position: relative;
    width: 75px;
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-overlay .thumb-wrapper .loading-spinner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 32px;
    height: 32px;
    border-width: 4px;
}

.poster-overlay .poster-thumb {
    width: 75px;
    height: auto;
    object-fit: cover;
    border-radius: var(--border-radius-small);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.poster-overlay .poster-thumb:hover {
    border-color: var(--secondary-color);
}

@media (max-width: 768px) {
    .file-upload-label {
        padding: 16px 18px;
        min-height: 70px;
    }

    .file-upload-icon {
        font-size: 1.3rem;
    }

    .file-upload-text .main-text {
        font-size: 0.9rem;
    }

    .file-upload-text .sub-text {
        font-size: 0.8rem;
    }
}

