/* GIF Generator Styles */
.gif .image-container {
    border: none;
    margin: 0;
    padding: 0;
}

.gif-item .gif-display {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.gif-item .gif-display img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    margin: 0 auto;
}

.gif-item .no-gif {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #88aacc;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin-bottom: 20px;
}

.gif-item .no-gif span {
    font-size: 3em;
    margin-bottom: 10px;
    opacity: 0.5;
}

.gif-item .llm-prompt-display {
    padding: 12px 15px;
    font-size: 0.9em;
    color: #88aacc;
    background: rgba(106, 252, 255, 0.05);
    border: 1px solid rgba(106, 252, 255, 0.15);
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Source Image Section */
.source-image-section {
    margin-bottom: 20px;
}

.source-image-section>label {
    display: block;
    margin-bottom: 10px;
    color: #c8d4e0;
    font-weight: 500;
}

.source-preview {
    position: relative;
    max-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.source-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.source-preview .source-info {
    padding: 8px 12px;
    font-size: 0.85em;
    color: #88aacc;
    background: rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* Upload Area */
.upload-area {
    position: relative;
    border: 2px dashed rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 107, 107, 0.03);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.08);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #88aacc;
}

.upload-placeholder .upload-icon {
    font-size: 2.5em;
    opacity: 0.7;
}

.upload-placeholder .upload-hint {
    font-size: 0.8em;
    opacity: 0.7;
}

.upload-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.upload-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
}

.remove-upload {
    position: absolute;
    top: -8px;
    right: calc(50% - 108px);
    width: 24px;
    height: 24px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.remove-upload:hover {
    background: #ff4757;
}

/* Upload Selector */
.uploads-selector {
    margin-top: 15px;
}

.uploads-label {
    font-size: 0.85em;
    color: #88aacc;
    margin-bottom: 10px;
}

.uploads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
}

.upload-thumb-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.upload-thumb-item:hover {
    border-color: rgba(255, 107, 107, 0.5);
}

.upload-thumb-item.selected {
    border-color: #ff6b6b;
}

.upload-thumb-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.upload-thumb-item .selection-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 107, 107, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.upload-thumb-item.selected .selection-overlay {
    opacity: 1;
}

.upload-thumb-item .checkmark {
    color: white;
    font-size: 1.5em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Prompt Influence Slider */
.prompt-influence-wrap {
    margin-bottom: 20px;
}

.prompt-influence-wrap label {
    display: block;
    margin-bottom: 8px;
    color: #c8d4e0;
}

.prompt-influence-wrap .slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.prompt-influence-wrap .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
}

.prompt-influence-wrap .slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* GIF Output */
.gif-output {
    border-radius: 12px;
    overflow: hidden;
}

.gif-output img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Frame Info Panel */
.frame-info-panel {
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
    display: flex;
}

.frame-info-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.frame-count-display {
    font-size: 1.1em;
    color: #f0f6fc;
}

.frame-count-display strong {
    color: #ff6b6b;
    font-size: 1.3em;
}

.frame-calc {
    color: #88aacc;
    font-size: 0.9em;
}

/* Style Dropdown with Previews */
.style-dropdown .custom-dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
}

.style-dropdown .option-preview {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.style-dropdown .custom-dropdown-selected .option-preview {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-area {
        padding: 20px;
    }

    .uploads-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .gif-item .creation-meta-info .meta-item {
        font-size: 0.8em;
        padding: 3px 8px;
    }

    .frame-info-content {
        flex-direction: column;
        gap: 5px;
    }
}

/* Time Estimate Display */
.time-estimate {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 14px;
    color: var(--color-accent, #6afcff);
}

.time-estimate svg {
    width: 16px;
    height: 16px;
    opacity: 0.9;
}

#gif-time-text {
    font-weight: 500;
}

/* Video-to-GIF Mode Styles */
.video-to-gif-mode-info {}

.video-to-gif-mode-info .mode-description {
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-to-gif-mode-info .mode-icon {
    font-size: 2em;
    line-height: 1;
}

.video-to-gif-mode-info .mode-text strong {
    display: block;
    color: #6afcff;
    font-size: 1.05em;
    margin-bottom: 4px;
}

.video-to-gif-mode-info .mode-text p {
    margin: 0;
    color: #a8c4d8;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Video-to-GIF Info Panel */
.video-to-gif-info-panel {
    background: rgba(106, 252, 255, 0.05);
    border: 1px solid rgba(106, 252, 255, 0.15);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 15px;
}

.video-to-gif-info-panel .info-content p {
    margin: 0 0 8px 0;
    color: #a8c4d8;
    font-size: 0.9em;
    line-height: 1.5;
}

.video-to-gif-info-panel .info-content p:last-child {
    margin-bottom: 0;
}

.video-to-gif-info-panel .info-content strong {
    color: #6afcff;
}