/* ============================================================
   汉化预告站 · 全局样式
   粉白精致 · 移动端优先 · 无外部依赖
   文件：style.css（与 html 放在同一目录）
   改主题色：修改 :root 中的变量即可，全站自动同步
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
  --bg: #fdf6f7;            /* 页面背景（暖粉白） */
  --bg-soft: #f9eaee;       /* 次级背景 */
  --card: #ffffff;          /* 卡片背景 */
  --line: #f0d6de;          /* 边框 / 分隔线（柔粉） */
  --text: #4a3b41;          /* 主文字（深灰褐） */
  --muted: #9c7f8a;         /* 次要文字（灰粉） */
  --accent: #e07b96;        /* 强调色（玫瑰粉） */
  --accent-strong: #d0607e;
  --ok: #7fae8f;            /* 已完成（柔绿） */
  --warn: #c08a5a;          /* 汉化中（暖琥珀） */
  --danger: #d96a7a;        /* 删除（粉红） */
  --radius: 12px;
  --container: 1400px;
  --nav-h: 56px;
  --grad: linear-gradient(135deg, #f2a8bc, #e07b96);
  --shadow: 0 8px 28px rgba(224, 123, 150, 0.16);
  --shadow-soft: 0 2px 10px rgba(224, 123, 150, 0.07);
}

/* ---------- 基础（窄屏优先，默认即手机端） ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background:
    radial-gradient(58% 38% at 10% 0%, rgba(247, 198, 212, 0.45), transparent 62%),
    radial-gradient(46% 32% at 90% 10%, rgba(238, 177, 200, 0.32), transparent 60%),
    radial-gradient(50% 40% at 50% 100%, rgba(250, 220, 230, 0.5), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Noto Sans SC", "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 背景装饰：柔光浮动光斑 ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-decor span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 163, 184, 0.5), rgba(240, 163, 184, 0));
  filter: blur(10px);
  animation: float 9s ease-in-out infinite;
}

.bg-decor span:nth-child(1) { width: 230px; height: 230px; top: 6%; left: 5%; }
.bg-decor span:nth-child(2) { width: 150px; height: 150px; top: 32%; right: 7%; animation-delay: -3s; }
.bg-decor span:nth-child(3) { width: 190px; height: 190px; bottom: 10%; left: 16%; animation-delay: -6s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 246, 247, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.site-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: "Noto Serif SC", "STSong", serif;
}

.site-name .dot { color: var(--accent); }

.site-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 6px 12px;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--text); }

.site-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- 首页 hero ---------- */
.hero {
  padding: 54px 0 34px;
  text-align: center;
}

.hero-avatar-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 20px;
  animation: fadeUp 0.7s ease both;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 30px rgba(224, 123, 150, 0.35);
}

/* 头像外圈：旋转虚线光环 */
.hero-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1.5px dashed rgba(224, 123, 150, 0.55);
  animation: spin 26s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero h1 {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: clamp(28px, 6.5vw, 44px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 2px;
  animation: fadeUp 0.7s ease 0.1s both;
}

.hero-sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14.5px;
  animation: fadeUp 0.7s ease 0.2s both;
}

.hero-sub .author {
  color: var(--accent);
  font-weight: 700;
}

.hero-links {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.7s ease 0.3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--grad);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(224, 123, 150, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(224, 123, 150, 0.42);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-small {
  padding: 5px 14px;
  font-size: 13px;
  border-radius: 999px;
}

.btn-danger {
  border-color: rgba(217, 106, 122, 0.45);
  color: var(--danger);
}

.btn-danger:hover { border-color: var(--danger); color: var(--danger); }

/* ---------- 通用区块 ---------- */
.section { padding: 32px 0; }

.page-head { padding: 46px 0 6px; }

.page-head h1 {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 1px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.empty {
  padding: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 作品网格（多列自适应） ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 600px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 作品卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.card-link { display: block; }

.card-link:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* 标题独占一行，徽章排在标题下方（避免长标题被挤成一行两个字） */
.card-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-top h3 {
  font-size: 18px;
  line-height: 1.45;
  min-width: 0;
  font-weight: 700;
  word-break: break-word;
}

.badge {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.6;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.7);
}

.badge.ongoing { color: var(--warn); border-color: rgba(192, 138, 90, 0.45); }
.badge.done { color: var(--ok); border-color: rgba(127, 174, 143, 0.45); }

/* 分级徽章 */
.badge.rating-r18 { color: #d96a8a; border-color: rgba(217, 106, 138, 0.5); }
.badge.rating-r15 { color: #d98a5f; border-color: rgba(217, 138, 95, 0.5); }
.badge.rating-all { color: #6fa8b0; border-color: rgba(111, 168, 176, 0.45); }

.badge-wrap {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* 分级筛选栏 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-btn {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.filter-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.filter-btn.active {
  background: var(--grad);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(224, 123, 150, 0.32);
}

.card-engine {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.card-engine b { color: var(--text); font-weight: 600; }

.card-desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 已完成作品：封面图（放大显示） ---------- */
.card-done { padding: 0 0 16px; overflow: hidden; }

.card-cover {
  aspect-ratio: 16 / 10;
  background: #f6e7ec;
  border-bottom: 1px solid var(--line);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card-link:hover .card-cover img { transform: scale(1.04); }

.card-body { padding: 16px 18px 0; }

/* ---------- 详情页 ---------- */
.back-link { margin: 24px 0 0; }

.back-link a { color: var(--muted); font-size: 14px; }

.back-link a:hover { color: var(--accent); }

.detail {
  max-width: 920px;
  margin: 18px auto 0;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-head h1 {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 27px;
  font-weight: 800;
}

.detail > .card-engine { margin-top: 8px; }

.detail-desc {
  margin-top: 20px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.9;
  white-space: pre-wrap;
}

.detail-notes {
  margin-top: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.detail-notes h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.detail-notes p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.detail-missing {
  text-align: center;
  padding: 70px 0 40px;
}

.detail-missing h1 { font-size: 24px; }

.detail-missing p { margin: 12px 0; color: var(--muted); }

/* 图片画廊 */
.gallery { margin-top: 22px; }

.gallery-main {
  background: #fdf3f5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.gallery-main img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  cursor: zoom-in;
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.gallery-thumbs .thumb {
  width: 92px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.75;
  transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.gallery-thumbs .thumb:hover { opacity: 1; transform: translateY(-1px); }

.gallery-thumbs .thumb.active {
  border-color: var(--accent);
  opacity: 1;
}

.gallery-hint {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* 图片加载失败时的占位提示 */
.img-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  width: 100%;
  border: 1px dashed #e4bcc9;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.6);
}

.img-missing.thumb-missing {
  min-height: 58px;
  width: 92px;
  font-size: 11px;
  padding: 6px;
  border-radius: 6px;
  line-height: 1.4;
}

/* 点击放大的全屏层（看图场景保持深色） */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 14, 16, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 22px;
  font-size: 36px;
  line-height: 1;
  background: none;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  padding: 4px 10px;
}

.lightbox-close:hover { color: var(--accent); }

/* 联系弹窗（显示 QQ 号） */
.contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(60, 40, 48, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.contact-modal.open { display: flex; }

.contact-modal-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 30px;
  width: 92%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(120, 60, 80, 0.25);
  animation: fadeUp 0.3s ease both;
}

.contact-modal-box h3 {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 18px;
  font-weight: 700;
}

.contact-qq {
  margin-top: 16px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
  user-select: all;
}

.contact-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.contact-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ---------- 关于页 ---------- */
.profile {
  display: flex;
  gap: 18px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.avatar-img {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 6px 20px rgba(224, 123, 150, 0.32);
}

.profile-text { min-width: 0; }

.profile-name {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 20px;
  font-weight: 700;
}

.profile-text p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 30px;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.contact-card h3 {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 16px;
  font-weight: 700;
}

.contact-card p {
  margin: 6px 0 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.disclaimer {
  margin-top: 30px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.disclaimer h3 {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.disclaimer ul { list-style: none; }

.disclaimer li {
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.disclaimer li:last-child { border-bottom: 0; }

/* ---------- 管理页面 ---------- */
.admin { max-width: 980px; }

.admin-guide {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
  box-shadow: var(--shadow-soft);
}

.admin-guide h1 {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 23px;
  font-weight: 800;
}

.admin-guide p { margin-top: 8px; font-size: 14px; color: var(--muted); }

.admin-guide ol {
  margin: 10px 0 0 20px;
  font-size: 14px;
  color: var(--muted);
}

.admin-guide li { margin-top: 6px; }

.admin-guide b { color: var(--text); }

.admin-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-top: 18px;
  box-shadow: var(--shadow-soft);
}

.admin-section h2 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.admin-hint:first-of-type { margin-top: 0; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span2 { grid-column: 1 / -1; }
}

.form-grid label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.admin input[type="text"],
.admin textarea,
.admin select {
  display: block;
  width: 100%;
  margin-top: 5px;
  background: #fdf7f8;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  padding: 9px 12px;
  font-family: inherit;
}

.admin textarea { resize: vertical; }

.admin input[type="text"]:focus,
.admin textarea:focus,
.admin select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 123, 150, 0.15);
}

.work-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  background: #fdf7f8;
}

.work-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-msg {
  font-size: 13px;
  color: var(--ok);
}

/* ---------- 全站页脚（固定免责声明） ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 54px;
  padding: 26px 0 30px;
}

.footer-notice {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-copy {
  margin-top: 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* ============================================================
   桌面端补充（≥768px）
   ============================================================ */
@media (min-width: 768px) {

  .section { padding: 40px 0; }

  .hero { padding: 78px 0 46px; }

  .contact-grid { grid-template-columns: 1fr 1fr; }

  .hero-avatar-wrap { width: 120px; height: 120px; }

  .avatar-img { width: 88px; height: 88px; }

}

/* 偏好减少动效：关闭过渡与动画 */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
