/* MaoMaoQt 官网与下载平台 - 全站样式（明亮现代风，响应式） */
:root {
  --primary: #0E7C8C;
  --primary-dark: #0A5E6B;
  --primary-light: #E6F4F6;
  --accent: #14B8A6;
  --bg: #F7F9FB;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-2: #6B7280;
  --line: #E5E7EB;
  --danger: #DC2626;
  --warn: #D97706;
  --ok: #059669;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .05);
  --maxw: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.65; font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
.mono, code { font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace; }

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

/* ---------- 顶部导航 ---------- */
.site-header {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.nav { display: flex; align-items: center; gap: 26px; height: 62px; }
.nav-logo { font-size: 21px; font-weight: 800; color: var(--text); letter-spacing: .5px; }
.nav-logo .dot { color: var(--primary); }
.nav-menu { display: flex; gap: 4px; flex: 1; }
.nav-menu a {
  padding: 8px 14px; border-radius: 9px; color: var(--text-2); font-weight: 500;
}
.nav-menu a:hover { background: var(--primary-light); color: var(--primary); }
.nav-menu a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; border: none; background: none; font-size: 22px; cursor: pointer; color: var(--text); padding: 6px 10px; }

/* 顶部全局搜索 */
.nav-search { display: flex; align-items: center; gap: 6px; }
.nav-search input {
  width: 168px; padding: 7px 12px; font-size: 13.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: #FAFBFC;
  color: var(--text); outline: none; transition: .15s;
}
.nav-search input:focus { width: 210px; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(14, 124, 140, .12); }
.nav-search button {
  padding: 7px 12px; font-size: 13.5px; font-family: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text-2);
}
.nav-search button:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; cursor: pointer; transition: .15s;
  background: var(--primary); color: #fff;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 26px; font-size: 16px; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #07333B 0%, #0E7C8C 55%, #14B8A6 130%);
  color: #fff; padding: 72px 0 84px; text-align: center;
}
.hero h1 { font-size: 38px; font-weight: 800; margin-bottom: 14px; letter-spacing: 1px; }
.hero p { font-size: 17px; opacity: .92; max-width: 640px; margin: 0 auto 30px; }
.hero .btn { background: #fff; color: var(--primary); }
.hero .btn:hover { background: #ECFDF5; color: var(--primary-dark); }
.hero .btn-outline { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.hero .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* Hero 内搜索 */
.hero-search {
  display: flex; gap: 8px; width: min(92vw, 560px); margin: 0 auto 24px;
}
.hero-search input {
  flex: 1; padding: 12px 16px; font-size: 15px; font-family: inherit; color: var(--text);
  border: 1px solid rgba(255,255,255,.35); border-radius: 12px; background: rgba(255,255,255,.96); outline: none;
}
.hero-search input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.hero-search button {
  padding: 12px 22px; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
  border: none; border-radius: 12px; background: #fff; color: var(--primary);
}
.hero-search button:hover { background: #ECFDF5; color: var(--primary-dark); }
@media (max-width: 640px) { .hero-search { margin-bottom: 18px; } }

/* ---------- 卡片与网格 ---------- */
.section { padding: 54px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.section-title h2 { font-size: 24px; font-weight: 750; }
.section-title .more { font-size: 14px; color: var(--text-2); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: .18s;
}
.card:hover { transform: translateY(-3px); border-color: #c9e2e6; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 14px; }
.sw-icon {
  width: 52px; height: 52px; border-radius: 13px; display: flex; align-items: center;
  justify-content: center; font-size: 24px; margin-bottom: 14px;
  background: var(--primary-light); color: var(--primary); font-weight: 700;
}
.tag {
  display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary); margin-right: 6px;
}
.tag-green { background: #ECFDF5; color: var(--ok); }
.tag-amber { background: #FFFBEB; color: var(--warn); }
.tag-gray { background: #F3F4F6; color: var(--text-2); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { background: #FAFBFC; color: var(--text-2); font-weight: 600; font-size: 13px; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #FAFCFD; }

/* ---------- 表单 ---------- */
.form-card { max-width: 420px; margin: 48px auto; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14.5px; background: #fff; color: var(--text); outline: none;
  font-family: inherit;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 124, 140, .12); }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row img { height: 44px; border-radius: 9px; border: 1px solid var(--line); cursor: pointer; }
.form-hint { font-size: 13px; color: var(--text-2); margin-top: 6px; }

/* ---------- 面包屑/页头 ---------- */
.page-head { padding: 34px 0 6px; }
.crumbs { font-size: 13.5px; color: var(--text-2); margin-bottom: 10px; }
.crumbs a { color: var(--text-2); }
.page-head h1 { font-size: 28px; font-weight: 750; }

/* ---------- Markdown 内容 ---------- */
.md h1, .md h2, .md h3 { margin: 20px 0 10px; line-height: 1.35; }
.md h1 { font-size: 24px; } .md h2 { font-size: 20px; } .md h3 { font-size: 17px; }
.md p { margin: 10px 0; }
.md ul, .md ol { margin: 10px 0 10px 24px; }
.md li { margin: 4px 0; }
.md code { background: #F3F4F6; padding: 2px 6px; border-radius: 6px; font-size: 13.5px; }
.md pre { background: #0F172A; color: #E2E8F0; padding: 14px 16px; border-radius: 10px; overflow-x: auto; margin: 12px 0; }
.md pre code { background: none; color: inherit; padding: 0; }
.md blockquote { border-left: 3px solid var(--primary); padding: 6px 14px; background: var(--primary-light); border-radius: 0 8px 8px 0; margin: 12px 0; color: #075A66; }
.md img { border-radius: 10px; margin: 10px 0; }
.md a { text-decoration: underline; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- 用户中心 ---------- */
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.stat { text-align: center; padding: 18px 10px; }
.stat .num { font-size: 26px; font-weight: 800; color: var(--primary); }
.stat .lbl { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.progress { height: 10px; background: #EEF2F4; border-radius: 20px; overflow: hidden; margin: 10px 0; }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 20px; transition: .3s; }

/* ---------- Toast ---------- */
#toast { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast-item { padding: 12px 18px; border-radius: 10px; color: #fff; font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); animation: fadein .25s; }
.toast-ok { background: #0F766E; } .toast-err { background: #B91C1C; } .toast-warn { background: #B45309; }
@keyframes fadein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }

/* ---------- 页脚 ---------- */
.site-footer { background: #0B2A30; color: #9FB8BC; padding: 42px 0 30px; margin-top: 60px; font-size: 14px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.site-footer h4 { color: #E6F1F2; font-size: 15px; margin-bottom: 12px; }
.site-footer a { color: #9FB8BC; display: block; margin: 6px 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin: 26px 0; }
.pager button { min-width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--text); }
.pager button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--text-2); padding: 60px 0; font-size: 14.5px; }
.empty .big { font-size: 44px; margin-bottom: 10px; }

/* ---------- 响应式：表格转卡片（移动端） ---------- */
@media (max-width: 640px) {
  .table-wrap { border: none; background: transparent; border-radius: 0; }
  .table-wrap table.table,
  .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr {
    background: var(--card); border: 1px solid var(--line);
    border-radius: 12px; margin-bottom: 12px; overflow: hidden;
  }
  .table tr:hover td { background: transparent; }
  .table td {
    display: flex; justify-content: space-between; align-items: center;
    gap: 14px; border-bottom: 1px solid var(--line);
    padding: 10px 14px; white-space: normal; text-align: right;
    max-width: 100% !important;   /* 覆盖桌面端遗留的内联 max-width */
  }
  .table td:last-child { border-bottom: none; }
  .table td[data-label]::before {
    content: attr(data-label); color: var(--text-2);
    font-size: 12.5px; flex-shrink: 0; text-align: left; font-weight: 600;
  }
  .table td.no-label::before { content: none; }
  .table td.no-label { justify-content: flex-end; }
  .table td .btn { padding: 9px 22px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
  .nav-search input { width: 130px; }
  .nav-search input:focus { width: 150px; }
}
@media (max-width: 640px) {
  .nav { height: 56px; gap: 14px; }
  .nav-logo { margin-right: auto; }
  .nav-search { order: 5; width: 100%; }
  .nav-search input, .nav-search input:focus { width: 100%; flex: 1; font-size: 16px; }
  .nav-search button { padding: 7px 10px; }
  .nav-menu {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 10px 16px 16px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav-menu.open { display: flex; }
  .nav-burger { display: block; margin-left: auto; }
  .hero h1 { font-size: 27px; } .hero { padding: 46px 0 54px; }
  .hero p { font-size: 15.5px; }
  .hero .btn { display: flex; width: 100%; max-width: 320px; margin: 0 auto 12px; }
  .hero .btn + .btn { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 34px 0; }
  .section-title { flex-direction: column; gap: 6px; }
  .page-head h1 { font-size: 24px; }
  .container { padding: 0 14px; }
  /* 防 iOS 聚焦自动缩放：输入字号 ≥16px */
  .input, select.input, textarea.input { font-size: 16px; }
  /* 页脚：纵向堆叠铺满宽度 + 增大点击区域 */
  .footer-grid { display: block; }
  .footer-grid > div { width: 100%; margin-bottom: 22px; }
  .site-footer a { margin: 10px 0; font-size: 14.5px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer-bottom a { display: inline-block; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .form-card { margin: 24px auto; padding: 0 4px; }
  .captcha-row img { height: 48px; }
  .pager button { min-width: 44px; height: 42px; }
  .stat .num { font-size: 22px; }
  .stat .lbl { font-size: 11.5px; white-space: nowrap; }
}

/* 娱乐入口（大肥鱼桌宠） */
.footer-pet {
  color: #9FB8BC; text-decoration: none; font-size: 13px;
  transition: color .2s, transform .2s; display: inline-flex; align-items: center; gap: 4px;
}
.footer-pet:hover { color: #fff; transform: translateY(-1px); }
@media (max-width:900px) {
  .footer-pet { margin: 0 auto; }
}

/* ---------- 回到顶部 ---------- */
#backTop {
  position: fixed; right: 22px; bottom: 96px; z-index: 90;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  font-size: 18px; line-height: 1; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s, color .2s, border-color .2s;
}
#backTop.show { opacity: 1; visibility: visible; transform: none; }
#backTop:hover { color: var(--primary); border-color: var(--primary); }
@media (max-width: 640px) { #backTop { right: 12px; bottom: 78px; width: 44px; height: 44px; } }

/* ---------- 键盘可达性：统一焦点样式 ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 80px 0 40px; }
.notfound .code {
  font-size: 76px; font-weight: 800; letter-spacing: 2px; line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound h1 { font-size: 22px; margin: 14px 0 8px; }
.notfound p { color: var(--text-2); margin-bottom: 22px; }
.notfound .acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
