/* ============================================================
   LinkNest 基础样式（v1.1）
   - 布局自适应：手机 / 平板 / 电脑 / 超宽屏
   - 内容居中显示（容器水平居中 + 头部文字居中）
   - 多浏览器兼容（-webkit-/-ms- 前缀 + 布局回退）
   模板样式（templates/*.css）在其后加载并覆盖配色
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  background: #f0f7f3;
  color: #233;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 整体布局：居中 ---------- */
.ln-page { min-height: 100vh; }

.ln-header {
  text-align: center;              /* 头部居中 */
  padding: 46px 16px 6px;
}

.ln-brand {
  font-size: 44px;
  font-weight: 800;
  color: #0f9d58;
  margin: 0;
  letter-spacing: 1px;
  word-break: break-word;
}

.ln-flag {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 14px;
  font-size: 14px;
  color: #0f9d58;
  background: #e2f5ea;
  border: 1px solid #b8e3cc;
  border-radius: 999px;
}

/* 主容器：限宽 + 水平居中（电脑大屏居中显示的核心） */
.ln-wrap {
  max-width: 860px;
  margin: 18px auto 40px;
  padding: 0 16px;
}

/* ---------- 链接列表 ---------- */
.ln-links { list-style: none; margin: 0; padding: 0; }
.link-item { margin-bottom: 12px; }

.link-main {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;          /* 图标 + 文字整体水平居中 */
  text-decoration: none;
  background: #fff;
  border: 1px solid #cdebd8;
  border-radius: 12px;
  padding: 14px 18px;
  -webkit-box-shadow: 0 1px 3px rgba(15, 157, 88, 0.08);
  box-shadow: 0 1px 3px rgba(15, 157, 88, 0.08);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  min-height: 52px;               /* 手机触控友好 */
}
.link-main:hover { border-color: #0f9d58; }
.link-main:active { opacity: 0.85; }

.link-item-1 .link-main { background: #fbfffd; }
.link-item-2 .link-main { background: #f8fdfa; }
.link-item-3 .link-main { background: #fbfffd; }
.link-item-4 .link-main { background: #f8fdfa; }
.link-item-5 .link-main { background: #fbfffd; }
.link-item-6 .link-main { background: #f8fdfa; }

.link-ic {
  display: inline-block;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}
.ln-ic { width: 24px; height: 24px; color: #0f9d58; display: block; }

.link-text {
  -webkit-box-flex: 0;
  -ms-flex: 0 1 auto;
  flex: 0 1 auto;
  margin: 0 12px;
  font-size: 17px;
  color: #233;
  font-weight: 500;
  text-align: center;              /* 文字居中 */
  word-break: break-word;
}

/* ---------- 欢迎语 / 板块 ---------- */
.ln-welcome { text-align: center; margin: 22px auto 6px; color: #556; font-size: 15px; }

.ln-sec {
  margin-top: 28px;
  background: #fff;
  border: 1px solid #e3efe8;
  border-radius: 12px;
  padding: 18px 20px;
}
.ln-sec-title {
  margin: 0 0 10px;
  font-size: 16px;
  color: #0f9d58;
  border-left: 3px solid #0f9d58;
  padding-left: 10px;
}
.ln-sec-body { margin: 0; }
.ln-mail { color: #0f9d58; font-weight: 600; text-decoration: none; font-size: 16px; }
.ln-mail:hover { text-decoration: underline; }
.ln-mail-tip { color: #89959c; font-size: 13px; margin-left: 8px; }

.ln-guide { list-style: none; margin: 0; padding: 0; color: #445; font-size: 14px; }
.ln-guide li { padding: 5px 0; }
.ln-guide-br {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
.ln-g-ic {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  color: #0f9d58;
}
.ln-g-ic svg { width: 20px; height: 20px; display: block; }

.ln-footer { text-align: center; color: #9aa6a0; font-size: 12px; margin: 30px 0 20px; }

/* 访问密码输入页 */
.ln-access {
  max-width: 420px;
  margin: 10vh auto 0;
  padding: 30px 24px 26px;
  background: #fff;
  border: 1px solid #cdebd8;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(15, 157, 88, 0.08);
}
.ln-access .ln-brand { margin-bottom: 14px; }
.ln-access-tip { color: #556; font-size: 14px; line-height: 1.7; margin: 0 0 4px; }
.ln-access form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.ln-access input[type="password"] {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #bcd9c7;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
}
.ln-access input[type="password"]:focus { border-color: #0f9d58; }
.ln-access button {
  padding: 11px 22px;
  border: 0;
  border-radius: 8px;
  background: #0f9d58;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}
.ln-access button:hover { background: #0c8449; }
.ln-access-err { color: #d64541; font-size: 13px; min-height: 20px; margin: 12px 0 0; }
.ln-access-exit { margin: 10px 0 0; font-size: 12px; }
.ln-access-exit a { color: #9aa6a0; text-decoration: none; }
.ln-access-exit a:hover { color: #0f9d58; }
@media screen and (max-width: 600px) {
  .ln-access { margin-top: 6vh; padding: 24px 16px 20px; }
  .ln-access form { flex-direction: column; }
  .ln-access button { width: 100%; }
}

/* ============================================================
   自适应断点
   ============================================================ */

/* 平板及以下（≤900px）：容器全宽贴合屏幕，仍保持居中 */
@media screen and (max-width: 900px) {
  .ln-wrap { max-width: 100%; padding: 0 14px; }
  .ln-brand { font-size: 38px; }
  .ln-header { padding-top: 38px; }
}

/* 手机（≤600px）：紧凑排版，触控友好 */
@media screen and (max-width: 600px) {
  .ln-header { padding: 30px 12px 2px; }
  .ln-brand { font-size: 30px; }
  .ln-flag { font-size: 12px; padding: 2px 10px; margin-top: 8px; }
  .ln-wrap { margin-top: 12px; padding: 0 12px; }
  .link-item { margin-bottom: 10px; }
  .link-main { padding: 12px 12px; border-radius: 10px; min-height: 48px; }
  .link-text { font-size: 15px; margin: 0 8px; }
  .ln-ic { width: 20px; height: 20px; }
  .ln-sec { margin-top: 20px; padding: 14px; }
  .ln-mail-tip { display: block; margin: 2px 0 0; }
  .ln-welcome { font-size: 14px; }
}

/* 超窄屏（≤380px） */
@media screen and (max-width: 380px) {
  .ln-brand { font-size: 26px; }
}

/* 超宽屏（≥1400px）：适度加宽容器，仍居中 */
@media screen and (min-width: 1400px) {
  .ln-wrap { max-width: 920px; }
}

/* 横屏大屏电视等（≥2000px） */
@media screen and (min-width: 2000px) {
  .ln-wrap { max-width: 1080px; }
}
