:root {
  --bg1: #2b0303;
  --bg2: #120202;

  --red: #8b0012;
  --gold: #f0c674;
  --foil: #d4af37;

  --text: rgba(255, 255, 255, 0.9);
  --muted: rgba(255, 255, 255, 0.62);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", "STKaiti", serif;
  background: radial-gradient(circle at 50% 18%, #3a0202 0%, #120202 72%);
  color: var(--text);
}

.bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 50% 18%,
      rgba(166, 28, 0, 0.32) 0%,
      rgba(18, 2, 2, 0.95) 70%
    ),
    linear-gradient(180deg, rgba(43, 3, 3, 0.48), rgba(18, 2, 2, 0.92));
  pointer-events: none;
}

.app {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px 16px 26px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(240, 198, 116, 0.16);
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.logo {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--gold);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.8px;
}

.badge {
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b0012 0%, #5d000c 100%);
  border: 1px solid rgba(212, 175, 55, 0.34);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  letter-spacing: 0.8px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(240, 198, 116, 0.14);
  backdrop-filter: blur(6px);
}

.panel-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 12px;
}

/* 选封面网格：6 张时观感更大 */
.coverflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 560px) {
  .coverflow {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cover {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(240, 198, 116, 0.18);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.55));
  opacity: 0.62;
  pointer-events: none;
}
.cover img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
}
.cover .tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(139, 0, 18, 0.78);
  border: 1px solid rgba(212, 175, 55, 0.32);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  letter-spacing: 0.4px;
}

/* 编辑页两栏 */
.grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 980px) {
  .grid2 {
    grid-template-columns: 420px 1fr;
    align-items: start;
  }
}
.col {
  min-width: 0;
}

.preview-box {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(240, 198, 116, 0.2);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}
.preview-box img {
  width: 100%;
  display: block;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

/* 表单 */
.field {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.field span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.4px;
}

input,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(240, 198, 116, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  outline: none;
}
textarea {
  resize: none;
}
input:focus,
textarea:focus {
  border-color: rgba(240, 198, 116, 0.82);
  box-shadow: 0 0 0 3px rgba(240, 198, 116, 0.12);
}

.row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.7px;
  transition: transform 0.12s ease;
  text-decoration: none;
  text-align: center;
}
.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(135deg, #f0c674 0%, #d4af37 100%);
  color: #4b0008;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(240, 198, 116, 0.18);
  color: rgba(255, 255, 255, 0.88);
}

/* 成品展示 */
.result-box {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(240, 198, 116, 0.2);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}
.result-box img {
  width: 100%;
  display: block;
}

.meta-block {
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(240, 198, 116, 0.14);
  background: rgba(0, 0, 0, 0.12);
}
.meta-line {
  font-weight: 900;
  letter-spacing: 0.4px;
}
.meta-bless {
  margin-top: 6px;
  font-weight: 800;
  color: rgba(240, 198, 116, 0.95);
}

.footer {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.4px;
}

/* loading */
.loading {
  position: fixed;
  inset: 0;
  background: rgba(18, 2, 2, 0.88);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
}
.loading.hidden {
  display: none;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(240, 198, 116, 0.3);
  border-top-color: rgba(240, 198, 116, 1);
  animation: spin 1s linear infinite;
}
.loading-text {
  color: rgba(240, 198, 116, 0.95);
  font-weight: 900;
  letter-spacing: 0.8px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
