.create {
  min-height: 100vh;
}

.create-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.create-header .brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.create-header .actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.create-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  margin: 28px 0 60px;
}

.slides {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.slides .slide {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color var(--transition);
}
.slides .slide:focus-within {
  border-color: var(--accent);
}

.slides .slide-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.slides .slide-head .num {
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.slides .slide-head .label {
  font-weight: 600;
  font-size: 15px;
}
.slides .slide-head .spacer {
  flex: 1;
}
.slides .slide-head .move,
.slides .slide-head .remove {
  background: transparent;
  color: var(--ink-soft);
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 8px;
  box-shadow: none;
}
.slides .slide-head .move:hover,
.slides .slide-head .remove:hover {
  background: var(--line);
  box-shadow: none;
}
.slides .slide-head .remove {
  color: var(--accent);
}

.transition-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}
.transition-pick select {
  font: inherit;
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.transition-pick select:hover { border-color: var(--accent); }
.transition-pick select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.slides .slide-head .preview-btn {
  background: transparent;
  color: var(--ink-soft);
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
  box-shadow: none;
}
.slides .slide-head .preview-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
}

.slides .slide textarea {
  margin-bottom: 14px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.media-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
}
.media-cell:hover {
  border-color: var(--accent);
  background: #fff;
}
.media-cell input[type="file"] {
  display: none;
}
.media-cell .placeholder {
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
  padding: 8px;
}
.media-cell .placeholder .icon {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
  opacity: 0.6;
}
.media-cell.has-media {
  border-style: solid;
  cursor: default;
  background: #000;
}
.media-cell img,
.media-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-cell .remove-media {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 26px;
  padding: 0;
  box-shadow: none;
}
.media-cell .remove-media:hover {
  background: var(--accent);
  box-shadow: none;
}
.media-cell.disabled {
  cursor: not-allowed;
  background: var(--bg);
  opacity: 0.55;
}

.add-slide {
  width: 100%;
  background: transparent;
  border: 1.5px dashed var(--line);
  color: var(--ink-soft);
  padding: 18px;
  border-radius: var(--radius);
  font-size: 15px;
}
.add-slide:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
  background: var(--accent-soft);
}

.side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 20px;
  align-self: start;
}
.side .panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.side h3 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.side .stat {
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
}
.side .hint-list {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--ink-soft);
  font-size: 13px;
}
.side .hint-list li {
  margin: 4px 0;
}
.side .submit {
  width: 100%;
  font-size: 16px;
  padding: 16px;
  background: var(--accent);
}

.title-field {
  margin-bottom: 20px;
}
.title-field label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 200ms, transform 200ms;
  pointer-events: none;
  z-index: 1000;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(6px);
}
.toast.error {
  background: #b94a3a;
}

@media (max-width: 900px) {
  .create-main {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
  }
}

/* ============ modal 容器（给 x-teleport 用，避免 inline display:flex 跟 x-show 冲突） ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}
.modal-overlay.preview-one {
  z-index: 110;
  background: rgba(5, 4, 3, 0.92);
  flex-direction: column;
  padding: 24px;
}
.modal-overlay.preview-all {
  z-index: 120;
  background: #0a0908;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}


/* ============ preview modal 按钮（统一简洁大方） ============ */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  font: inherit;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: background 180ms, transform 180ms, border-color 180ms;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.20);
}
.icon-btn:active { transform: scale(0.94); }

.icon-btn.size-sm { width: 40px; height: 40px; font-size: 16px; }
.icon-btn.size-md { width: 48px; height: 48px; font-size: 18px; }
.icon-btn.size-lg { width: 56px; height: 56px; font-size: 22px; }

.icon-btn.pill {
  width: auto;
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
  gap: 6px;
}
