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

body {
  font-family: 'Georgia', 'Times New Roman', 'SimSun', serif;
  background: #F5F0E6;
  min-height: 100vh;
  padding: 40px 20px;
  background-image:
    linear-gradient(90deg, transparent 79px, #E8E0D5 79px, #E8E0D5 81px, transparent 81px),
    linear-gradient(#E8E0D5 1px, transparent 1px);
  background-size: 100% 30px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 50px;
}

.header .title {
  font-size: 38px;
  font-weight: normal;
  color: #2C2C2C;
  margin-bottom: 20px;
  letter-spacing: 8px;
  border-bottom: 3px solid #2C2C2C;
  display: inline-block;
  padding-bottom: 15px;
}

.header .subtitle {
  font-size: 16px;
  color: #5A5A5A;
  font-style: italic;
  letter-spacing: 2px;
}

.query-card {
  background: #FFFEF9;
  padding: 30px 35px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.05);
  border: 1px solid #D4CFC5;
  margin-bottom: 30px;
}

.query-card .hint {
  font-size: 14px;
  color: #5A5A5A;
  margin-bottom: 15px;
  line-height: 1.6;
  letter-spacing: 0.5px;
}

.query-card .hint a {
  color: #8B0000;
  text-decoration: underline;
}

.query-card .hint a:hover {
  color: #5C0000;
}

.form-row {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 200px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: 'Georgia', serif;
  border: 2px solid #D4CFC5;
  background: #FFFEF9;
  outline: none;
  transition: border-color 0.3s;
  color: #2C2C2C;
}

.form-group input:focus {
  border-color: #8B0000;
}

.btn {
  padding: 12px 30px;
  background: #2C2C2C;
  color: #FFFEF9;
  border: 2px solid #2C2C2C;
  font-size: 15px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Georgia', serif;
  white-space: nowrap;
}

.btn:hover {
  background: #FFFEF9;
  color: #2C2C2C;
}

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

.status {
  margin-top: 15px;
  padding: 10px 15px;
  font-size: 14px;
  color: #5A5A5A;
  font-style: italic;
  display: none;
  border-left: 3px solid #8B0000;
}

.status.show {
  display: block;
}

.result-area {
  display: none;
}

.result-area.show {
  display: block;
}

/* ===== 会员卡 ===== */
.card-wrapper {
  perspective: 1200px;
  margin: 30px auto;
  width: 600px;
  height: 350px;
}

.card-container {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-container.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 5px 20px rgba(0,0,0,0.2),
    0 15px 35px rgba(0,0,0,0.15);
}

.card-face.front {
  z-index: 2;
}

.card-face.back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-face.back .back-hint {
  font-family: 'Georgia', serif;
  font-size: 12px;
  color: #666;
  position: absolute;
  bottom: 15px;
  right: 20px;
}

.card-face svg.card-svg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.card-face-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  border-radius: 18px;
  transition: opacity 0.4s ease, background-color 0.4s ease;
}

.card-container.no-sub .card-face-img {
  filter: grayscale(100%);
}

/* 卡片信息覆盖层 - 显示在SVG之上的实际文本内容 */
.card-info-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  border-radius: 18px;
}

.card-info-overlay .nickname {
  position: absolute;
  top: 55px;
  left: 35px;
  font-family: 'KaiTi', 'Georgia', serif;
  font-size: 28px;
  color: #FFFEF9;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.95), 0 0 4px rgba(0,0,0,0.95);
}

.card-info-overlay .member-no {
  position: absolute;
  top: 105px;
  left: 35px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: rgba(255,254,249,0.85);
  letter-spacing: 1px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.95);
}

.card-info-overlay .heat-label {
  position: absolute;
  bottom: 45px;
  left: 35px;
  font-family: 'Georgia', serif;
  font-size: 11px;
  color: rgba(255,254,249,0.4);
  letter-spacing: 1px;
}

.card-info-overlay .heat-value {
  position: absolute;
  bottom: 20px;
  left: 35px;
  font-family: 'Courier New', monospace;
  font-size: 22px;
  color: #FFFEF9;
  text-shadow: 0 2px 8px rgba(0,0,0,0.95), 0 0 4px rgba(0,0,0,0.95);
}

/* 未订阅提示 */
.no-sub-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(180, 40, 40, 0.85);
  color: #FFFEF9;
  padding: 8px 16px;
  font-size: 13px;
  font-family: 'KaiTi', 'Georgia', serif;
  letter-spacing: 1px;
  z-index: 10;
  pointer-events: none;
  border-radius: 4px;
  display: none;
}

.no-sub-badge.show {
  display: block;
}

/* 镭射效果覆盖层 */

/* 未订阅读卡且不显示镭射 */

/* ===== 自定义右键菜单 ===== */
.custom-context-menu {
  display: none;
  position: fixed;
  z-index: 1000;
  background: #FFFEF9;
  border: 1px solid #D4CFC5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 160px;
  padding: 4px 0;
  font-family: 'Georgia', 'SimSun', serif;
}

.custom-context-menu.show {
  display: block;
}

.custom-context-menu .menu-item {
  padding: 8px 16px;
  font-size: 13px;
  color: #2C2C2C;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  letter-spacing: 0.5px;
}

.custom-context-menu .menu-item:hover {
  background: #2C2C2C;
  color: #FFFEF9;
}

.custom-context-menu .menu-item .arrow {
  margin-left: 20px;
  font-size: 10px;
}

.custom-context-menu .menu-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.custom-context-menu .menu-item.disabled:hover {
  background: transparent;
  color: #2C2C2C;
}

/* 二级菜单 */
.custom-context-menu .submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: #FFFEF9;
  border: 1px solid #D4CFC5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 140px;
  padding: 4px 0;
}

.custom-context-menu .menu-item.has-submenu:hover .submenu {
  display: block;
}

.custom-context-menu .submenu .sub-item {
  padding: 8px 16px;
  font-size: 13px;
  color: #2C2C2C;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.custom-context-menu .submenu .sub-item:hover {
  background: #2C2C2C;
  color: #FFFEF9;
}

/* 分隔线 */
.custom-context-menu .menu-divider {
  height: 1px;
  background: #D4CFC5;
  margin: 4px 0;
}

/* 页脚 */
.footer {
  text-align: center;
  color: #5A5A5A;
  font-size: 13px;
  margin-top: 60px;
  font-style: italic;
  letter-spacing: 1px;
}

/* 响应式 */
@media (max-width: 650px) {
  .card-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 600 / 350;
  }

  .header .title {
    font-size: 28px;
    letter-spacing: 5px;
  }

  .query-card {
    padding: 20px;
  }

  .form-row {
    flex-direction: column;
  }

  .form-group {
    min-width: 100%;
  }

  .card-info-overlay .nickname {
    font-size: 22px;
    top: 45px;
    left: 25px;
  }

  .card-info-overlay .member-no {
    font-size: 12px;
    top: 85px;
    left: 25px;
  }

  .card-info-overlay .heat-value {
    font-size: 18px;
    left: 25px;
  }
}

/* ---------------------------------------------------------------
   会话状态 / 两份存档 / 虚拟册子入口（2026-11-03）
   --------------------------------------------------------------- */

/* =========================================================================
   页面底部：虚拟册子入口 + 会话条（2026-11-03 按用户给的布局重排）
   ========================================================================= */

.dj-entry {
  display: flex;
  justify-content: center;
  margin: 34px 0 40px;
}
.dj-entry-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #2C2C2C;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 1.5px;
}
.dj-entry-icon {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  transition: transform 0.25s ease;
}
.dj-entry-link:hover .dj-entry-icon { transform: translateY(-2px) rotate(-2deg); }
.dj-entry-text {
  border-bottom: 1px solid rgba(44, 44, 44, 0.45);
  padding-bottom: 2px;
}
.dj-entry-link:hover .dj-entry-text { border-bottom-color: #2C2C2C; }

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 24px;
  padding: 10px 16px;
  background: #FFFEF9;
  border: 1px solid #D4CFC5;
  font-size: 13px;
  color: #5A5A5A;
  letter-spacing: 0.5px;
}

.link-btn {
  background: none;
  border: 1px solid #D4CFC5;
  color: #5A5A5A;
  font: inherit;
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.link-btn:hover { background: #2C2C2C; color: #FFFEF9; border-color: #2C2C2C; }

/* =========================================================================
   碎箔细闪舞台（复用 /gallery/foil/foil_core.js 的 DOM 结构）
   ========================================================================= */

.foil-host {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 18px;
  overflow: hidden;
  pointer-events: none;
}
.foil-host .foil-stage {
  position: absolute;
  inset: 0;
  display: block;
  perspective: none;
}
.foil-host .foil-shell {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  transition: none;
  will-change: auto;
}
.foil-host .foil-canvas {
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit;
  background: transparent;
  display: block;
}
.card-container.no-sub .foil-host { filter: grayscale(100%); }

/* 悬浮时关闭翻面过渡，避免和逐帧 transform 抢着做动画 */
.card-container.tilting { transition: none; will-change: transform; }

@media (max-width: 640px) {
  .dj-entry { margin: 26px 0 30px; }
  .dj-entry-icon { width: 56px; height: 56px; }
}
