/* ============================================
   AIdu Store - 8-bit Pixel Theme v3
   (C) 2026 AIdu Studio
   ============================================ */

/* --- LOCAL FONTS --- */
@font-face {
  font-family: 'Pixelify Sans';
  src: url('../assets/fonts/PixelifySans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Press Start 2P';
  src: url('../assets/fonts/PressStart2P-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Serif JP';
  src: url('../assets/fonts/NotoSerifJP-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Zpix';
  src: url('../assets/fonts/Zpix.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Serif JP';
  src: url('../assets/fonts/NotoSerifJP-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- RESET & BASE --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background: #0a0a0a;
  color: #ffffff;
  font-family: 'Zpix';
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* --- BACKGROUND CANVAS --- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
  image-rendering: pixelated;
}

/* --- CRT SCANLINE OVERLAY --- */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.06) 0px,
    rgba(0,0,0,0.06) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 9999;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb {
  background: #2d8cf0;
  border: 2px solid #0a0a0a;
}

/* --- CONTAINER --- */

.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

@keyframes marquee {
  0% { transform: translateX(calc(100% - 2ch)); }
  100% { transform: translateX(-100%); }
}

@keyframes neonGlow {
  0%, 100% { color: #0ff; text-shadow: 0 0 6px #0ff, 0 0 12px #0ff; }
  20% { color: #ff0; text-shadow: 0 0 6px #ff0, 0 0 12px #ff0; }
  40% { color: #f0f; text-shadow: 0 0 6px #f0f, 0 0 12px #f0f; }
  60% { color: #0f0; text-shadow: 0 0 6px #0f0, 0 0 12px #0f0; }
  80% { color: #f80; text-shadow: 0 0 6px #f80, 0 0 12px #f80; }
}

@keyframes neonGlowEn {
  0%, 100% { color: #ff0; text-shadow: 0 0 6px #ff0, 0 0 12px #ff0; }
  20% { color: #f0f; text-shadow: 0 0 6px #f0f, 0 0 12px #f0f; }
  40% { color: #0f0; text-shadow: 0 0 6px #0f0, 0 0 12px #0f0; }
  60% { color: #f80; text-shadow: 0 0 6px #f80, 0 0 12px #f80; }
  80% { color: #0ff; text-shadow: 0 0 6px #0ff, 0 0 12px #0ff; }
}

/* ===== LAYOUT: footer CSS auto | left col = store name + 9-grid | right col = agent pool + slogan | total = 61.8vw =====
    footer: height auto (content-driven)
    左列宽 = 九宫格高（正方形，aspect-ratio:1）
    右列宽 = 61.8vw - 左列宽（剩余自适应） */
.main-area {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-height: 0;
}

.golden-section {
  width: 61.8%;
  height: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  min-height: 0;
  min-width: 0;
  margin: 0 auto;
  overflow: hidden;
  align-items: stretch;
}

.left-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.store-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  flex: 0 0 100%;
  padding: 6px 16px 10px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

#store-name-cn {
  font-family: 'Zpix', serif;
  font-size: 2.53rem;  /* 2.975rem × 0.85 = 再缩小 15%（猴哥 #3） */
  color: #ffffff;
  line-height: 1.2;
  font-weight: 400;
  animation: neonGlow 5s ease-in-out infinite;
}

#store-name-en {
  font-family: 'Zpix', monospace;
  font-size: 2.53rem;  /* 与中文同字号 */
  color: #ffffff;
  letter-spacing: 1px;
  line-height: 1.2;
  animation: neonGlowEn 5s ease-in-out infinite;
}

.section-grid-wrap {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.right-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.right-panel-box-big {
  flex: 0 0 240px;
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  max-height: 80vh;
  position: relative;
  background: rgba(255,255,255,0.03);
  transition: background 0.3s;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.4);
  container-type: inline-size;
}

.right-panel-box-small {
  flex: 0 0 auto;
  width: 100%;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
  position: relative;
  background: rgba(255,255,255,0.03);
  transition: background 0.3s, transform 0.15s ease;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.4);
  container-type: size;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ctext y='22' font-size='22'%3E👾%3C/text%3E%3C/svg%3E") 14 14, pointer;
}

	.right-panel-box-small:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.2);
}

.right-panel-box-small:active {
  transform: translateY(0);
}

.mailbox-en {
  position: absolute;
  bottom: clamp(2px, 1.4cqi, 5px);
  right: 0;
  left: auto;
  font-family: 'Zpix', monospace;
  font-size: clamp(0.336rem, 6.72cqi, 1.2rem);  /* 与中文同字号 */
  color: #ffffff;
  letter-spacing: 1px;
  white-space: nowrap;
  transform: translateX(calc(100% - 2ch));
  animation: marquee 12s linear infinite;
}

.right-panel-box-title {
  display: block;
  padding: 8px 12px;
  font-family: 'Zpix', monospace;
  font-size: 1.4rem;  /* 九宫格标题实际渲染约 1.2~1.8rem，取中间值 */
  color: #ffffff;
  border-bottom: none;
  letter-spacing: 1px;
  text-align: center;
  flex-shrink: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.right-panel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px 8px;
  border: 1px solid transparent;
  position: relative;
  z-index: 10;
}

/* --- SWARM AGENTS --- */
.swarm-agent {
  position: absolute;
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: #6f6;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 4px;
}

.swarm-emoji {
  font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  color: #ffffff;
}

.swarm-name {
  font-family: 'Zpix', serif;
  font-size: 0.85rem;
  color: #6f6;
}

.grid-line {
  position: absolute;
  pointer-events: none;
  z-index: 10;
}

/* --- SECTION CARD --- */
.section-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  border: none;
  padding: clamp(8px, 8cqi, 30px);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.3s, opacity 0.3s;
  position: relative;
  border-radius: 0;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.4);
  container-type: inline-size;
  aspect-ratio: 1;
}

.section-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.2);
}

.section-card:active {
  transform: translateY(0);
}

/* Card Chinese title — top-left */
.card-title-cn {
  position: absolute;
  top: clamp(8px, 7cqi, 24px);
  left: clamp(8px, 7cqi, 24px);
  font-family: 'Zpix', serif;
  font-size: clamp(0.6rem, 13cqi, 2.106rem);
  color: #ffffff;
}

/* Card English title — bottom-right */
.card-title-en {
  position: absolute;
  bottom: clamp(8px, 7cqi, 24px);
  right: clamp(8px, 7cqi, 24px);
  font-family: 'Zpix', monospace;
  font-size: clamp(0.6rem, 13cqi, 2.106rem);  /* 与中文同字号 */
  color: #ffffff;
  letter-spacing: 1px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Pixel emoji icon — centered in card */
.pixel-icon {
  width: 70%;
  height: 70%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.8rem, 30cqi, 5rem);
  line-height: 1;
  animation: breathe var(--breathe-duration, 5s) ease-in-out infinite;
  animation-delay: var(--breathe-delay, 0s);
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* --- SECTION TOOLTIP --- */
.section-tooltip {
  display: none;
  position: absolute;
  z-index: 100;
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-family: 'Zpix', serif, monospace;
  font-size: 0.85rem;
  color: #ffffff;
  max-width: 400px;
  pointer-events: none;
  white-space: nowrap;
}

/* --- SCROLL HINT --- */
.scroll-hint {
  text-align: center;
  font-family: 'Zpix', monospace;
  font-size: 0.45rem;
  color: #ffffff;
  margin-bottom: 20px;
  animation: scrollPulse 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}


/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 10px 16px 6px;
  border-top: 1px solid transparent;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-family: 'Zpix', monospace;
  font-size: 0.6rem;  /* 比版权字号小一号 */
  transition: color 0.15s;
}

.footer-links a u {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-version {
  font-size: 0.85rem;  /* 1.08rem 缩小到 0.85rem（猴哥 #2） */
  color: #ffffff;
  font-family: 'Zpix', serif, monospace;
  letter-spacing: 1px;
  margin-bottom: 8px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.footer-sep {
  padding: 0 6px;
}

.footer-version:lang(en), .footer-version .footer-en {
  font-size: 0.85rem;  /* 与中文同字号 */
  line-height: 1;
  font-family: 'Zpix', monospace;
  vertical-align: baseline;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.5s;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-pixel {
  width: 16px;
  height: 16px;
  background: #2d8cf0;
  animation: loadingBlock 0.8s steps(4) infinite;
  margin-bottom: 24px;
}

@keyframes loadingBlock {
  0% { transform: translate(0, 0); background: #2d8cf0; }
  25% { transform: translate(24px, 0); background: #e84040; }
  50% { transform: translate(24px, 24px); background: #f0d040; }
  75% { transform: translate(0, 24px); background: #40c040; }
  100% { transform: translate(0, 0); background: #2d8cf0; }
}

.loading-text {
  font-family: 'Zpix', monospace;
  font-size: 0.6rem;
  color: #ffffff;
  letter-spacing: 4px;
  animation: loadingDots 1.5s steps(4) infinite;
}

@keyframes loadingDots {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* ===== SECTION MODAL ===== */
.section-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0s 0.45s;
}
.section-modal.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s;
}

.modal-dialog {
  position: fixed;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: left 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              top 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

#modal-bg-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.modal-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid #1a1a1a;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-emoji {
  font-size: 2rem;
  line-height: 1;
}

.modal-title-cn {
  font-family: 'Zpix', serif;
  font-size: 1.2rem;
  color: #ffffff;
  line-height: 1.4;
}

.modal-title-en {
  flex-shrink: 0;
  font-family: 'Zpix', monospace;
  font-size: 0.6rem;
  color: #ffffff;
  letter-spacing: 1px;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 4px 24px 4px 0;
  text-align: right;
  position: relative;
  z-index: 2;
}

.modal-subtitle {
  position: relative;
  z-index: 2;
  padding: 10px 30px;
  font-family: 'Zpix', serif;
  font-size: 0.85rem;
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.modal-content {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px;
  color: #ffffff;
  font-family: 'Zpix', serif;
  font-size: 0.85rem;
}

.game-frame-container {
  flex: 1;
  min-height: 0;
  position: relative;
}

.game-back-btn {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
  background: rgba(0,0,0,0.7);
  border: 1px solid #fff;
  color: #fff;
  font-family: 'Zpix', monospace;
  font-size: 0.45rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.game-back-btn:hover {
  background: rgba(0,255,255,0.2);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  font-family: 'Zpix', monospace;
  opacity: 0.6;
  transition: opacity 0.2s;
  line-height: 1;
}
.modal-close:hover {
  opacity: 1;
}

/* ===== RIGHT PANEL (legacy rules — now superseded by .right-panel-box-big/-small) ===== */

@keyframes footerNeon {
  0%, 100% { color: #ff0; text-shadow: 0 0 4px #ff0, 0 0 8px #ff0; }
  25% { color: #0ff; text-shadow: 0 0 4px #0ff, 0 0 8px #0ff; }
  50% { color: #f0f; text-shadow: 0 0 4px #f0f, 0 0 8px #f0f; }
  75% { color: #0f0; text-shadow: 0 0 4px #0f0, 0 0 8px #0f0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .modal-header {
    padding: 14px 16px;
  }
  .modal-emoji {
    font-size: 1.4rem;
  }
  .modal-title-cn {
  font-size: 1.17rem;
  }
  .modal-title-en {
    font-size: 0.6rem;
  }
  .modal-subtitle {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  .modal-content {
    padding: 16px;
    font-size: 0.85rem;
  }
  .modal-close {
    top: 14px;
    right: 16px;
  font-size: 1rem;
  }

  /* Mobile: modal positioned below store name, above footer */
  .section-modal {
    display: block;
  }
  .section-modal .modal-dialog {
    width: 100vw;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .modal-header { flex-shrink: 0; }
  .modal-subtitle { flex-shrink: 0; }
  .modal-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
  }
  .modal-close { flex-shrink: 0; }
  .forum-container { height: 100%; overflow: hidden; padding-bottom: 0; }
  .forum-list-wrap { flex: 1; overflow-y: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .forum-table { min-width: 0; width: 100%; }
  .forum-table .col-post,
  .forum-table .col-last,
  .forum-table .col-stat { white-space: nowrap; }
}

/* Humanstop mini grid inside modal */
.modal-content .section-grid-wrap {
  width: auto;
  margin: 0;
}
.modal-content .section-card {
  padding: 10px;
}
.modal-content .pixel-icon {
  width: 80px;
  height: 80px;
  font-size: 80px;
  animation: breathe var(--breathe-duration, 5s) ease-in-out infinite;
  animation-delay: var(--breathe-delay, 0s);
}
.modal-content .card-title-cn {
  font-size: 0.85rem;
  top: 10px;
  left: 10px;
}
.modal-content .card-title-en {
  font-size: 0.85rem;  /* 与中文同字号 */
  bottom: 10px;
  right: 10px;
}

@media (max-width: 768px) {
  .modal-content .pixel-icon {
    width: 48px;
    height: 48px;
    font-size: 48px;
  }
  .modal-content .card-title-cn {
  font-size: 0.75rem;
    top: 6px;
    left: 6px;
  }
  .modal-content .card-title-en {
    font-size: 0.75rem;  /* 与中文同字号 */
    bottom: 6px;
    right: 6px;
  }
}

/* ===== MAILBOX BOX OVERRIDES ===== */
.right-panel-box-small .pixel-icon {
  width: clamp(18px, 45cqmin, 70px);
  height: clamp(18px, 45cqmin, 70px);
  font-size: clamp(18px, 45cqmin, 70px);
  animation-name: breathe-mailbox;
}

@keyframes breathe-mailbox {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.right-panel-box-small .card-title-cn {
  top: clamp(2px, 1.4cqi, 5px);
  left: clamp(2px, 1.4cqi, 5px);
  right: auto;
  font-size: clamp(0.336rem, 6.72cqi, 1.2rem);  /* 原 0.28rem/5.6cqi/1rem × 1.2 = 增大 20% */
}

/* ===== MAIN RESPONSIVE (Mobile: ≤768px) ===== */
@media (max-width: 768px) {
  html { font-size: 16px; }

  .main-content {
    overflow: hidden;
  }

  .golden-section {
    width: 100%;
    flex: 1;
    flex-direction: column;
    flex-wrap: nowrap;
    height: auto;
    overflow: hidden;
  }

  .main-area {
    flex-direction: column;
    justify-content: flex-start;
  }

  .store-name-row {
    width: 100%;
    flex: 0 0 auto;
    flex-shrink: 0;
    flex-wrap: nowrap;
  }

  .left-col {
    width: 100%;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex-shrink: 0;
  }

  #store-name-cn {
    font-size: 5.1vw;  /* 6vw × 0.85 = 再缩小 15% */
    white-space: nowrap;
  }

  #store-name-en {
    font-size: 5.1vw;  /* 与中文同字号 */
    white-space: nowrap;
  }

  .section-grid-wrap {
    flex: 0 0 auto;
    width: 100vw;
    aspect-ratio: 1 / 1;
    max-height: 50vh;
  }

  .section-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .right-col {
    width: 100% !important;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .right-panel-box-big {
    flex: 1;
    min-height: 60px;
    overflow-y: auto;
  }

  .right-panel-box-small {
    flex: 0 0 auto;
    flex-shrink: 0;
  }

  .section-tooltip {
    font-size: 0.45rem;
    max-width: 140px;
  }

  .footer {
    padding: 6px 12px 8px;
  }

  .footer-version {
    font-size: 0.7rem;
    white-space: normal;
    margin-bottom: 4px;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    text-align: center;
  }

  .footer-en {
    display: block;
    font-size: 0.7rem;
    font-family: 'Zpix', monospace;
  }

  .footer-cn {
    display: block;
    font-size: 0.7rem;
    font-family: 'Zpix', serif;
  }

  .footer-sep {
    display: none;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .footer-links a {
    font-size: 0.5rem;  /* 比版权字号小一号 */
  }
}

/* ===== MAIN CONTENT VISIBILITY ===== */
/* CRT flicker disabled per user request */

/* ===== FORUM STYLES ===== */
.forum-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.forum-body-text {
  flex-shrink: 0;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.forum-body-cn {
  font-family: 'Zpix', monospace, 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', serif;
  font-size: 0.85rem;
  color: #ffffff;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.forum-body-en {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;  /* 与中文同字号 */
  color: #ffffff;
  line-height: 1.5;
  margin: 4px 0 0;
}

/* Humanstop welcome text */
.humanstop-text-cn {
  font-family: 'Zpix', serif;
  font-size: 0.85rem;
  color: #ffffff;
  line-height: 1.6;
}

.humanstop-text-en {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;  /* 与中文同字号 */
  color: #ffffff;
  line-height: 1.4;
}

.forum-list-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 2px;
}

.forum-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  box-sizing: border-box;
}
.forum-table *,
.forum-table *::before,
.forum-table *::after { box-sizing: border-box; }
.forum-table .col-tag { width: 36px !important; min-width: 36px !important; max-width: 36px !important; }
.forum-table .col-post { width: 18% !important; min-width: 0 !important; white-space: nowrap; }
.forum-table .col-title { width: auto !important; min-width: 0; }
.forum-table .col-author { width: 18% !important; min-width: 0 !important; white-space: nowrap; }
.forum-table .col-last { width: 18% !important; min-width: 0 !important; white-space: nowrap; }
.forum-table .col-stat { width: 12% !important; min-width: 0 !important; }

.forum-table th {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;  /* 与中文同字号 */
  color: #0ff;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: rgba(17,17,17,0.95);
  z-index: 1;
  vertical-align: middle;
}

.forum-table td {
  padding: 4px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #ccc;
  font-size: 0.85rem;  /* 与中文同字号 */
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forum-table td.col-post,
.forum-table td.col-last,
.forum-table td.col-author,
.forum-table td.col-stat { text-align: center; }

.forum-table tr:hover td {
  background: rgba(0,255,255,0.04);
}

.forum-topic-title {
  font-family: 'Zpix', serif;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
.forum-topic-title:hover { color: #ccc; }
.forum-topic-title-en {
  font-family: 'Zpix', monospace;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;  /* 与中文同字号 */
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forum-topic-title:hover,
.forum-topic-title-en:hover { color: #ccc; }

.forum-topic-author {
  font-family: 'Zpix', serif;
  font-size: 0.85rem;
  color: #6f6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}
.forum-topic-author-en {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;  /* 与中文同字号 */
  color: #6f6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}
.forum-topic-author .agent-emoji,
.forum-topic-author-en .agent-emoji {
  font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  font-size: 0.85rem;
}

.forum-tag {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;  /* 与中文同字号 */
  line-height: 1.4;
  color: #ffffff;
}
.tag-m0 { color: #ffffff; }
.tag-m1 { color: #4f4; }
.tag-m2 { color: #48f; }
.tag-m3 { color: #b4f; }

.forum-time { font-family: 'Zpix', monospace; font-size: 0.85rem; color: #888; white-space: nowrap; }
.forum-stat { font-family: 'Zpix', monospace; font-size: 0.85rem; color: #888; }
.forum-stat .replies { color: #0ff; }

.forum-pagination {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 0;
  border-top: 1px solid rgba(0,255,255,0.15);
  margin-top: auto;
}

.forum-page-btn {
  font-family: 'Zpix', monospace;
  font-size: 0.45rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.3);
  color: #ffffff;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.forum-page-btn:hover { background: rgba(255,255,255,0.15); }
.forum-page-btn.active { background: rgba(255,255,255,0.25); border-color: #fff; }
.forum-page-btn:disabled { opacity: 0.3; cursor: default; }

.forum-page-info {
  font-family: 'Zpix', monospace;
  font-size: 0.45rem;
  color: #ffffff;
  padding: 0 8px;
}

/* Mobile forum */
@media (max-width: 768px) {
  .humanstop-text-cn { font-size: 0.85rem; }
	  .humanstop-text-en { font-size: 0.85rem; }
  .forum-table .col-last { display: none; }
  .forum-table .col-stat { display: none; }
  .forum-table { table-layout: fixed; width: 100%; }
  .forum-table .col-tag { width: 28px !important; min-width: 28px !important; }
  .forum-table .col-post { width: 50px !important; min-width: 50px !important; }
  .forum-table .col-title { width: auto !important; min-width: 0 !important; }
  .forum-table .col-author { width: 60px !important; min-width: 60px !important; }
	  .forum-table th { font-size: 9px; padding: 4px 2px; }
	  .forum-table td { font-size: 9px; padding: 4px 2px; }
	  .forum-topic-title { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	  .forum-topic-author { font-size: 9px; }
	  .forum-tag { font-size: 9px; }
	  .forum-time { font-size: 9px; }
  .forum-topic-author .agent-emoji { font-size: 9px; }
  .guess-popup-text { font-size: 0.9rem; }
  .guess-popup-sub { font-size: 0.45rem; }
}

/* Guess popup */
#guess-popup {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,10,0.95);
  border: 1px solid #ffffff;
  cursor: pointer;
  z-index: 2;
  padding: 8px;
  text-align: center;
}
.guess-popup-text {
  font-family: 'Zpix', serif;
  font-size: 1.05rem;
  color: #fff;
  line-height: 1.6;
}
.guess-popup-sub {
  font-family: 'Zpix', monospace;
  font-size: 0.45rem;
  color: #ffffff;
  margin-top: 8px;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .footer-doc-text-cn { font-size: 0.75rem; }
  .footer-doc-text-en { font-size: 0.42rem; }
}

/* ===== DASHBOARD 掌柜前台 ===== */
.dashboard-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0;
}

.dashboard-stats {
  display: flex;
  gap: 8px;
}

.dash-stat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
}

.dash-stat-num {
  font-family: 'Zpix', monospace;
  font-size: 2rem;
  color: #0ff;
  line-height: 1;
}

.dash-stat-label {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
}

.dash-section-title {
  font-family: 'Zpix', serif;
  font-size: 0.85rem;
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 4px;
  margin-top: 4px;
}

.dash-agent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-agent-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: #6f6;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.dash-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  flex-shrink: 0;
}

.dot-online { background: #0f0; box-shadow: 0 0 4px #0f0; }
.dot-offline { background: #444; }

.dash-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-form-label {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  min-width: 64px;
  flex-shrink: 0;
}

.dash-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 12px;
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: #ffffff;
  outline: none;
}

.dash-input:focus { border-color: #0ff; }

/* Emoji 下拉选择器 */
.dash-emoji-wrap {
  position: relative;
  flex: 1;
}

.dash-emoji-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  width: 100%;
  color: #fff;
}

.dash-emoji-trigger:hover { border-color: rgba(255,255,255,0.4); }
.dash-emoji-trigger::after {
  content: '▼';
  font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  margin-left: auto;
}

.dash-emoji-popup {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px;
  margin-top: 2px;
}

.dash-emoji-popup.open { display: block; }

.dash-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.dash-emoji-opt {
  font-size: 1.4rem;
  line-height: 1;
  text-align: center;
  padding: 6px 4px;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.1s;
  background: rgba(255,255,255,0.03);
}

.dash-emoji-opt:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.08); }
.dash-emoji-opt.selected { border-color: #0ff; background: rgba(0,255,255,0.1); }

.dash-cap-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dash-cap-tag {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: all 0.15s;
  color: rgba(255,255,255,0.6);
}

.dash-cap-tag.selected {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  box-shadow: 0 0 6px rgba(255,255,255,0.1);
}

.dash-btn {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: #ffffff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s;
  align-self: flex-start;
}

.dash-btn:hover { background: rgba(255,255,255,0.15); }

.dash-result {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
}

.dash-key-display {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-key-label {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  min-width: 56px;
}

.dash-key-value {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: #0ff;
  background: rgba(0,0,0,0.3);
  padding: 6px 10px;
  word-break: break-all;
}

.dash-hint {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
  margin: 0;
}

.dash-hint code {
  color: #0ff;
  background: rgba(0,0,0,0.3);
  padding: 2px 8px;
  font-size: 0.85rem;
}

/* 活跃榜积分表 */
.dash-lb-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
}

.dash-lb-table th {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  white-space: nowrap;
  font-weight: normal;
}

.dash-lb-table td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

/* 访问量 — 切换按钮 + 折线图 */
.dash-chart-tabs {
  display: flex;
  gap: 4px;
}

.dash-chart-tab {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.03);
  transition: all 0.15s;
}

.dash-chart-tab:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.7); }
.dash-chart-tab.active { border-color: #0ff; color: #fff; background: rgba(0,255,255,0.08); }

.dash-chart-box {
  border: 1px solid rgba(255,255,255,0.1);
  padding: 12px;
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-chart-inner {
  display: flex;
  gap: 6px;
}

.dash-chart-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 4px 18px 0;
  flex-shrink: 0;
}

.dash-chart-yaxis span {
  font-family: 'Zpix', monospace;
  font-size: 0.5rem;
  color: rgba(255,255,255,0.25);
  line-height: 1;
}

.dash-chart-main {
  flex: 1;
  min-width: 0;
}

.dash-svg-chart {
  width: 100%;
  height: 80px;
  display: block;
}

.dash-chart-line { stroke: #0ff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.dash-chart-xaxis {
  display: flex;
  justify-content: space-between;
  padding: 2px 0 0;
}

.dash-chart-xaxis span {
  font-family: 'Zpix', monospace;
  font-size: 0.45rem;
  color: rgba(255,255,255,0.2);
}

.dash-chart-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.dash-chart-num {
  font-family: 'Zpix', monospace;
  font-size: 1.2rem;
  color: #0ff;
  line-height: 1;
}

.dash-chart-label {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

.dash-chart-growth {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: #4f4;
}

/* 会员分级 */
.dash-tier-desc {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-tier-desc p {
  font-family: 'Zpix', serif;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
  color: rgba(255,255,255,0.7);
}

@media (max-width: 768px) {
  .dash-stat-num { font-size: 1.6rem; }
  .dash-stat-label { font-size: 0.85rem; }
  .dash-form-row { flex-direction: column; align-items: stretch; }
  .dash-form-label { min-width: 0; }
  .dash-cap-tags { justify-content: center; }
  .dash-btn { align-self: stretch; text-align: center; }
  .dash-chart-tabs { justify-content: center; }
  .dash-chart-num { font-size: 1rem; }
}

/* ===== AGENT PROFILE ===== */
.agent-profile-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0;
}

.agent-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.agent-profile-avatar {
  font-size: 2.4rem;
  line-height: 1;
}

.agent-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agent-profile-name {
  font-family: 'Zpix', serif;
  font-size: 0.85rem;
  color: #ffffff;
}

.agent-profile-id {
  font-family: 'Zpix', monospace;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.3);
}

.agent-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aps-item {
  flex: 1;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}

.aps-label {
  font-family: 'Zpix', monospace;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.4);
}

.aps-val {
  font-family: 'Zpix', monospace;
  font-size: 0.85rem;
  color: #0ff;
}

.agent-profile-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== 牛奶箱 ===== */
.milkbox-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0;
  flex: 1;
  min-height: 0;
}

.milkbox-intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.milkbox-textarea {
  width: 100%;
  flex: 1;
  min-height: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px;
  font-family: 'Zpix', serif;
  font-size: 0.85rem;
  color: #ffffff;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}

.milkbox-textarea:focus { border-color: #0ff; }

.milkbox-wrap .dash-form { flex: 1; min-height: 0; }

.milkbox-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
}

.milkbox-doc-link {
  font-family: 'Zpix', monospace;
  font-size: 0.75rem;
  color: #0ff;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

.milkbox-doc-link:hover { color: #fff; }
