/* Grok Video — полный дизайн в стиле Nano Banana / Midjourney */

/* Область результата (видео / плейсхолдер / загрузка / ошибка) */
.gv-result-area {
  width: 100%;
  min-height: 220px;
  margin-bottom: 1.5rem;
  background: var(--border-light, #f5f5f5);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 16px;
  padding: 1.5rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}

.gv-result-area:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.gv-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted, #888);
}

.gv-placeholder-icon {
  font-size: 3.5rem;
  opacity: 0.9;
}

.gv-placeholder-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary, #666);
}

.gv-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.gv-loading-pulse {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e8eef5 0%, #d0dce8 50%, #e8eef5 100%);
  background-size: 200% 200%;
  animation: gv-pulse 1.5s ease-in-out infinite;
  box-shadow: inset 0 2px 8px rgba(255,255,255,0.5);
}

@keyframes gv-pulse {
  0%, 100% { background-position: 0% 50%; opacity: 1; }
  50% { background-position: 100% 50%; opacity: 0.9; }
}

.gv-loading-text {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary, #666);
}

.gv-video-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border, #e0e0e0);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.gv-video {
  width: 100%;
  max-height: 420px;
  display: block;
  border-radius: 16px;
}

/* Блок ошибки — как в result-area на других страницах */
.gv-error-wrap .error-container {
  padding: 2rem 2.5rem;
  text-align: center;
  background: #fff5f5;
  border-radius: 16px;
  border: 1px solid #ffcdd2;
  margin: 0;
  max-width: 400px;
}

.gv-error-wrap .error-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.gv-error-wrap .error-message {
  font-size: 1rem;
  font-weight: 600;
  color: #d32f2f;
  margin-bottom: 1rem;
}

.gv-error-wrap .error-retry-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.gv-error-wrap .error-retry-btn:hover {
  opacity: 0.95;
}

/* Отступы между блоками в контейнере Grok Video */
.mj-container .gv-result-area + .prompt-row {
  margin-top: 0.5rem;
}

.mj-container .prompt-row {
  margin-bottom: 0.25rem;
}

.mj-container .generate-row {
  margin-bottom: 0.5rem;
}

.mj-container .gv-settings-bar {
  margin-bottom: 1rem;
}

.mj-container .upload-container {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.mj-container .upload-area.dragover {
  border-color: var(--accent, #0066FF);
  background: rgba(0, 102, 255, 0.06);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.12);
}

/* Подсказка под полем загрузки */
.gv-upload-hint {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted, #888);
  line-height: 1.4;
}

/* Превью загруженного изображения */
.gv-preview-wrap {
  margin-top: 1rem;
}

.gv-preview-item {
  position: relative;
  display: inline-block;
  max-width: 220px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s;
}

.gv-preview-item:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

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

.gv-preview-item .preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.gv-preview-item .preview-remove:hover {
  background: #c53030;
  transform: scale(1.08);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .mj-layout {
    padding: 0 12px;
  }

  .mj-container {
    max-width: 100%;
    padding: 0;
  }

  .mj-container .page-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .gv-result-area {
    min-height: 180px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
  }

  .gv-placeholder-icon {
    font-size: 2.75rem;
  }

  .gv-placeholder-text {
    font-size: 0.9375rem;
  }

  .gv-loading-pulse {
    width: 100px;
    height: 100px;
  }

  .gv-video {
    max-height: 280px;
  }

  .gv-video-wrap {
    border-radius: 12px;
  }

  .mj-container .prompt-row {
    margin-bottom: 0.5rem;
  }

  .mj-container .prompt-input-wrap .prompt-textarea {
    min-height: 80px;
    padding: 12px 14px;
    font-size: 1rem;
  }

  .mj-container .generate-row {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
  }

  .mj-container .gv-settings-bar {
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 10px;
  }

  .mj-container .gv-settings-bar .ratio-dropdown {
    min-width: 0;
  }

  .mj-container .btn-generate {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
  }

  .mj-container .price-tag {
    margin-left: 0;
  }

  .mj-container .upload-container {
    margin-top: 0.25rem;
    margin-bottom: 1.5rem;
  }

  .mj-container .upload-area {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .mj-container .upload-content .upload-icon {
    font-size: 2rem;
  }

  .mj-container .upload-content .upload-text {
    font-size: 0.875rem;
  }

  .gv-upload-hint {
    font-size: 0.75rem;
    margin-top: 8px;
  }

  .gv-preview-item {
    max-width: 160px;
  }
}
