/* Alpha — AI 创意案例中心 */

.tool-page-shell.is-creative-page .secondary-topbar {
  align-items: center;
  min-height: 72px;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 20px;
}

.tool-page-shell.is-creative-page .secondary-page-kicker {
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.95);
}

.tool-page-shell.is-creative-page .secondary-page-title {
  font-size: 1.125rem;
  letter-spacing: 0.01em;
}

.tool-page-shell.is-creative-page .secondary-page-desc {
  margin-top: 4px;
  max-width: min(720px, 58vw);
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(203, 213, 225, 0.88);
}

.tool-page-shell.is-creative-page .secondary-page-body {
  padding: 14px 20px 24px;
}

.secondary-page-panel.xh-creative-panel-host {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}

.xh-creative-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 0 20px;
  min-height: 100%;
  width: 100%;
}

.xh-creative-filter-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xh-creative-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.xh-creative-filter-label {
  flex: 0 0 auto;
  min-width: 36px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(148, 163, 184, 0.95);
}

.xh-creative-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.xh-creative-filters--type .xh-creative-filter {
  font-weight: 600;
}

.xh-creative-filter {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.55);
  color: rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}

.xh-creative-filter.is-active {
  border-color: rgba(167, 139, 250, 0.7);
  background: rgba(124, 58, 237, 0.28);
  color: #f5f3ff;
}

.xh-creative-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(148, 163, 184, 0.1);
}

.xh-creative-status.is-error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
}

.xh-creative-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.xh-creative-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.xh-creative-cover {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  aspect-ratio: 4 / 5;
  background: #0b1220;
  overflow: hidden;
}

.xh-creative-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xh-creative-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.xh-creative-type {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}

.xh-creative-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 14px;
}

.xh-creative-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xh-creative-meta {
  margin: 0;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xh-creative-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.xh-creative-tag {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.88);
  background: rgba(51, 65, 85, 0.55);
}

.xh-creative-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.xh-creative-actions .xh-creative-btn--primary {
  flex: 1 1 auto;
}

.xh-creative-btn {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.7);
  color: rgba(226, 232, 240, 0.95);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
}

.xh-creative-btn--primary {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(124, 58, 237, 0.35);
  color: #f5f3ff;
}

.xh-creative-empty,
.xh-creative-footnote {
  margin: 0;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.85);
}

html.xh-creative-viewer-open,
body.xh-creative-viewer-open {
  overflow: hidden;
}

.xh-creative-drawer.xh-creative-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.xh-creative-viewer-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 20% 10%, rgba(124, 58, 237, 0.18), transparent 55%),
    radial-gradient(ellipse 40% 35% at 85% 80%, rgba(6, 182, 212, 0.12), transparent 50%),
    rgba(2, 6, 23, 0.92);
}

.xh-creative-drawer-panel.xh-creative-viewer-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
  box-sizing: border-box;
}

.xh-creative-viewer-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 12px;
  color: #f8fafc;
}

.xh-creative-viewer-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.95);
}

.xh-creative-viewer-title {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
}

.xh-creative-viewer-meta {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(148, 163, 184, 0.95);
}

.xh-creative-icon-btn.xh-creative-viewer-close {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.xh-creative-viewer-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 20px;
  padding: 8px 24px 24px;
  box-sizing: border-box;
}

.xh-creative-viewer-preview {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(2, 6, 23, 0.55)),
    #020617;
  overflow: hidden;
}

.xh-creative-viewer-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xh-creative-viewer-media img,
.xh-creative-viewer-media video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  background: transparent;
}

.xh-creative-viewer-side {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: auto;
}

.xh-creative-prompt-box {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.45);
  padding: 14px 14px 12px;
}

.xh-creative-prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.95);
}

.xh-creative-prompt-text {
  margin: 0;
  flex: 1 1 auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(226, 232, 240, 0.95);
  overflow: auto;
  max-height: none;
}

.xh-creative-drawer-actions.xh-creative-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.xh-creative-viewer-actions .xh-creative-btn {
  padding: 11px 16px;
  font-size: 14px;
  border-radius: 12px;
}

.xh-creative-viewer-actions .xh-creative-btn--primary {
  flex: 1 1 auto;
}

.xh-creative-drawer-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.9);
}

@media (max-width: 1400px) {
  .xh-creative-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .xh-creative-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .xh-creative-viewer-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .xh-creative-viewer-preview {
    min-height: 42vh;
  }

  .xh-creative-viewer-media img,
  .xh-creative-viewer-media video {
    max-height: 48vh;
  }
}

@media (max-width: 900px) {
  .tool-page-shell.is-creative-page .secondary-page-desc {
    max-width: none;
  }

  .xh-creative-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .xh-creative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tool-page-shell.is-creative-page .secondary-topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .tool-page-shell.is-creative-page .secondary-topbar-tools {
    width: 100%;
    justify-content: flex-end;
  }

  .xh-creative-grid {
    grid-template-columns: 1fr;
  }

  .xh-creative-viewer-head,
  .xh-creative-viewer-body {
    padding-left: 14px;
    padding-right: 14px;
  }
}
