/* ==========================================================================
   页脚 v2 · 结构化布局
   ========================================================================== */

.main-footer {
  padding: 10px 10px 20px !important;
  margin-top: 12px !important;
}

.main-footer .container,
.main-footer .container-footer {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.main-footer .footer {
  background: var(--ap-card, #fff) !important;
  border: 1px solid var(--ap-line, rgba(0, 0, 0, 0.08)) !important;
  border-radius: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: var(--ap-shadow, 0 2px 8px rgba(0, 0, 0, 0.04)) !important;
  overflow: hidden;
}

/* ---------- 上部 ---------- */
.footer-top {
  display: flex;
  gap: 48px;
  padding: 36px 36px 28px;
}

.footer-brand {
  flex: 0 0 320px;
  min-width: 0;
}

/* Logo */
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  text-decoration: none;
  margin-bottom: 16px;
}

.footer-logo img {
  height: 34px !important;
  width: 34px !important;
  max-width: 34px !important;
  border-radius: 9px;
  object-fit: cover;
  flex: 0 0 34px;
  display: block;
}

.footer-logo::after {
  content: "MacNb";
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ap-text, #1d1d1f);
  line-height: 1;
}

/* 标语胶囊 */
.footer-slogan {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.footer-slogan span {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 980px;
  letter-spacing: 0;
  line-height: 1.5;
}

.slogan-free  { color: #30a14e; background: rgba(48, 161, 78, 0.1); }
.slogan-noad  { color: #0071e3; background: rgba(0, 113, 227, 0.1); }
.slogan-nolog { color: #bf5af2; background: rgba(191, 90, 242, 0.1); }
.slogan-daily { color: #ff9f0a; background: rgba(255, 159, 10, 0.12); }

/* 描述 */
.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ap-text-3, #86868b);
  margin: 0;
}

/* ---------- 链接列 ---------- */
.footer-cols {
  flex: 1 1 auto;
  display: flex;
  gap: 40px;
  min-width: 0;
}

.footer-col {
  flex: 1 1 0;
  min-width: 0;
}

.footer-col-qr {
  flex: 0 0 auto;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ap-text-3, #86868b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  line-height: 1.4;
}

.footer-col-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col-list li {
  margin-bottom: 9px;
}

.footer-col-list a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ap-text-2, #6e6e73) !important;
  text-decoration: none;
  transition: color 0.16s ease;
  display: inline-block;
  line-height: 1.4;
}

.footer-col-list a:hover {
  color: var(--ap-accent, #0071e3) !important;
}

/* 二维码 */
.footer-mini-img {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.footer-mini-img .bg-l {
  background: var(--ap-bg, #f5f5f7) !important;
  border: 1px solid var(--ap-line, rgba(0, 0, 0, 0.08)) !important;
  border-radius: 12px !important;
  padding: 6px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-mini-img img {
  width: 92px !important;
  height: 92px !important;
  object-fit: contain;
  border-radius: 7px;
  display: block;
}

/* ---------- 底部 ---------- */
.footer-bottom {
  border-top: 1px solid var(--ap-line, rgba(0, 0, 0, 0.08));
  padding: 16px 36px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.footer-copyright {
  font-size: 12px !important;
  color: var(--ap-text-3, #86868b) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  line-height: 1.6;
}

.footer-meta {
  font-size: 11.5px;
  color: var(--ap-text-3, #86868b);
  margin: 0;
  line-height: 1.6;
}

/* ==========================================================================
   移动端
   ========================================================================== */
@media (max-width: 991.98px) {
  .main-footer {
    padding: 8px 8px 16px !important;
  }

  .main-footer .footer {
    border-radius: 14px !important;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
    padding: 24px 20px 20px;
  }

  .footer-brand {
    flex: 1 1 auto;
    width: 100%;
  }

  .footer-logo {
    height: 28px;
    margin-bottom: 12px;
  }

  .footer-logo img {
    height: 28px !important;
    width: 28px !important;
    max-width: 28px !important;
    flex: 0 0 28px !important;
    border-radius: 7px;
  }

  .footer-logo::after {
    font-size: 17px;
  }

  .footer-slogan {
    gap: 6px;
    margin-bottom: 12px;
  }

  .footer-slogan span {
    font-size: 11px;
    padding: 3px 9px;
  }

  .footer-desc {
    font-size: 12.5px;
    line-height: 1.65;
  }

  /* 链接列：两列网格 */
  .footer-cols {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
  }

  .footer-col-qr {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 4px;
  }

  .footer-col-title {
    font-size: 11px;
    margin-bottom: 10px;
  }

  .footer-col-list a {
    font-size: 13px;
  }

  .footer-col-list li {
    margin-bottom: 8px;
  }

  .footer-mini-img img {
    width: 80px !important;
    height: 80px !important;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 20px 18px;
  }

  .footer-copyright,
  .footer-meta {
    font-size: 11px !important;
    text-align: left !important;
  }
}

/* 深色微调 */
[data-theme="dark"] .footer-mini-img .bg-l {
  background: var(--ap-fill, rgba(255, 255, 255, 0.06)) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-mini-img .bg-l {
    background: var(--ap-fill, rgba(255, 255, 255, 0.06)) !important;
  }
}
