/* ===================================================
   阿花数码玩机手册 — Custom Theme
   科技蓝绿风格 · 基于 vue.css 覆盖
   =================================================== */

:root {
  --primary:       #0D9488;
  --primary-light: #14B8A6;
  --primary-dark:  #0F766E;
  --primary-bg:    #F0FDFA;
  --secondary:     #0284C7;
  --accent:        #06B6D4;
  --bg:            #F8FAFC;
  --surface:       #FFFFFF;
  --text:          #1E293B;
  --text-secondary:#64748B;
  --text-muted:    #94A3B8;
  --border:        #E2E8F0;
  --sidebar-bg:    #F8FAFC;
  --sidebar-hover: #F1F5F9;
  --sidebar-active:#E0F2FE;
  --radius:        8px;
  --radius-lg:     12px;
  --shadow:        0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg:     0 4px 16px rgba(13,148,136,0.10);
  --font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono:     "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

/* ===========================
   全局
   =========================== */
* { box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 15px;
}

.content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin: 24px auto;
  padding: 8px 40px 32px;
  max-width: 960px;
}

.markdown-section {
  max-width: 100% !important;
  padding: 16px 0;
}

/* ===========================
   标题
   =========================== */
.markdown-section h1 {
  font-size: 1.7em;
  color: var(--primary-dark);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 10px;
  margin: 36px 0 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.markdown-section h2 {
  font-size: 1.35em;
  color: var(--primary);
  margin: 28px 0 14px;
  font-weight: 600;
}

.markdown-section h3 {
  font-size: 1.1em;
  color: var(--text);
  margin: 20px 0 10px;
  font-weight: 600;
}

.markdown-section h4 {
  font-size: 1em;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===========================
   段落 / 链接
   =========================== */
.markdown-section p {
  margin: 0 0 12px;
}

.markdown-section a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.markdown-section a:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-light);
}

/* ===========================
   引用块 — 前言/提示用
   =========================== */
.markdown-section blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-bg);
  padding: 12px 20px;
  margin: 16px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
}

.markdown-section blockquote p { margin: 4px 0; }

/* 双 >> 引用（游戏科技相关中的嵌套块） */
.markdown-section blockquote blockquote {
  border-left-color: var(--secondary);
  background: #F0F9FF;
  margin: 8px 0;
}

/* ===========================
   列表
   =========================== */
.markdown-section ul,
.markdown-section ol {
  padding-left: 24px;
  margin: 8px 0 16px;
}

.markdown-section li { margin: 4px 0; }

/* ===========================
   代码
   =========================== */
.markdown-section code {
  font-family: var(--font-mono);
  background: #F1F5F9;
  color: #0F766E;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

.markdown-section pre {
  background: #1E293B !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.markdown-section pre code {
  background: transparent;
  color: #E2E8F0;
  padding: 0;
}

/* ===========================
   表格
   =========================== */
.markdown-section table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.markdown-section th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
}

.markdown-section td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}

.markdown-section tr:last-child td { border-bottom: none; }

.markdown-section tr:nth-child(even) td { background: var(--primary-bg); }

/* ===========================
   图片
   =========================== */
.markdown-section img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 16px 0;
}

/* ===========================
   水平分隔线
   =========================== */
.markdown-section hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 32px 0;
}

/* ===========================
   侧边栏
   =========================== */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
}

.sidebar ul li a {
  color: var(--text);
  padding: 7px 20px;
  transition: all 0.15s;
  border-radius: 4px;
  margin: 1px 8px;
  font-size: 14px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
}

.sidebar ul li a:hover {
  background: var(--sidebar-hover);
  color: var(--primary);
}

.sidebar ul li.active > a {
  background: var(--sidebar-active);
  color: var(--primary-dark);
  font-weight: 600;
  border-right: 3px solid var(--primary);
}

.sidebar .sidebar-nav { padding: 10px 0; }

.sidebar-nav > ul > li > a {
  pointer-events: none;
  cursor: default;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  padding: 10px 20px;
  margin: 4px 8px;
  background: linear-gradient(90deg, var(--primary-bg) 0%, transparent 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 6px 6px 0;
  letter-spacing: 0.3px;
}

.sidebar-nav > ul > li > a:hover {
  background: linear-gradient(90deg, var(--primary-bg) 0%, transparent 100%);
  color: var(--primary-dark);
}

.app-name-link {
  color: var(--primary-dark) !important;
  font-size: 1.25em;
  font-weight: 700;
  display: block;
  text-align: center;
  padding: 20px 15px;
  border-bottom: 1px solid var(--border);
}

/* ===========================
   details / summary
   =========================== */
summary {
  display: inline-block;
  padding: 10px 22px;
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: var(--radius) !important;
  cursor: pointer;
  font-weight: 600;
  border: none;
  transition: all 0.25s ease;
  margin: 10px 0;
  box-shadow: 0 2px 6px rgba(13,148,136,0.2);
}

summary:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(13,148,136,0.3);
}

summary:active { transform: translateY(0); }

summary::-webkit-details-marker,
summary::marker { display: none; }

summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 10px;
  font-size: 12px;
  transition: transform 0.25s ease;
}

details[open] summary::before {
  content: "▼";
}

/* ===========================
   Hero 首页顶部区域
   =========================== */
.hero-section {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 8px;
}

.hero-section > .hero-card {
  flex: 1;
  min-width: 280px;
}

.hero-card {
  flex: 1;
  background: linear-gradient(135deg, #F0FDFA 0%, #FFFFFF 100%);
  border: 1px solid #E0F2F1;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(13,148,136,0.12);
}

/* 左侧介绍区 */
.hero-intro-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-intro-card .hero-title {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 6px;
  line-height: 1.3;
}

.hero-intro-card .hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.95em;
  margin: 0 0 16px;
}

.hero-intro-card blockquote {
  margin: 0 0 16px;
  border-left: 3px solid var(--primary-light);
  background: transparent;
  padding: 0 0 0 14px;
  font-size: 0.95em;
  color: var(--text-secondary);
  border-radius: 0;
}

.hero-intro-card blockquote p { margin: 2px 0; }

.hero-contact-line {
  color: var(--text-secondary);
  font-size: 0.95em;
  margin: 2px 0;
}

.hero-contact-line strong {
  color: var(--primary-dark);
  font-size: 1.05em;
}

/* 右侧二维码区 */
.hero-qrcode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 200px;
  flex: 0 0 220px;
}

.hero-qrcode-card img {
  max-width: 150px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin: 0 0 10px;
}

.hero-qrcode-card .qr-label {
  color: var(--text-secondary);
  font-size: 0.88em;
  margin: 0 0 14px;
}

.hero-btn {
  display: inline-block;
  padding: 10px 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff !important;
  text-decoration: none !important;
  border: none !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92em;
  transition: all 0.25s ease;
  box-shadow: 0 3px 10px rgba(13,148,136,0.25);
  cursor: pointer;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(13,148,136,0.35);
  border-bottom: none !important;
}

.hero-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88em;
  margin: 0 0 24px;
  padding: 8px 16px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: var(--radius);
}

/* ===========================
   红色强调文字
   =========================== */
.markdown-section span[style*="color: red"] {
  color: #DC2626 !important;
  font-weight: 600;
}

/* ===========================
   docsify 锚点按钮
   =========================== */
.markdown-section a[href^="#"]:not(h1 a):not(h2 a):not(h3 a):not(h4 a):not(h5 a):not(h6 a):not(.anchor) {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.25,0.8,0.25,1);
  box-shadow: 0 3px 6px rgba(13,148,136,0.2);
  margin: 5px 3px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.markdown-section a[href^="#"]:not(h1 a):not(h2 a):not(h3 a):not(h4 a):not(h5 a):not(h6 a):not(.anchor):hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #0F766E 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(13,148,136,0.3);
  border-color: var(--primary-dark);
}

.markdown-section a[href^="#"]:not(h1 a):not(h2 a):not(h3 a):not(h4 a):not(h5 a):not(h6 a):not(.anchor):active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(13,148,136,0.2);
}

/* 排除标题锚点 */
.markdown-section h1 a[href^="#"],
.markdown-section h2 a[href^="#"],
.markdown-section h3 a[href^="#"],
.markdown-section h4 a[href^="#"],
.markdown-section h5 a[href^="#"],
.markdown-section h6 a[href^="#"],
.markdown-section .anchor {
  all: unset !important;
  display: inline !important;
  padding: 0 !important;
  background: none !important;
  color: inherit !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  cursor: text !important;
}

/* ===========================
   响应式
   =========================== */
@media screen and (max-width: 768px) {
  .content {
    margin: 0;
    padding: 8px 12px 24px;
    border-radius: 0;
    box-shadow: none;
  }

  .markdown-section { padding: 12px 0 !important; }

  .hero-section {
    flex-direction: column;
    gap: 16px;
  }

  .hero-card { padding: 20px 16px; }

  .hero-qrcode-card {
    flex: 1;
    min-width: 0;
  }

  .hero-qrcode-card img { max-width: 140px; }

  .sidebar-toggle {
    padding: 20px !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    background: var(--primary) !important;
    border-radius: var(--radius) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .sidebar-toggle span {
    display: block !important;
    width: 24px !important;
    height: 3px !important;
    margin: 3px 0 !important;
    background-color: #fff !important;
    border-radius: 2px !important;
  }

  .markdown-section a[href^="#"]:not(h1 a):not(h2 a):not(h3 a):not(h4 a):not(h5 a):not(h6 a):not(.anchor) {
    padding: 10px 14px;
    font-size: 13px;
    display: block;
    margin: 8px 0;
    width: 100%;
    box-sizing: border-box;
  }
}
/* ===========================
   Overrides (takes precedence)
   =========================== */

/* Larger QR code image */
.hero-qrcode-card img {
  max-width: 180px;
}

/* Nav hint - standalone block below hero section */
.hero-nav-hint {
  position: relative;
  margin: 28px 0 12px;
  padding: 18px 24px 18px 28px;
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 50%, #FED7AA 100%);
  border: 2px solid #F97316;
  border-radius: 10px;
  font-size: 0.95em;
  font-weight: 600;
  color: #7C2D12;
  text-align: center;
  line-height: 1.7;
  box-shadow: 0 2px 8px rgba(249,115,22,0.15);
  flex: 0 0 100%;
  max-width: 100%;
}

@media screen and (max-width: 768px) {
  .hero-qrcode-card img {
    max-width: 160px;
  }
  .hero-nav-hint {
    margin: 16px 0 4px;
    padding: 14px 16px;
    font-size: 0.88em;
    font-weight: 600;
    flex: 0 0 auto;
  }
}
/* QR code card title & description */
.hero-qrcode-card .qrcode-title {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 6px;
  line-height: 1.3;
}
.hero-qrcode-card .qrcode-desc {
  font-size: 0.9em;
  color: #334155;
  margin: 0 0 14px;
  line-height: 1.5;
  text-align: center;
}
.hero-qrcode-card .qr-label {
  display: none;
}
@media screen and (max-width: 768px) {
  .hero-qrcode-card .qrcode-title {
    font-size: 1.6em;
  }
  .hero-qrcode-card .qrcode-desc {
    font-size: 0.85em;
    margin: 0 0 10px;
  }
}
