/* ==================== 全局样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #050505;
  color: #e5e5e5;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==================== 顶部导航栏 ==================== */
.header {
  height: 70px;
  min-height: 56px;
  max-height: 80px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  transition: all 0.3s;
}

.brand-icon:hover {
  border-color: #D4AF37;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.brand-icon span {
  font-family: 'Noto Serif SC', serif;
  font-size: 20px;
  font-weight: bold;
  color: #D4AF37;
}

.brand-text span {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  letter-spacing: 2px;
  color: white;
  transition: color 0.3s;
}

.header-brand:hover .brand-text span {
  color: #D4AF37;
}

.header-nav {
  display: flex;
  gap: 16px;
}

.nav-item {
  background: transparent;
  border: none;
  color: #888;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: #D4AF37;
  background: rgba(212, 175, 55, 0.1);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.credits-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
}

.credits-display i {
  color: #D4AF37;
  font-size: 14px;
}

.credits-value {
  color: #D4AF37;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
}

.credits-label {
  color: #888;
  font-size: 11px;
  text-transform: uppercase;
}

/* ==================== 主内容区 ==================== */
.main-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ==================== 左侧控制面板 ==================== */
.control-panel {
  width: 320px;
  min-width: 280px;
  max-width: 400px;
  background: #0f0f0f;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  margin: 16px 0 16px 16px;
  border-radius: 12px 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-right: none;
  overflow: hidden;
}

.panel-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: #111;
}

.panel-header h3 {
  font-size: 15px;
  font-weight: bold;
  color: #e5e5e5;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.app-number {
  padding: 4px 12px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 6px;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: #D4AF37;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.panel-content::-webkit-scrollbar {
  width: 6px;
}

.panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: bold;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

/* 模式选择器 */
.mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #888;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 12px;
}

.mode-btn i {
  font-size: 20px;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: #e5e5e5;
}

.mode-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent);
  border-color: rgba(212, 175, 55, 0.3);
  color: #D4AF37;
}

/* 图片上传 */
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 180px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-area:hover {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(255, 255, 255, 0.02);
}

.upload-area i {
  font-size: 36px;
  color: #555;
  margin-bottom: 12px;
}

.upload-area p {
  color: #888;
  font-size: 14px;
  margin-bottom: 6px;
}

.upload-hint {
  color: #555;
  font-size: 11px;
}

.image-preview {
  position: relative;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
}

.remove-image {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.remove-image:hover {
  background: #ef4444;
  border-color: #ef4444;
}

/* 提示词输入 */
textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e5e5e5;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
}

textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

textarea::placeholder {
  color: #444;
}

.char-counter {
  text-align: right;
  font-size: 11px;
  color: #555;
  margin-top: 6px;
}

/* 选项网格 */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.option-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent);
  border-color: rgba(212, 175, 55, 0.3);
}

.option-label {
  font-size: 13px;
  font-weight: 600;
  color: #888;
}

.option-btn.active .option-label {
  color: #D4AF37;
}

.option-value {
  font-size: 11px;
  color: #555;
}

.option-btn.active .option-value {
  color: #999;
}

/* 底部按钮 */
.panel-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #0a0a0a;
}

.generate-btn {
  width: 100%;
  height: 50px;
  background: linear-gradient(90deg, #D4AF37, #F3E5AB, #D4AF37);
  border: none;
  border-radius: 8px;
  color: #000;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
  position: relative;
  overflow: hidden;
}

.generate-btn:hover:not(:disabled) {
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
  transform: translateY(-1px);
}

.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shortcut-hint {
  text-align: center;
  margin-top: 10px;
  font-size: 11px;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==================== 右侧预览区 ==================== */
.preview-section {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.preview-canvas {
  flex: 1;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
}

/* 空状态 */
.empty-state {
  text-align: center;
  color: #555;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 18px;
  color: #888;
  margin-bottom: 10px;
  font-weight: 500;
}

.empty-state p {
  font-size: 14px;
  color: #555;
}

/* 视频容器 */
.video-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.video-container video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.video-actions {
  position: absolute;
  bottom: 30px;
  right: 30px;
  display: flex;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-container:hover .video-actions {
  opacity: 1;
}

.action-btn {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.action-btn:hover {
  background: rgba(212, 175, 55, 0.9);
  border-color: #D4AF37;
  transform: scale(1.1);
}

/* 进度覆盖层 */
.progress-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.progress-content {
  text-align: center;
  max-width: 400px;
  padding: 40px;
}

.spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 24px;
  border: 4px solid rgba(212, 175, 55, 0.1);
  border-top-color: #D4AF37;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.progress-content h3 {
  font-size: 20px;
  color: white;
  margin-bottom: 12px;
}

.progress-content p {
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #D4AF37, #F3E5AB);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s;
}

.progress-percent {
  font-size: 18px;
  font-weight: bold;
  color: #D4AF37;
}

/* ==================== 历史记录面板 ==================== */
.history-panel {
  width: 300px;
  min-width: 260px;
  max-width: 360px;
  background: #0f0f0f;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  margin: 16px 16px 16px 0;
  border-radius: 0 12px 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: none;
  overflow: hidden;
}

.history-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: #111;
}

.history-header h4 {
  font-size: 13px;
  font-weight: bold;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.refresh-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #D4AF37;
  border-color: rgba(212, 175, 55, 0.3);
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #555;
}

.history-empty i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.history-empty p {
  font-size: 12px;
}

.history-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(212, 175, 55, 0.3);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.history-item-status {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.status-completed {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.status-failed {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.status-processing {
  background: rgba(212, 175, 55, 0.1);
  color: #D4AF37;
}

.history-item-time {
  font-size: 10px;
  color: #555;
}

.history-item-prompt {
  font-size: 11px;
  color: #888;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================== 消息提示 ==================== */
.toast-container {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 300px;
  padding: 16px 20px;
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease;
}

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

.toast-icon {
  font-size: 18px;
}

.toast-success {
  border-left: 3px solid #22c55e;
}

.toast-success .toast-icon {
  color: #22c55e;
}

.toast-error {
  border-left: 3px solid #ef4444;
}

.toast-error .toast-icon {
  color: #ef4444;
}

.toast-warning {
  border-left: 3px solid #f59e0b;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-info {
  border-left: 3px solid #3b82f6;
}

.toast-info .toast-icon {
  color: #3b82f6;
}

.toast-message {
  flex: 1;
  color: #e5e5e5;
  font-size: 13px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
  .control-panel {
    width: 280px;
  }
  
  .history-panel {
    width: 260px;
  }
}

@media (max-width: 900px) {
  .header-nav {
    display: none;
  }
  
  .history-panel {
    display: none;
  }
}


