/* ============================================
   朱雀OPC · AI毕业作品集 2026
   暖色温柔风 / 纯 CSS，无外部依赖
   ============================================ */


/* 全局兜底：hidden 属性必须真的隐藏（避免被 display 规则压掉） */
[hidden] { display: none !important; }

:root {
  --bg: #faf6f1;            /* 奶油米白背景 */
  --card: #ffffff;          /* 卡片背景 */
  --primary-a: #c97b5c;     /* 暖棕橘渐变起 */
  --primary-b: #d4a574;     /* 暖棕橘渐变止 */
  --title: #3d2e1f;         /* 标题深棕 */
  --text-2: #8b7355;        /* 次要暖灰 */
  --border: #e8ddd0;        /* 浅棕边框 */
  --grad: linear-gradient(135deg, var(--primary-a), var(--primary-b));
  --shadow: 0 6px 24px rgba(201, 123, 92, 0.10), 0 2px 8px rgba(61, 46, 31, 0.05);
  --shadow-hover: 0 14px 34px rgba(201, 123, 92, 0.22), 0 4px 12px rgba(61, 46, 31, 0.07);
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--title);
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 246, 241, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--title);
  text-decoration: none;
  letter-spacing: 1px;
}
.nav-logo span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-2);
  font-size: 15px;
  padding: 6px 14px;
  border-radius: 999px;
  transition: all .25s ease;
}
.nav-links a:hover { color: var(--primary-a); background: rgba(201, 123, 92, 0.08); }
.nav-links a.active {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 3px 10px rgba(201, 123, 92, 0.3);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 90px 24px 60px;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(212, 165, 116, 0.14), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(201, 123, 92, 0.10), transparent 55%),
    var(--bg);
}

/* 左右分栏：左文字 + 右Logo */
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 70px;
  width: 100%;
  max-width: 1100px;
}

.hero-left {
  text-align: left;
  max-width: 560px;
}

.hero-logo {
  flex-shrink: 0;
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.hero-tag {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--primary-a);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}

.hero-title {
  font-size: clamp(56px, 12vw, 120px);
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1.15;
}
.hero-title .t-zhuque { color: var(--title); }
.hero-title .t-opc {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin: 18px 0 34px;
  font-size: 17px;
  color: var(--text-2);
  letter-spacing: 1px;
  white-space: pre-line;   /* 支持后台编辑时保留换行 */
}

.btn-gradient {
  display: inline-block;
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 14px 44px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(201, 123, 92, 0.35);
  transition: transform .25s ease, box-shadow .25s ease;
}
.btn-gradient:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(201, 123, 92, 0.45);
}

.scroll-arrow {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--primary-a);
  animation: bounce 1.6s infinite ease-in-out;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: .85; }
  50%      { transform: translate(-50%, 10px); opacity: .45; }
}

/* ---------- 通用区块 ---------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 24px 30px;
}

.section-title {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  color: var(--title);
  letter-spacing: 3px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin: 6px 0 42px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- 关于我 ---------- */
.about-card {
  display: flex;
  gap: 40px;
  padding: 44px;
  align-items: center;
}

.avatar {
  width: 190px;
  height: 190px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px dashed var(--primary-b);  /* 浅棕虚线装饰边 */
  padding: 7px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(201, 123, 92, 0.22);
}
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;   /* 圆形照片 */
  object-fit: cover;
  display: block;
}

/* 头像：可点击上传，hover 显示提示蒙层 */
#avatarBox {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
#avatarBox:hover img { filter: brightness(0.75); }
.avatar-overlay {
  position: absolute;
  inset: 7px;                      /* 对齐虚线内的照片区域 */
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(61, 46, 31, 0.45);
  color: #fff;
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
#avatarBox:hover .avatar-overlay { opacity: 1; }

.about-right h3 { font-size: 24px; letter-spacing: 1px; }
.about-major {
  color: var(--primary-a);
  font-size: 14px;
  letter-spacing: 1px;
  margin: 4px 0 14px;
}
.about-desc {
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 20px;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  font-size: 13px;
  color: var(--primary-a);
  background: rgba(201, 123, 92, 0.08);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 999px;
  transition: all .25s ease;
}
.skill-tag:hover { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- 作品筛选 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}
.filter-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  font-size: 14px;
  padding: 8px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s ease;
  font-family: inherit;
}
.filter-btn:hover { color: var(--primary-a); border-color: var(--primary-a); }
.filter-btn.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(201, 123, 92, 0.35);
}

/* ---------- 作品网格 ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 30px;
  align-items: start;   /* 每张卡片按自身高度排列，避免竖版海报把同行其他卡片撑高 */
}

/* 「全部」页面：统一行高 + 自动补满（高卡跨 2 行，短卡跨 1 行），
   所有卡片顶部对齐同一条基线，且不留空洞 */
.works-grid.is-packed {
  grid-auto-rows: var(--row-unit, 359px);
  grid-auto-flow: row dense;
  align-items: stretch;
}

.work-card {
  cursor: pointer;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.work-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.work-thumb {
  position: relative;
  height: 180px;
  overflow: hidden;
}
.work-thumb .thumb-fill {
  position: absolute;
  inset: 0;
}
.work-thumb .thumb-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
}

.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(61, 46, 31, 0.25);
  transition: transform .25s ease;
}
.play-btn::after {
  content: "";
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--primary-a);
}
.work-card:hover .play-btn { transform: translate(-50%, -50%) scale(1.12); }

.work-info { padding: 16px 18px 20px; }
.work-info h4 { font-size: 16px; margin-bottom: 6px; }
.work-type {
  display: inline-block;
  font-size: 12px;
  color: #fff;
  background: var(--grad);
  padding: 2px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.work-desc {
  font-size: 13px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- AI漫剧 ---------- */
.drama-card {
  border: 1.5px solid var(--primary-b);
  padding: 26px;
}
.drama-player {
  border-radius: 12px;
  overflow: hidden;
  background: #2a211a;
  aspect-ratio: 16 / 9;
}
.drama-player video { width: 100%; height: 100%; object-fit: contain; }

.drama-info { padding-top: 22px; }
.drama-name { font-size: 24px; letter-spacing: 2px; }
.drama-meta {
  color: var(--primary-a);
  font-size: 13px;
  margin: 6px 0 12px;
  letter-spacing: 1px;
}
.drama-desc { color: var(--text-2); font-size: 15px; margin-bottom: 16px; }
.drama-roles { padding-bottom: 6px; }
.drama-roles .skill-tag { border-color: var(--primary-b); }

/* ---------- 联系 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 300px));  /* 三个卡片居中排列 */
  justify-content: center;
  gap: 24px;
  padding-bottom: 30px;
}

.contact-card {
  text-align: center;
  padding: 34px 20px;
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease, box-shadow .3s ease;
}
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.contact-card h4 { font-size: 17px; margin: 12px 0 4px; }
.contact-card p { font-size: 13px; color: var(--text-2); word-break: break-all; }

.contact-icon {
  width: 58px; height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.c-mail   { background: var(--grad); }
.c-wechat { background: linear-gradient(135deg, #7cb87a, #a4c98e); }
.c-phone  { background: linear-gradient(135deg, #d9a06c, #e8c9a0); }

/* ---------- 底部 ---------- */
.footer {
  text-align: center;
  padding: 34px 20px 40px;
  color: var(--text-2);
  font-size: 13px;
  letter-spacing: 1px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

/* ---------- 右下角悬浮按钮（低调，仅自己用） ---------- */
.admin-btn {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  background: rgba(139, 115, 85, 0.18);
  color: rgba(139, 115, 85, 0.55);
  border: none;
  font-size: 11px;
  font-family: inherit;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  opacity: 0.45;
  transition: opacity .25s ease, color .25s ease, background .25s ease;
}
.admin-btn:hover {
  opacity: 1;
  color: #fff;
  background: var(--grad);
}

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(61, 46, 31, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal-mask.show { opacity: 1; visibility: visible; }

.modal {
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px) scale(.96);
  transition: transform .3s ease;
}
.modal-mask.show .modal { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  z-index: 2;
  width: 34px; height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--title);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(61, 46, 31, 0.2);
  transition: transform .2s ease;
  font-family: inherit;
}
.modal-close:hover { transform: rotate(90deg); }

.modal-thumb { height: 240px; }
.modal-thumb .thumb-fill { position: absolute; inset: 0; }
.modal-thumb { position: relative; }
.modal-body { padding: 22px 26px 28px; }
.modal-type {
  display: inline-block;
  font-size: 12px;
  color: #fff;
  background: var(--grad);
  padding: 3px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.modal-body h3 { font-size: 22px; margin-bottom: 10px; }
.modal-body p { color: var(--text-2); font-size: 15px; }

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  .nav-links { display: none; }   /* 手机端隐藏导航链接 */

  .section { padding: 70px 12px 20px; }
  .nav-inner { padding: 12px 16px; }
  .about-card { padding: 28px 18px; }

  .works-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .contact-grid { grid-template-columns: 1fr; gap: 14px; }

  .about-card { flex-direction: column; text-align: center; gap: 24px; }
  .skill-tags { justify-content: center; }

  .hero-title { letter-spacing: 2px; }
  .hero-subtitle { font-size: 15px; }

  /* 手机端 Hero 变回上下堆叠 */
  .hero-inner {
    flex-direction: column;
    gap: 36px;
    text-align: center;
  }
  .hero-left { text-align: center; }
  .hero-logo svg { width: 200px; height: 188px; }

  .avatar { width: 160px; height: 160px; }

  .admin-btn { right: 8px; bottom: 8px; }

  .drama-card { padding: 14px; }
  .modal-thumb { height: 170px; }

  .work-thumb { height: 130px; }
}

/* ============================================
   后台管理模式（?admin=1）
   ============================================ */

/* 导航 logo：只有第二段用渐变 */
.nav-logo .logo-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 可编辑元素提示 */
.admin-mode [contenteditable="plaintext-only"] {
  outline: 1.5px dashed rgba(201, 123, 92, 0.45);
  outline-offset: 3px;
  border-radius: 4px;
  cursor: text;
  min-width: 24px;
}
.admin-mode [contenteditable="plaintext-only"]:focus,
.admin-mode [contenteditable="plaintext-only"]:hover {
  outline: 1.5px dashed var(--primary-a);
  background: rgba(201, 123, 92, 0.06);
}

/* Logo 拖拽 */
.admin-mode .hero-logo { cursor: grab; touch-action: none; }
.hero-logo.dragging { cursor: grabbing; }
.admin-mode .hero-logo::after {
  content: "按住拖动调整位置";
  position: absolute;
  left: 50%; bottom: -26px;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--primary-a);
  white-space: nowrap;
  opacity: .8;
}

/* 编辑工具条 */
.admin-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(61, 46, 31, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(61, 46, 31, 0.3);
}
.admin-tag {
  color: #ffd9c4;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-right: 8px;
}
.ab-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.ab-btn:hover { background: rgba(255, 255, 255, 0.25); }
.ab-save {
  background: var(--grad);
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(201, 123, 92, 0.45);
}

/* 后台登录 */
.admin-login-mask {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(61, 46, 31, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
/* 修复：hidden 属性被 display:flex 覆盖导致登录框/工具条无法隐藏的 bug */
.admin-login-mask[hidden],
.admin-bar[hidden] {
  display: none;
}
.admin-login {
  width: min(360px, 100%);
  padding: 36px 32px;
  text-align: center;
}
.admin-login h3 { font-size: 24px; letter-spacing: 2px; }
.login-tip { color: var(--text-2); font-size: 13px; margin: 8px 0 20px; }
.admin-login .f-input { text-align: center; margin-bottom: 14px; }
.login-err { color: #c0392b; font-size: 13px; min-height: 20px; margin-top: 10px; font-weight: 700; }
.login-back { display: inline-block; margin-top: 6px; color: var(--text-2); font-size: 13px; text-decoration: none; }
.login-back:hover { color: var(--primary-a); }

/* 表单控件 */
.f-label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin: 14px 0 6px;
  letter-spacing: 1px;
}
.f-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--title);
  background: var(--bg);
  outline: none;
  transition: border-color .2s ease;
}
.f-input:focus { border-color: var(--primary-a); }
textarea.f-input { resize: vertical; }
.f-btn {
  border: 1.5px solid var(--primary-b);
  background: rgba(201, 123, 92, 0.08);
  color: var(--primary-a);
  font-size: 13px;
  font-family: inherit;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.f-btn:hover { background: var(--grad); color: #fff; border-color: transparent; }
.f-danger { border-color: #d98c7c; color: #b34a35; }
.f-danger:hover { background: #b34a35; }
.f-hint { display: block; font-size: 12px; color: var(--text-2); margin-top: 8px; word-break: break-all; }
.f-actions { margin-top: 20px; text-align: center; }
.f-save {
  border: none;
  background: var(--grad);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 2px;
  padding: 12px 40px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(201, 123, 92, 0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.f-save:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(201, 123, 92, 0.45); }

/* 添加按钮 */
.add-wrap { text-align: center; padding: 8px 0 30px; }
.add-btn {
  border: 2px dashed var(--primary-b);
  background: rgba(201, 123, 92, 0.06);
  color: var(--primary-a);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 1px;
  padding: 14px 44px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s ease;
}
.add-btn:hover { background: var(--grad); color: #fff; border-style: solid; }

/* 卡片删除按钮 */
.card-del {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  width: 28px; height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(179, 74, 53, 0.92);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(61, 46, 31, 0.3);
}
.card-del:hover { background: #b34a35; transform: scale(1.1); }

/* 技能标签：后台可删可加 */
.tag-del {
  border: none;
  background: transparent;
  color: #b34a35;
  font-size: 14px;
  cursor: pointer;
  margin-left: 4px;
  line-height: 1;
}
.tag-add { border-style: dashed; cursor: pointer; }

/* 漫剧集数操作按钮 */
.ep-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* 弹窗内表单布局 */
#modalEdit { padding-bottom: 10px; }

/* 手机端调整 */
@media (max-width: 768px) {
  .admin-bar { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .admin-tag { width: 100%; text-align: center; margin-right: 0; }
  .section { padding-top: 110px; }
}

/* 后台：分类栏提示文字 */
.filter-hint {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--primary-a);
  letter-spacing: 1px;
}

/* 编辑模式：作品网格里的上传方块 */
.work-add-tile {
  position: relative;
  min-height: 264px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed var(--primary-b);
  background: rgba(201, 123, 92, 0.05);
  cursor: pointer;
  transition: all .25s ease;
}
.work-add-tile:hover {
  transform: translateY(-6px);
  background: var(--grad);
  box-shadow: var(--shadow-hover);
}
.tile-plus {
  font-size: 44px;
  font-weight: 300;
  color: var(--primary-a);
  line-height: 1;
}
.tile-text {
  font-size: 14px;
  color: var(--text-2);
  letter-spacing: 1px;
}
.work-add-tile:hover .tile-plus,
.work-add-tile:hover .tile-text { color: #fff; }

@media (max-width: 768px) {
  .work-add-tile { min-height: 200px; }
  .tile-plus { font-size: 34px; }
}

/* 上传进度轻提示 */
#toast {
  position: fixed;
  top: 70px; left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 500;
  background: rgba(61, 46, 31, 0.92);
  color: #fff;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 10px 24px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(61, 46, 31, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 游戏链接：试玩按钮与角标 */
.modal-link-btn {
  display: inline-block;
  margin-top: 16px;
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 11px 34px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(201, 123, 92, 0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.modal-link-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(201, 123, 92, 0.45); }
.link-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--primary-a);
  border: 1px solid var(--primary-b);
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* 装饰小泡泡：后台可单独拖动/删除 */
.admin-mode .bub {
  cursor: grab;
}
.admin-mode .bub:not(.bub-shine):hover {
  stroke: #ffffff;
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(201, 123, 92, 0.6));
}
.admin-mode .bub:not(.bub-shine) {
  animation: bubHint 1.6s ease-in-out infinite;
}
@keyframes bubHint {
  0%, 100% { stroke: rgba(255,255,255,0); stroke-width: 2; }
  50% { stroke: rgba(255,255,255,0.55); stroke-width: 2; }
}

/* 新增泡泡按钮：只在编辑模式显示 */
.bub-add-btn {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  white-space: nowrap;
  border: 1px dashed var(--primary-b);
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary-a);
  font-size: 12px;
  font-family: inherit;
  padding: 4px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: none;
  transition: all .2s ease;
}
.bub-add-btn:hover { background: var(--grad); color: #fff; border-style: solid; }
.admin-mode .bub-add-btn { display: inline-block; }

/* 海报类作品：照片区域 9:16 竖版（其他类型保持原有尺寸） */
.work-card.is-poster .work-thumb {
  height: auto;
  aspect-ratio: 9 / 16;
}

/* ============================================
   封面裁剪
   ============================================ */
.crop-mask {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(61, 46, 31, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.crop-panel {
  width: min(560px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 20px 22px 18px;
  box-shadow: 0 24px 60px rgba(61, 46, 31, 0.28);
}
.crop-title { font-size: 19px; color: var(--title); margin-bottom: 4px; }
.crop-tip { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }

.crop-stage {
  position: relative;
  width: 100%;
  height: 340px;
  background: #2b2118;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
.crop-stage img {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.crop-box {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  cursor: move;
  touch-action: none;
}
.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.35) 0 1px, transparent 1px 100%),
    linear-gradient(to bottom, rgba(255,255,255,.35) 0 1px, transparent 1px 100%);
  background-size: 33.333% 33.333%;
}
.crop-h {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.crop-h[data-h="nw"] { left: -9px; top: -9px; cursor: nwse-resize; }
.crop-h[data-h="ne"] { right: -9px; top: -9px; cursor: nesw-resize; }
.crop-h[data-h="sw"] { left: -9px; bottom: -9px; cursor: nesw-resize; }
.crop-h[data-h="se"] { right: -9px; bottom: -9px; cursor: nwse-resize; }

.crop-ratios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
}
.crop-ratio {
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s ease;
}
.crop-ratio:hover { border-color: var(--primary-b); color: var(--primary-a); }
.crop-ratio.active { background: var(--grad); color: #fff; border-color: transparent; }

.crop-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
.crop-btn {
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-2);
  font-size: 14px;
  font-family: inherit;
  padding: 9px 26px;
  border-radius: 999px;
  cursor: pointer;
}
.crop-btn:hover { border-color: var(--primary-b); color: var(--primary-a); }
.crop-ok {
  border: none;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 18px rgba(201, 123, 92, 0.28);
}
.crop-ok:hover { color: #fff; }

@media (max-width: 520px) {
  .crop-stage { height: 250px; }
  .crop-panel { padding: 16px 16px 14px; }
}

/* ============================================
   封面裁剪 结束
   ============================================ */

/* 短视频：详情弹窗内的播放器 */
.modal-video {
  width: 100%;
  max-height: 62vh;
  display: block;
  background: #000;
  border-radius: 10px;
}

/* 有视频时，缩略区不再固定 240px 高，按视频自身比例完整展示 */
.modal-thumb.has-video {
  height: auto;
  background: #000;
}

/* 编辑弹窗里的视频预览 */
.wf-video-preview { margin: 8px 0 12px; }
.wf-video-preview video {
  width: 100%;
  max-height: 46vh;
  display: block;
  background: #000;
  border-radius: 10px;
}

/* 文档类：详情弹窗内嵌文档预览 */
.modal-doc {
  width: 100%;
  height: 68vh;
  max-height: 620px;
  display: block;
  border: 0;
  background: #fff;
  border-radius: 10px;
}

/* 文档类：Excel / CSV 表格在线预览（表格模式把弹窗加宽，能多看到几列） */
#modalBox.wide { width: min(960px, 100%); }
.modal-thumb.has-sheet {
  height: auto;
  background: #fff;
}
.sheet-tip {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.8;
}
.sheet-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 12px 0;
}
.sheet-tab {
  font: inherit;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
}
.sheet-tab.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}
.sheet-scroll {
  max-height: 56vh;
  overflow: auto;
  margin: 10px 12px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.sheet-table {
  border-collapse: collapse;
  font-size: 13px;
  color: var(--title);
  min-width: 100%;
}
.sheet-table th,
.sheet-table td {
  border-right: 1px solid #efe6da;
  border-bottom: 1px solid #efe6da;
  padding: 6px 10px;
  text-align: left;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f1e9;
  font-weight: 600;
  color: var(--text-2);
}
.sheet-table tbody tr:nth-child(even) { background: #fcf9f5; }
.sheet-table .sheet-rn {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 38px;
  background: #f7f1e9;
  color: #a08a72;
  font-size: 12px;
  text-align: center;
}
.sheet-table thead .sheet-rn { z-index: 2; }
.sheet-foot {
  padding: 8px 14px 12px;
  font-size: 12px;
  color: #a08a72;
}
