/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--color-fog);
  font-weight: 400;
  border-top: 1px solid var(--color-silk);
}

.footer a {
  color: var(--color-steel);
  font-weight: 500;
}

/* ===== 赞赏栏 ===== */
.donation-bar {
  text-align: center;
  padding: 0 16px calc(var(--tabbar-h) + 24px);
}

.donation-bar-inner {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--color-bone);
  border-radius: var(--radius-card);
  padding: 18px 28px;
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
  justify-content: center;
}

.donation-icon {
  width: 22px;
  height: 22px;
  color: var(--color-steel);
  display: flex;
  align-items: center;
  justify-content: center;
}

.donation-icon svg {
  width: 22px;
  height: 22px;
}

.donation-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-graphite);
}

.donation-btn {
  font-size: 13px;
  font-weight: 600;
  color: #2f7a57;
  background: #e6f5ed;
  border: 1px solid #bfe3d1;
  padding: 9px 26px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: rgba(47, 122, 87, 0.15) 0 4px 12px -2px;
}

.donation-btn:hover {
  background: #d5efe0;
  box-shadow: rgba(47, 122, 87, 0.2) 0 8px 18px -2px;
  transform: translateY(-1px);
}

.donation-btn:active {
  transform: translateY(0);
}

/* ===== 赞赏弹窗 ===== */
.donation-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donation-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 22, 0.45);
  backdrop-filter: blur(6px);
}

.donation-modal-card {
  position: relative;
  background: var(--color-bone);
  border-radius: var(--radius-card);
  padding: 36px 32px 28px;
  max-width: 420px;
  width: calc(100% - 40px);
  text-align: center;
  box-shadow: var(--shadow-modal);
  animation: fadeUp 0.35s ease;
  z-index: 1;
}

.donation-modal-card h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 500;
  color: var(--color-charcoal);
  margin-bottom: 6px;
}

.donation-modal-card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--color-steel);
}

.donation-subtitle {
  font-size: 13px;
  color: var(--color-fog);
  margin-bottom: 24px;
  font-weight: 400;
}

.donation-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-silk);
  background: var(--color-bone);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-steel);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.donation-modal-close:hover {
  background: var(--color-cream);
  border-color: var(--color-steel);
}

.donation-qrcode-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 12px 16px;
}

.donation-qrcode-box {
  width: 160px;
  height: 160px;
  border: 1px solid var(--color-silk);
  border-radius: var(--radius-item);
  overflow: hidden;
  background: var(--color-bone);
  display: flex;
  align-items: center;
  justify-content: center;
}

.donation-qrcode-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.donation-qrcode-placeholder {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-fog);
  font-weight: 400;
  text-align: center;
  padding: 12px;
}

.donation-qrcode-placeholder svg {
  width: 32px;
  height: 32px;
  color: var(--color-mist);
}

.donation-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-steel);
}

.donation-note {
  font-size: 12px;
  color: var(--color-fog);
  margin-top: 4px;
  font-weight: 400;
}

/* ===== 页脚按钮：幽灵胶囊 ===== */
.footer-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-graphite);
  background: var(--color-cream);
  border: 1px solid var(--color-silk);
  padding: 7px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.footer-btn:hover {
  border-color: var(--color-steel);
  background: var(--color-bone);
  transform: translateY(-1px);
}

/* ===== 通用弹窗 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 22, 0.45);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  background: var(--color-bone);
  border-radius: var(--radius-card);
  padding: 32px 28px 28px;
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-modal);
  animation: fadeUp 0.35s ease;
  z-index: 1;
  margin: auto;
}

.modal-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 500;
  color: var(--color-charcoal);
  margin-bottom: 6px;
}

.modal-card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--color-steel);
}

.modal-subtitle {
  font-size: 13px;
  color: var(--color-fog);
  margin-bottom: 24px;
  font-weight: 400;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-silk);
  background: var(--color-bone);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-steel);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.modal-close:hover {
  background: var(--color-cream);
  border-color: var(--color-steel);
}

/* ===== 表单样式 ===== */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-graphite);
  margin-bottom: 6px;
}

.form-group .required {
  color: var(--color-steel);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-silk);
  border-radius: var(--radius-item);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-graphite);
  background: var(--color-bone);
  outline: none;
  transition: all 0.2s;
  font-weight: 400;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-steel);
  background: var(--color-cream);
  box-shadow: rgba(19, 19, 22, 0.05) 0 2px 8px 0;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-ash);
  font-weight: 400;
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-silk);
  border-radius: var(--radius-item);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-graphite);
  background: var(--color-bone);
  outline: none;
  cursor: pointer;
  margin-top: 6px;
  font-weight: 400;
}

.form-hint {
  font-size: 11px;
  color: var(--color-fog);
  margin-top: 4px;
  font-weight: 400;
}

.form-static {
  padding: 10px 14px;
  background: var(--color-cream);
  border-radius: var(--radius-item);
  font-size: 14px;
  color: var(--color-graphite);
  font-weight: 400;
  word-break: break-all;
}

.btn-primary {
  width: 100%;
  padding: 13px 28px;
  background: var(--color-mid-ink);
  border: none;
  border-radius: var(--radius-btn);
  color: var(--color-bone);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-top: 8px;
  box-shadow: rgba(41, 41, 41, 0.25) 0 4px 12px -2px;
}

.btn-primary:hover {
  background: var(--color-charcoal);
  box-shadow: rgba(41, 41, 41, 0.3) 0 8px 20px -4px;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.form-success {
  text-align: center;
  padding: 20px 0;
}

.form-success .emoji {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--color-steel);
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-success .emoji svg {
  width: 48px;
  height: 48px;
}

.form-success p {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-graphite);
}

.footer-help {
  margin-top: 5px;
  color: var(--color-steel);
}

.submit-feedback:not(:empty) {
  margin-top: 10px;
  color: #9c392d;
  font-size: 13px;
}

#siteFooter .hidden {
  display: none !important;
}

#siteFooter[data-featured] {
  --color-charcoal: #080808;
  --color-graphite: #222222;
  --color-mid-ink: #292929;
  --color-steel: #696969;
  --color-fog: #696969;
  --color-ash: #8d8d8d;
  --color-mist: #ccc;
  --color-silk: #dddcd3;
  --color-bone: #faf9f4;
  --color-cream: #eeeee3;
  --radius-card: 16px;
  --radius-item: 16px;
  --radius-pill: 999px;
  --radius-btn: 100px;
  --shadow-card: 0 0 0 1px #1313160d, 0 4px 12px #0001;
  --shadow-modal: 0 0 0 1px #1313160d, 0 12px 40px #0002;
  line-height: 1.6;
}

#siteFooter[data-featured] .donation-bar {
  padding-bottom: 28px;
}

#siteFooter[data-featured] .footer {
  border-top: 0;
}

@media (max-width: 620px) {
  #siteFooter[data-featured] .footer {
    padding: 18px 14px;
  }

  #siteFooter[data-featured] .donation-bar-inner {
    padding: 12px 16px;
    gap: 8px;
  }

  #siteFooter[data-featured] .donation-text {
    font-size: 12px;
  }

  #siteFooter[data-featured] .donation-btn {
    padding: 6px 14px;
  }
}
