/* Cinematic Scene Pipeline Styles - Professional Studio Interface */

* {
  box-sizing: border-box;
}

.cinematic-pipeline-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header Section */
.cinematic-header {
  margin-bottom: 3rem;
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.cinematic-header h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
  line-height: 1.4;
  display: block;
}

.cinematic-header p {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
  line-height: 1.7;
  display: block;
  padding-top: 1rem;
  border-top: 1px solid rgba(102, 126, 234, 0.1);
}

/* Tabs Slider Wrapper */
.tabs-slider-wrapper {
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabs-slider-wrapper::-webkit-scrollbar {
  display: none;
}

.tabs-slider {
  display: flex;
  position: relative;
  background: #f8fafc;
  border-radius: 12px;
  padding: 6px;
  gap: 4px;
  min-width: max-content;
}

.tab-btn {
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: #64748b;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  border-radius: 8px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.tab-btn:hover {
  color: #667eea;
}

.tab-btn.active {
  color: #667eea;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

/* Old input-tabs fallback */
.input-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

/* Input Section */
.cinematic-input-section {
  background: #ffffff;
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

/* Image Upload Area */
.image-upload-area {
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.image-upload-area:hover {
  border-color: #667eea;
  background-color: rgba(102, 126, 234, 0.03);
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: #667eea;
}

.image-upload-area h3 {
  margin: 1rem 0;
  color: #1a1a1a;
  font-size: 1.1rem;
}

.image-upload-area p {
  color: #64748b;
  font-size: 0.9rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  color: #1a1a1a;
  background: #ffffff;
}

.form-group textarea::placeholder {
  color: #94a3b8;
}

.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Accordion */
.accordion {
  margin-bottom: 2rem;
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 8px;
  overflow: hidden;
}

.accordion-item {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  padding: 1.25rem;
  border: none;
  background: #f8fafc;
  color: #1a1a1a;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background-color 0.2s ease;
}

.accordion-header:hover {
  background: #f1f5f9;
}

.accordion-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: #667eea;
  transition: transform 0.3s ease;
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-item.open .accordion-content {
  max-height: 800px;
  padding: 1.5rem;
  border-top: 1px solid rgba(102, 126, 234, 0.1);
  background: #ffffff;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.form-group-compact {
  display: flex;
  flex-direction: column;
}

.form-group-compact label {
  margin-bottom: 0.5rem;
  color: #1a1a1a;
  font-weight: 500;
  font-size: 0.9rem;
}

.setting-display {
  padding: 0.75rem 1rem;
  background: rgba(102, 126, 234, 0.05);
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 6px;
  color: #1a1a1a;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group-compact small {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.form-group-compact select {
  padding: 0.75rem;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 6px;
  font-size: 0.95rem;
  color: #1a1a1a;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.form-group-compact select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Generate Button */
.btn-generate {
  width: 100%;
  padding: 1rem;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

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

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

/* Secondary Button */
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  background: #f1f5f9;
  color: #475569;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

/* Primary Button (for modals) */
.btn-primary {
  padding: 0.75rem 1.5rem;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Scenes Display */
.cinematic-scenes-section {
  margin-bottom: 2rem;
}

.scenes-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.scenes-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.scenes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Scene Card */
.scene-card {
  background: white;
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.scene-card:hover {
  border-color: #667eea;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
  transform: translateY(-2px);
}

.scene-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
}

.scene-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.scene-number {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.scene-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  word-wrap: break-word;
}

.scene-duration {
  display: inline-block;
  font-size: 0.85rem;
  color: #667eea;
  font-weight: 600;
  background: rgba(102, 126, 234, 0.1);
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  white-space: nowrap;
}

.scene-card-body {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
  max-height: 280px;
}

.scene-property {
  margin-bottom: 0.9rem;
}

.property-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #667eea;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.3rem;
}

.property-value {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
  padding: 0.5rem;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 5px;
}

.property-value.description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scene-card-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.btn-edit-scene {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid rgba(102, 126, 234, 0.3);
  background: white;
  color: #667eea;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.btn-edit-scene:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  background: #f8fafc;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #1a1a1a;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: #667eea;
}

.modal-body {
  padding: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a1a;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.modal-actions button {
  min-width: 110px;
}

/* Video Generation Status */
.video-generation-status {
  background: rgba(102, 126, 234, 0.05);
  border-left: 4px solid #667eea;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.video-status-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.video-status-item:last-child {
  margin-bottom: 0;
}

.status-icon {
  font-size: 1.25rem;
  min-width: 20px;
}

.status-icon.done {
  color: #10b981;
}

.status-icon.pending {
  color: #667eea;
  animation: spin 1s linear infinite;
}

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

.status-text {
  flex: 1;
}

.status-text-title {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.status-text-time {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Final Video Section */
.final-video-section {
  background: #f8fafc;
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  text-align: center;
}

/* Dark Mode Logic */
[data-theme="dark"] .cinematic-input-section {
  background: #1e293b;
  border-color: rgba(14, 165, 233, 0.3);
  color: #f1f5f9;
  box-shadow: 
      0 8px 24px rgba(0, 0, 0, 0.3),
      0 0 0 1px rgba(14, 165, 233, 0.1) inset;
}

[data-theme="dark"] .form-group label {
  color: #f1f5f9;
}

[data-theme="dark"] .form-group textarea {
  background: #0f172a;
  color: #f1f5f9;
  border-color: rgba(14, 165, 233, 0.2);
}

[data-theme="dark"] .accordion-header {
  background: #0f172a;
  color: #f1f5f9;
  border-bottom: 1px solid rgba(14, 165, 233, 0.2);
}

[data-theme="dark"] .accordion-content {
  background: #1e293b;
}

[data-theme="dark"] .setting-display {
  background: rgba(14, 165, 233, 0.1);
  color: #f1f5f9;
  border-color: rgba(14, 165, 233, 0.2);
}

[data-theme="dark"] .form-group-compact select {
  background: #0f172a;
  color: #f1f5f9;
  border-color: rgba(14, 165, 233, 0.2);
}

[data-theme="dark"] .tabs-slider {
  background: #0f172a;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

[data-theme="dark"] .tab-btn {
  color: #94a3b8;
}

[data-theme="dark"] .tab-btn.active {
  background: #1e293b;
  color: #06b6d4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .scene-card {
  background: #1e293b;
  border-color: rgba(14, 165, 233, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .scene-title {
  color: #f1f5f9;
}

[data-theme="dark"] .property-value {
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
}

[data-theme="dark"] .final-video-section {
  background: #1e293b;
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .modal-content {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

[data-theme="dark"] .modal-header {
  background: #0f172a;
  border-bottom-color: rgba(14, 165, 233, 0.2);
}

[data-theme="dark"] .modal-header h2 {
  color: #f1f5f9;
}

[data-theme="dark"] .image-upload-area,
[data-theme="dark"] .video-upload-area {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(14, 165, 233, 0.3);
}

[data-theme="dark"] .image-upload-area:hover,
[data-theme="dark"] .video-upload-area:hover {
  background: rgba(14, 165, 233, 0.05);
  border-color: #06b6d4;
}

[data-theme="dark"] .image-upload-area h3,
[data-theme="dark"] .video-upload-area h3 {
  color: #f1f5f9;
}

[data-theme="dark"] .image-upload-area p,
[data-theme="dark"] .video-upload-area p {
  color: #94a3b8;
}

/* Dark Mode Support */
.dark-mode .cinematic-header {
  border-bottom-color: rgba(102, 126, 234, 0.2);
}

.dark-mode .cinematic-header h1 {
  color: #f1f5f9;
}

.dark-mode .cinematic-header p {
  color: #cbd5e1;
}

.dark-mode .cinematic-input-section {
  background: #1e293b;
  border-color: rgba(102, 126, 234, 0.2);
}

.dark-mode .form-group label {
  color: #f1f5f9;
}

.dark-mode .form-group textarea {
  background: #0f172a;
  color: #f1f5f9;
  border-color: rgba(102, 126, 234, 0.2);
}

.dark-mode .accordion-header {
  background: #0f172a;
  color: #f1f5f9;
  border-bottom-color: rgba(102, 126, 234, 0.2);
}

.dark-mode .accordion-header:hover {
  background: #1e293b;
}

.dark-mode .accordion-item.open .accordion-content {
  background: #1e293b;
  border-top-color: rgba(102, 126, 234, 0.2);
}

.dark-mode .setting-display {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.2);
  color: #f1f5f9;
}

.dark-mode .form-group-compact select {
  background: #0f172a;
  color: #f1f5f9;
  border-color: rgba(102, 126, 234, 0.2);
}

.dark-mode .scene-card {
  background: #1e293b;
  border-color: rgba(102, 126, 234, 0.2);
}

.dark-mode .scene-title {
  color: #f1f5f9;
}

.dark-mode .property-value {
  background: rgba(102, 126, 234, 0.1);
  color: #cbd5e1;
}

.dark-mode .modal-content {
  background: #1e293b;
}

.dark-mode .modal-header {
  background: #0f172a;
  color: #f1f5f9;
  border-bottom-color: rgba(102, 126, 234, 0.2);
}

.dark-mode .modal-header h2 {
  color: #f1f5f9;
}

.dark-mode .form-group input[type="text"],
.dark-mode .form-group input[type="number"],
.dark-mode .form-group textarea {
  background: #0f172a;
  color: #f1f5f9;
  border-color: rgba(102, 126, 234, 0.2);
}

.dark-mode .final-video-section {
  background: #1e293b;
  border-color: rgba(102, 126, 234, 0.2);
}

.dark-mode .final-video-title {
  color: #f1f5f9;
}

/* Bottom Loading Indicator */
.bottom-loading-indicator {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 -4px 20px rgba(102, 126, 234, 0.3);
  padding: 1.5rem;
  z-index: 1000;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.loading-progress-container {
  max-width: 600px;
  margin: 0 auto;
}

.loading-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.loading-spinner-small {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

.loading-info {
  flex: 1;
}

.loading-message {
  color: #ffffff;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.loading-timer {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
}

.loading-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.6));
  border-radius: 3px;
  width: 0%;
  transition: width 1s ease-out;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Dark Mode */
.dark-mode .bottom-loading-indicator {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 -4px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive */
@media (max-width: 640px) {
  .bottom-loading-indicator {
    padding: 1rem;
  }
  
  .loading-content {
    gap: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .loading-spinner-small {
    width: 24px;
    height: 24px;
  }
  
  .loading-message {
    font-size: 0.9rem;
  }
}

.dark-mode .scenes-title {
  color: #f1f5f9;
}

.dark-mode .scenes-subtitle {
  color: #cbd5e1;
}

/* Professional Dark Mode Integration */
[data-theme="dark"] .cinematic-pipeline-container {
  color: #f1f5f9;
}

[data-theme="dark"] .cinematic-header h1 {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .cinematic-header p {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .cinematic-input-section {
  background: #1e293b !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .form-group label {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .form-group textarea {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: rgba(14, 165, 233, 0.2) !important;
}

[data-theme="dark"] .accordion-header {
  background: #0f172a !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .tabs-slider {
  background: #0f172a !important;
  border: 1px solid rgba(14, 165, 233, 0.2) !important;
}

[data-theme="dark"] .tab-btn {
  color: #94a3b8 !important;
}

[data-theme="dark"] .tab-btn.active {
  background: #1e293b !important;
  color: #06b6d4 !important;
}

[data-theme="dark"] .scene-card {
  background: #1e293b !important;
  border-color: rgba(14, 165, 233, 0.2) !important;
}

[data-theme="dark"] .property-value {
  background: rgba(15, 23, 42, 0.6) !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .final-video-section {
  background: #1e293b !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
}

[data-theme="dark"] .modal-content {
  background: #1e293b !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .image-upload-area,
[data-theme="dark"] .video-upload-area {
  background: rgba(15, 23, 42, 0.4) !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
}

/* RTL Support */
html[dir="rtl"] .scene-card-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .modal-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .modal-actions {
  flex-direction: row-reverse;
}

html[dir="rtl"] .form-row {
  direction: rtl;
}

html[dir="rtl"] .video-status-item {
  flex-direction: row-reverse;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW VEO 3.1/2.0 FEATURES STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Feature Info Box */
.feature-info-box {
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  margin-bottom: 2rem;
}

.feature-icon {
  font-size: 2.5rem;
  min-width: 60px;
  height: 60px;
  display: none; /* Hidden since we removed emojis */
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.feature-details h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
}

.feature-details p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.dark-mode .feature-details h3 {
  color: #f1f5f9;
}

.dark-mode .feature-details p {
  color: #cbd5e1;
}

/* Multi Image Upload */
.multi-image-upload {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-zone {
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-zone:hover {
  border-color: #667eea;
  background-color: rgba(102, 126, 234, 0.03);
}

.upload-zone p {
  margin: 0.5rem 0;
  color: #64748b;
}

.upload-zone small {
  color: #94a3b8;
  font-size: 0.85rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid rgba(102, 126, 234, 0.2);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(220, 38, 38, 0.9);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.preview-item .remove-btn:hover {
  background: #dc2626;
}

/* Video Upload Area */
.video-upload-area {
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-upload-area:hover {
  border-color: #667eea;
  background-color: rgba(102, 126, 234, 0.03);
}

.video-upload-area h3 {
  margin: 1rem 0 0.5rem;
  color: #1a1a1a;
  font-size: 1.05rem;
}

.video-upload-area p {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0;
}

.dark-mode .video-upload-area h3 {
  color: #f1f5f9;
}

.dark-mode .video-upload-area p {
  color: #cbd5e1;
}

/* Mask Upload Area */
.mask-upload-area {
  border: 2px dashed rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(139, 92, 246, 0.02);
}

.mask-upload-area:hover {
  border-color: #8b5cf6;
  background-color: rgba(139, 92, 246, 0.05);
}

.mask-upload-area h3 {
  margin: 1rem 0 0.5rem;
  color: #1a1a1a;
  font-size: 1rem;
}

.mask-upload-area p {
  color: #64748b;
  font-size: 0.85rem;
  margin: 0;
}

.dark-mode .mask-upload-area h3 {
  color: #f1f5f9;
}

.dark-mode .mask-upload-area p {
  color: #cbd5e1;
}

/* Hint Text */
.hint-text {
  display: block;
  margin-top: 0.5rem;
  color: #667eea;
  font-size: 0.85rem;
  font-style: italic;
}

/* Tabs - Allow wrapping for many tabs */
.input-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid rgba(102, 126, 234, 0.1);
  padding-bottom: 0.5rem;
}

.tab-btn {
  padding: 0.6rem 1rem;
  background: none;
  border: none;
  color: #64748b;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 6px 6px 0 0;
}

.tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: rgba(102, 126, 234, 0.08);
  border-radius: 6px 6px 0 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cinematic-pipeline-container {
    padding: 1rem;
  }

  .cinematic-header h1 {
    font-size: 1.5rem;
  }

  .cinematic-input-section {
    padding: 1.5rem;
  }

  .scenes-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .input-tabs {
    gap: 0.25rem;
  }

  .tab-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .feature-info-box {
    flex-direction: column;
    text-align: center;
  }

  .feature-icon {
    min-width: 50px;
    height: 50px;
    font-size: 2rem;
  }
}
