/* ===== V8：创作页入口 ===== */
.v8-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.v8-title {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin: 0 0 6px;
}

.v8-subtitle {
  font-size: 14px;
  color: #888;
  margin: 0 0 28px;
}

/* 入口卡片 */
.v8-entry {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  border: 2px solid #eee;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 12px;
}
.v8-entry:hover {
  border-color: #F18D24;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(241,141,36,0.12);
}

.v8-entry-main {
  background: linear-gradient(135deg, #FFF8F0 0%, #fff 100%);
  border-color: #F18D24;
}

.v8-entry-icon {
  font-size: 36px;
  min-width: 48px;
  text-align: center;
}

.v8-entry-body {
  flex: 1;
}
.v8-entry-title {
  font-size: 17px;
  font-weight: 700;
  color: #222;
  margin-bottom: 4px;
}
.v8-entry-desc {
  font-size: 13px;
  color: #888;
}
.v8-entry-prompt {
  margin-top: 8px;
  font-size: 12px;
  color: #F18D24;
  background: #FFF8F0;
  padding: 6px 12px;
  border-radius: 8px;
}

.v8-entry-arrow {
  font-size: 20px;
  color: #ccc;
  transition: color .2s;
}
.v8-entry:hover .v8-entry-arrow {
  color: #F18D24;
}

/* ===== 对话输入框 ===== */
.v8-dialog-page {
  max-width: 580px;
  margin: 0 auto;
  padding: 20px;
}

.v8-back-btn {
  border: none;
  background: #f5f5f5;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  font-family: inherit;
  margin-bottom: 20px;
}
.v8-back-btn:hover {
  background: #e8e8e8;
}

.v8-dialog-title {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin: 0 0 8px;
}
.v8-dialog-subtitle {
  font-size: 14px;
  color: #888;
  margin: 0 0 24px;
}
.v8-dialog-input-area {
  margin-bottom: 20px;
}
.v8-dialog-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
  line-height: 1.6;
}
.v8-dialog-input:focus {
  border-color: #F18D24;
}
.v8-dialog-input::placeholder {
  color: #bbb;
}
.v8-dialog-send {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #F18D24;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.v8-dialog-send:hover {
  background: #d97d1e;
}
.v8-dialog-send:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.v8-dialog-hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #999;
}
.v8-dialog-hints span {
  white-space: nowrap;
}
.v8-hint-tag {
  padding: 6px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  background: #fafafa;
  cursor: pointer;
  font-size: 12px;
  color: #666;
  font-family: inherit;
  transition: all .15s;
}
.v8-hint-tag:hover {
  border-color: #F18D24;
  color: #F18D24;
  background: #FFF8F0;
}

/* ===== 面板 ===== */
.v8-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}
.v8-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.v8-panel-icon {
  font-size: 24px;
}
.v8-panel-title {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}
.v8-panel-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 20px 24px;
}
.v8-panel-left {
  padding-right: 20px;
  border-right: 1px solid #f0f0f0;
}
.v8-panel-right {
  padding-left: 20px;
}

/* ===== 表单控件 ===== */
.v8-field {
  margin-bottom: 18px;
}
.v8-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.v8-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 64px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.v8-textarea:focus {
  border-color: #F18D24;
}
.v8-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}
.v8-select:focus {
  border-color: #F18D24;
}
.v8-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.v8-input:focus {
  border-color: #F18D24;
}
.v8-input-number {
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.v8-input-number:focus {
  border-color: #F18D24;
}
.v8-size-preview {
  display: none;
  margin-top: 6px;
  padding: 6px 10px;
  background: #fafafa;
  border-radius: 6px;
  font-size: 12px;
  color: #888;
}
.v8-size-preview strong {
  color: #F18D24;
}

/* ===== 标签按钮 ===== */
.v8-tag-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.v8-tag {
  padding: 6px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: #555;
  transition: all 0.15s;
  font-family: inherit;
}
.v8-tag:hover {
  border-color: #F18D24;
  color: #F18D24;
}
.v8-tag.active {
  background: #FFF3E6;
  border-color: #F18D24;
  color: #F18D24;
  font-weight: 500;
}

/* ===== 引擎选择 ===== */
.v8-engine-group {
  display: flex;
  gap: 6px;
}
.v8-engine-btn {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  font-family: inherit;
  transition: all .2s;
}
.v8-engine-btn:hover {
  border-color: #F18D24;
}
.v8-engine-btn.active {
  border-color: #F18D24;
  background: #FFF8F0;
  color: #F18D24;
  font-weight: 600;
}

/* ===== 勾选框 ===== */
.v8-checkbox-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.v8-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
}
.v8-checkbox input[type="checkbox"] {
  accent-color: #F18D24;
  width: 14px;
  height: 14px;
}

/* ===== 色盘 ===== */
.v8-color-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.v8-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.v8-color-swatch:hover {
  transform: scale(1.15);
}
.v8-color-swatch.active {
  border-color: #F18D24;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #F18D24;
}
.v8-color-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: #f5f5f5;
  border: 1px dashed #ccc;
  color: #999;
}

/* ===== 滑块 ===== */
.v8-slider-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.v8-slider-group input[type="range"] {
  flex: 1;
  accent-color: #F18D24;
  height: 4px;
}
.v8-slider-val {
  font-size: 12px;
  color: #F18D24;
  font-weight: 600;
  min-width: 30px;
}

/* ===== 高级设置折叠 ===== */
.v8-advanced-toggle {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fafafa;
  border-radius: 8px;
  font-size: 12px;
  color: #888;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.v8-advanced-toggle:hover {
  background: #f0f0f0;
}
.v8-advanced-content {
  display: none;
  padding: 12px;
  background: #fafafa;
  border-radius: 0 0 8px 8px;
  margin-top: 0;
}
.v8-advanced-content.show {
  display: block;
}

/* ===== 上传区 ===== */
.v8-upload-zone {
  padding: 20px;
  border: 2px dashed #d9d9d9;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.v8-upload-zone:hover {
  border-color: #F18D24;
  background: #FFF8F0;
}
.v8-upload-icon {
  font-size: 28px;
  margin-bottom: 6px;
}
.v8-upload-text {
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}
.v8-upload-hint {
  font-size: 11px;
  color: #ccc;
}
.v8-upload-preview {
  position: relative;
  display: inline-block;
  margin-top: 8px;
}
.v8-upload-preview img {
  max-height: 120px;
  border-radius: 8px;
  border: 1px solid #eee;
}
.v8-upload-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: #F18D24;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  font-size: 14px;
  cursor: pointer;
}

/* ===== 按钮 ===== */
.v8-btn-generate {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #F18D24;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.v8-btn-generate:hover {
  background: #d97d1e;
}
.v8-btn-generate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.v8-btn-secondary {
  width: 100%;
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  font-family: inherit;
  margin-top: 6px;
}
.v8-btn-secondary:hover {
  border-color: #F18D24;
  color: #F18D24;
}
.v8-panel-actions {
  padding: 0 24px 20px;
}

/* ===== 结果展示区 ===== */
.v8-result-area {
  padding: 0 24px 20px;
}
.v8-result-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}
.v8-result-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}
.v8-result-body {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  white-space: pre-wrap;
}
.v8-result-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.v8-result-images img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #eee;
}
.v8-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
  color: #999;
}
.v8-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.v8-result-actions button {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #555;
  transition: all 0.15s;
}
.v8-result-actions button:hover {
  border-color: #F18D24;
  color: #F18D24;
}
.v8-result-actions button.v8-action-primary {
  background: #F18D24;
  color: #fff;
  border-color: #F18D24;
}
.v8-result-actions button.v8-action-primary:hover {
  background: #d97d1e;
}

/* ===== 版本标签栏 ===== */
.v8-version-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 12px;
}
.v8-version-label {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}
.v8-version-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.v8-version-tag {
  padding: 4px 12px;
  border: 1px solid #ddd;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: #666;
  transition: all .15s;
  font-family: inherit;
}
.v8-version-tag:hover { border-color: #F18D24; color: #F18D24; }
.v8-version-tag.active {
  background: #F18D24;
  color: #fff;
  border-color: #F18D24;
}

/* ===== 对话修改区 ===== */
.v8-revise-area {
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 8px;
}
.v8-revise-header {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}
.v8-revise-input-row {
  display: flex;
  gap: 8px;
}
.v8-revise-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.v8-revise-input:focus { border-color: #F18D24; }
.v8-revise-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #F18D24;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.v8-revise-btn:hover { background: #d97d1e; }
.v8-revise-btn:disabled { background: #ccc; cursor: not-allowed; }

/* ===== V8 三栏布局（完全自适应） ===== */
.v8-three-col { display: flex; height: calc(100vh - 110px); overflow: hidden; position: relative; }

/* 左栏：设置 */
.v8-col-left { 
  width: 30%; min-width: 240px; max-width: 45%; 
  background: #fff; border-right: 1px solid #eee; 
  display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0; 
}

/* 中栏：对话 */
.v8-col-center { 
  flex: 1 1 auto; min-width: 0; 
  display: flex; flex-direction: column; overflow: hidden; 
}

/* 右栏：结果 */
.v8-col-right { 
  width: 30%; min-width: 240px; max-width: 45%; 
  background: #fff; border-left: 1px solid #eee; 
  display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0; 
}

/* 小屏幕：堆叠布局 */
@media (max-width: 900px) {
  .v8-three-col { 
    flex-direction: column; height: auto; overflow: visible; 
  }
  .v8-col-left, .v8-col-center, .v8-col-right { 
    width: 100% !important; min-width: 0 !important; max-width: none !important;
    border: none; border-bottom: 1px solid #eee; flex-shrink: 1;
  }
  .v8-col-center { min-height: 300px; }
  .v8-resize-handle { display: none; }
}

/* 超小屏手机 */
@media (max-width: 480px) {
  .v8-col-header { padding: 8px 10px; font-size: 13px; }
  .v8-col-body { padding: 8px 10px; }
  .v8-field { margin-bottom: 10px; }
  .v8-textarea { font-size: 13px; padding: 6px 8px; }
  .v8-select { font-size: 12px; padding: 5px 8px; }
  .v8-tag { font-size: 11px; padding: 2px 8px; }
  .v8-btn-generate { font-size: 13px; padding: 8px; }
  .v8-msg-area { padding: 10px; }
  .v8-msg { max-width: 95%; font-size: 12px; padding: 8px 10px; }
  .v8-msg-input-area { padding: 8px 10px; }
  .v8-msg-input { font-size: 12px; padding: 6px 10px; }
  .v8-msg-send { font-size: 12px; padding: 6px 14px; }
}

/* 入口页移动端适配 */
@media (max-width: 600px) {
  .v8-page { padding: 20px 12px; }
  .v8-title { font-size: 20px; }
  .v8-subtitle { font-size: 13px; margin-bottom: 20px; }
  .v8-entry { padding: 14px 16px; gap: 12px; }
  .v8-entry-icon { font-size: 28px; min-width: 36px; }
  .v8-entry-title { font-size: 15px; }
  .v8-entry-desc { font-size: 12px; }
  .v8-entry-prompt { font-size: 11px; margin-top: 4px; }
  .v8-quick-list { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .v8-quick-card { padding: 10px 4px; }
  .v8-quick-icon { font-size: 20px; }
  .v8-quick-label-txt { font-size: 11px; }
}
.v8-col-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; flex-shrink: 0; }
.v8-col-body { flex: 1; overflow-y: auto; padding: 12px 14px; }
.v8-resize-handle { width: 4px; cursor: col-resize; background: transparent; flex-shrink: 0; transition: background .15s; }
.v8-resize-handle:hover, .v8-resize-handle.active { background: #F18D24; }
.v8-msg-area { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.v8-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.v8-msg-user { align-self: flex-end; background: #F18D24; color: #fff; border-bottom-right-radius: 4px; }
.v8-msg-ai { align-self: flex-start; background: #fff; color: #333; border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.v8-msg-input-area { display: flex; gap: 6px; padding: 10px 14px; border-top: 1px solid #eee; flex-shrink: 0; }
.v8-msg-input { flex: 1; padding: 8px 12px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 13px; font-family: inherit; outline: none; }
.v8-msg-input:focus { border-color: #F18D24; }
.v8-msg-send { padding: 8px 20px; border: none; border-radius: 8px; background: #F18D24; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.v8-msg-send:hover { background: #d97d1e; }
.v8-preview-empty { text-align: center; padding: 40px 0; color: #ccc; }
.v8-revise-status {
  font-size: 12px;
  color: #F18D24;
  margin-top: 6px;
  padding: 6px 10px;
  background: #FFF8F0;
  border-radius: 6px;
}

/* ===== V8 场景快捷卡片 ===== */
.v8-quick-grid {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.v8-quick-label {
  font-size: 12px;
  color: #999;
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: 2px;
}

.v8-quick-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.v8-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
}

.v8-quick-card:hover {
  border-color: #F18D24;
  background: #FFF8F0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(241,141,36,0.12);
}

.v8-quick-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
}

.v8-quick-label-txt {
  font-size: 12px;
  color: #555;
  white-space: nowrap;
}
