/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    color: #e5e5e5;
    line-height: 1.6;
}

.container {
    width: 100%;
    margin: 0;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Professional Header */
.professional-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
    margin-bottom: 2rem;
}

.header-brand {
    display: flex;
    align-items: center;
}

.brand-name {
    font-size: 2rem;
    font-weight: 700;
    color: #e5e5e5;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-btn {
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #e5e5e5;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.settings-btn:hover {
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.2);
}

.settings-btn i {
    font-size: 1.1rem;
    color: #dc2626;
    transition: transform 0.3s ease;
}

.settings-btn:hover i {
    transform: rotate(90deg);
}

/* Main content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Form container */
.form-container {
    background: transparent;
    border-radius: 0;
    padding: 1rem 0;
    box-shadow: none;
    backdrop-filter: none;
    border: none;
}

.video-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

/* Checkbox styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: #e5e5e5;
    font-size: 0.875rem;
    flex-direction: row;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #404040;
    border-radius: 4px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: '\2713';
    color: white;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.checkbox-input:checked + .checkbox-custom {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border-color: #dc2626;
}

.checkbox-input:checked + .checkbox-custom::after {
    opacity: 1;
}

.checkbox-label:hover .checkbox-custom {
    border-color: #dc2626;
}

/* Prompt actions container (floating inside input) */
.prompt-actions {
    position: absolute;
    right: 0.5rem;
    bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    pointer-events: none;
    z-index: 1;
}

/* Prompt counter display */
.prompt-counter {
    background: #1a1a1a;
    color: #e5e5e5;
    border: 1px solid #404040;
    border-radius: 10px;
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
}

.prompt-counter i {
    color: #dc2626;
    font-size: 0.8rem;
}

.prompt-counter span {
    color: #dc2626;
    font-weight: 600;
    min-width: 12px;
    text-align: center;
}

/* Floating wand button inside label area */
.prompt-wand-btn {
    background: #2a2a2a;
    color: #e5e5e5;
    border: 1px solid #404040;
    border-radius: 10px;
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Ensure buttons remain interactive when container ignores pointer events */
.prompt-actions .prompt-wand-btn {
    pointer-events: auto;
}

.prompt-wand-btn i {
    color: #dc2626;
}

.prompt-wand-btn:hover {
    border-color: #dc2626;
    background: #1f1f1f;
}

.prompt-wand-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.prompt-wand-btn:disabled:hover {
    border-color: #404040;
    background: #2a2a2a;
}

.form-label {
    font-weight: 600;
    color: #e5e5e5;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: #dc2626;
    width: 16px;
}

.form-input {
    padding: 1rem;
    border: 2px solid #404040;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #1a1a1a;
    color: #e5e5e5;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: #dc2626;
    background: #2a2a2a;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* Wrapper to allow floating buttons inside the textarea */
.prompt-input-wrapper {
    position: relative;
}

/* Add space inside textarea for floating buttons */
.prompt-input-wrapper .form-textarea {
    padding-right: 8.5rem;
}

.form-hint {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* File upload */
.file-upload-container {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed #404040;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #1a1a1a;
}

.file-upload-label:hover {
    border-color: #dc2626;
    background: #2a2a2a;
}

.file-upload-label i {
    font-size: 2rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.file-upload-label span {
    color: #9ca3af;
    font-weight: 500;
}

.image-preview {
    margin-top: 1rem;
    display: none;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Bulk images preview grid */
.bulk-images-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.bulk-images-preview .thumb {
    position: relative;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.bulk-images-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.bulk-images-preview .idx {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Form row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Buttons */
.generate-btn {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.6);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Result container */
.result-container {
    background: transparent;
    border-radius: 0;
    padding: 1rem 0;
    box-shadow: none;
    border: none;
    display: none;
    text-align: center;
}

.result-container.show {
    display: block;
}

/* Loading state */
.loading-state {
    display: none;
}

.loading-state.active {
    display: block;
}

.loading-spinner {
    margin-bottom: 1.5rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #404040;
    border-top: 4px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.loading-state h3 {
    color: #e5e5e5;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.loading-state p {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #404040;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #991b1b);
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Success state */
.success-state {
    display: none;
}

.success-state.active {
    display: block;
}

/* Single Video Card - similar to bulk video cards */
.single-video-card {
    background: linear-gradient(145deg, #333333, #1a1a1a);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(220, 38, 38, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.single-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.single-video-card .card-status {
    color: #10b981;
}

/* Legacy support for video container (keeping for compatibility) */
.video-container {
    margin-bottom: 2rem;
    background: linear-gradient(145deg, #333333, #1a1a1a);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(220, 38, 38, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    max-width: 900px;
    margin: 0 auto 2rem;
}

.video-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.video-card-header h3 {
    color: #e5e5e5;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.video-card-header h3 i {
    color: #dc2626;
}

.video-card-header p {
    color: #9ca3af;
    font-size: 0.95rem;
    margin: 0;
}

.generated-video {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: #000;
}

.video-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    font-size: 0.95rem;
}

.download-btn {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
}

.download-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #7f1d1d);
    transform: translateY(-1px);
}

.secondary-btn {
    background: #2a2a2a;
    color: #e5e5e5;
    border: 2px solid #404040;
}

.secondary-btn:hover {
    background: #404040;
    border-color: #dc2626;
    transform: translateY(-1px);
}

.use-for-video-btn {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border: none;
}

.use-for-video-btn:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Error state */
.error-state {
    display: none;
}

.error-state.active {
    display: block;
}

.error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-state h3 {
    color: #e5e5e5;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.error-state p {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.error-state .action-btn {
    background: #ef4444;
    color: white;
}

.error-state .action-btn:hover {
    background: #dc2626;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .professional-header {
        padding: 1rem 0;
    }
    
    .brand-name {
        font-size: 1.5rem;
    }
    
    .form-container {
        padding: 1rem 0;
        border-radius: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .video-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1rem 0;
        margin: 0;
    }
    
    .generate-btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Modal responsive adjustments */
    .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    #promptGenModal .modal-body {
        max-height: calc(95vh - 160px);
    }
    
    #promptGenModal .form-textarea {
        max-height: 150px;
        min-height: 100px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container,
.result-container {
    animation: fadeIn 0.6s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    border-radius: 16px;
    border: 1px solid rgba(220, 38, 38, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.modal-header h2 {
    color: #e5e5e5;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h2 i {
    color: #dc2626;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.modal-close:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(220, 38, 38, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-shrink: 0;
}

/* Prompt Generator Modal Specific Styles */
#promptGenModal .modal-body {
    max-height: calc(90vh - 200px);
}

#promptGenModal .form-textarea {
    max-height: 180px;
    min-height: 100px;
    resize: vertical;
}

/* Mode Toggle Styles */
.mode-toggle-container {
    margin-bottom: 2rem;
}

.mode-toggle {
    display: flex;
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    border-radius: 12px;
    padding: 0.25rem;
    border: 1px solid rgba(220, 38, 38, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mode-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mode-btn.active {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.mode-btn:hover {
    color: #e5e5e5;
}

.mode-btn.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Bulk Generation Queue Styles */
.bulk-queue-container {
    background: transparent;
    border-radius: 0;
    padding: 1rem 0;
    box-shadow: none;
    border: none;
    margin-bottom: 2rem;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.queue-header h3 {
    color: #e5e5e5;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.queue-header h3 i {
    color: #dc2626;
}

.queue-controls {
    display: flex;
    gap: 0.75rem;
}

.control-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.control-btn:hover {
    transform: translateY(-1px);
}

.control-btn i {
    font-size: 0.875rem;
}

.queue-stats {
    margin-bottom: 2rem;
    text-align: center;
}

.queue-stats span {
    display: block;
    color: #9ca3af;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.queue-progress-bar {
    width: 100%;
    height: 8px;
    background: #404040;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.queue-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #991b1b);
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-pulse 2s ease-in-out infinite;
}

/* Video Cards Container */
.video-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Video Card Styles */
.video-card {
    background: linear-gradient(145deg, #333333, #1a1a1a);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(220, 38, 38, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-number {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
}

.card-status i {
    font-size: 1rem;
}

.card-content {
    margin-bottom: 1rem;
}

.card-prompt {
    color: #e5e5e5;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-image-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    text-align: center;
}

.card-image-preview img {
    width: 100%;
    max-width: 180px;
    max-height: 180px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.card-image-label {
    color: #9ca3af;
    font-size: 0.8rem;
    word-break: break-all;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-video-container {
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    text-align: center;
}

.card-video {
    width: 100%;
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-progress {
    margin-bottom: 1rem;
}

.card-progress-bar {
    width: 100%;
    height: 6px;
    background: #404040;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #991b1b);
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-pulse 2s ease-in-out infinite;
}

.card-message {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .card-actions {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .card-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

.card-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.card-btn i {
    font-size: 0.75rem;
}

.card-btn:hover {
    transform: translateY(-1px);
}

.download-btn {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
}

.download-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #7f1d1d);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.cancel-btn {
    background: #404040;
    color: #e5e5e5;
    border: 1px solid #505050;
}

.cancel-btn:hover {
    background: #505050;
    border-color: #dc2626;
}

/* Image Generation Styles */
.image-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Single Image Card - similar to video cards */
.single-image-card {
    background: linear-gradient(145deg, #333333, #1a1a1a);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(220, 38, 38, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.single-image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.single-image-card .card-status {
    color: #10b981;
}

/* Image Cards Container */
.image-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Image Card Styles */
.image-card {
    background: linear-gradient(145deg, #333333, #1a1a1a);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(220, 38, 38, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.card-image-container {
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    text-align: center;
}

.card-image {
    width: 100%;
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: contain;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Loading animation for image cards */
.image-card .card-progress {
    margin-bottom: 1rem;
}

.image-card .card-progress-bar {
    width: 100%;
    height: 6px;
    background: #404040;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.image-card .card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #991b1b);
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-pulse 2s ease-in-out infinite;
}

/* Bulk Image Queue specific styles */
#bulkImageQueueContainer .queue-header h3 {
    color: #e5e5e5;
}

#bulkImageQueueContainer .queue-header h3 i {
    color: #dc2626;
}

/* Mode toggle adjustments for 4 buttons */
.mode-toggle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    border-radius: 12px;
    padding: 0.25rem;
    border: 1px solid rgba(220, 38, 38, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .mode-toggle {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.25rem;
    }
}

.mode-btn {
    flex: none;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .mode-btn {
        font-size: 0.95rem;
        padding: 0.875rem 1.5rem;
    }
}

/* Responsive adjustments for bulk features */
@media (max-width: 768px) {
    .video-cards-container,
    .image-cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-video {
        max-width: 100%;
        max-height: 200px;
    }

    .card-image {
        max-width: 100%;
        max-height: 250px;
    }

    .queue-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .queue-controls {
        justify-content: center;
    }
    
    /* Modal adjustments for tablet */
    .modal-content {
        width: 92%;
        max-height: 85vh;
    }
    
    #promptGenModal .modal-body {
        max-height: calc(85vh - 180px);
    }
    
    #promptGenModal .form-textarea {
        max-height: 180px;
    }
}

@media (max-width: 480px) {
    .video-card,
    .image-card {
        padding: 1rem;
    }

    .card-video {
        max-width: 100%;
        max-height: 150px;
    }

    .card-image {
        max-width: 100%;
        max-height: 200px;
    }

}
