@charset "utf-8";
/* lentsa 导航首页样式
   颜色一律取自 css/theme.css 的变量，与管理后台 admin.php 保持同一套主题。
   改动配色只需改 theme.css，或改 <html data-theme="dark|light">。 */

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

*,
*::before,
*::after {
  padding: 0;
  margin: 0;
}

* {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
  transition: var(--transition);
}

/* 注意：不要再给 body 写死 background / font-family。
   之前从 404 模板带进来过一条 body{background:#f8fafc}，它盖掉了上面的 var(--bg-primary)，
   导致暗色模式下白底白字、亮色模式也被钉死，主题切换失效。背景与字体一律走 theme.css 变量。 */

html {
  font-family: 'Noto Sans SC Sliced', PingFangSC-Light, Microsoft YaHei UI, Microsoft YaHei, helvetica, sans-serif;
  font-weight: 500;
  color: var(--text-primary);
}

form,
input,
button {
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  background: none;
}

input::-webkit-input-placeholder {
  color: var(--text-muted);
  letter-spacing: 2px;
  font-size: 16px;
}

ul,
li {
  display: block;
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-primary);
}

/* 图标 */
svg.icon {
  width: 14px;
  height: 14px;
  flex: none;
  fill: currentColor;
  overflow: hidden;
}

/* 图片型图标（后台上传的 icon/xxx.svg 等）
   图标本身可能是纯白或纯黑，按主题加一层对比描边，保证亮/暗下都有轮廓 */
img.ico {
  width: 14px;
  height: 14px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 0 1px var(--icon-ring));
}

/* Font Awesome / Iconify 图标 */
i.ico,
iconify-icon.ico {
  width: 14px;
  height: 14px;
  flex: none;
  font-size: 14px;
  line-height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

/* 主区 */
#content {
  width: 100%;
  height: 100%;
}

/* 保持原布局：绝对定位 + top:-100px，整体比垂直居中再上移 50px */
.con {
  width: 100%;
  height: 380px;
  min-width: 320px;
  position: absolute;
  left: 0;
  top: -100px;
  right: 0;
  bottom: 0;
  margin: auto;
}

/* 图片由 index.php 以内联 background-image 注入，或直接放内联 <svg>：两种都水平居中 */
.con .shlogo {
  width: 480px;
  max-width: 100%;
  height: 120px;
  margin: 20px auto;
  background: no-repeat center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.con .shlogo svg { max-width: 100%; }

/* ===== Logo（内联 SVG）与 hover 涟漪动画 ===== */
:root {
  --ink: #2196F3;           /* 图标环颜色 */
}

.logo {
  overflow: visible;        /* 缩放溢出不被裁剪 */
  cursor: pointer;
  color: var(--ink);
}

/* 每组围绕自身包围盒中心缩放（对应原站 transform-box:fill-box + 50% 50% 原点） */
.logo .ring {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

/* hover 时中心组先放大 1.15×，内环、外环依次延迟跟上 1.1×，透明度同步压到 .75 再恢复
   一组 0.5s easeInOut，级联延迟 0 / .15s / .3s；.is-hover 供脚本手动触发 */
.logo:hover .ring-center,
.logo.is-hover .ring-center { animation: pulse-strong .5s ease-in-out; }
.logo:hover .ring-inner,
.logo.is-hover .ring-inner  { animation: pulse .5s ease-in-out .15s; }
.logo:hover .ring-outer,
.logo.is-hover .ring-outer  { animation: pulse .5s ease-in-out .3s; }

@keyframes pulse-strong {
  0%   { transform: scale(1);    opacity: 1; }
  50%  { transform: scale(1.15); opacity: .75; }
  100% { transform: scale(1);    opacity: 1; }
}

@keyframes pulse {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(1.1); opacity: .75; }
  100% { transform: scale(1);   opacity: 1; }
}

.con .sou {
  position: relative;
  width: calc(100% - 60px);
  max-width: 680px;
  margin: 0 auto;
}

.con .sou form {
  position: relative;
  width: 100%;
  height: 50px;
  margin: 10px auto 30px;
}

.con .sou form .wd {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  padding: 0 46px;
  font-size: 18px;
  color: var(--text-primary);
  background: var(--field-bg);
  transition: 0.3s all;
}

.con .sou form .wd:focus {
  background: var(--field-bg-focus);
  border-color: var(--border-color);
  box-shadow: 0 0 15px 0 var(--nav-shadow);
}

/* 搜索引擎切换图标（百度 / Google）
   底色固定为白色，不随主题变化：baidu.svg 是深蓝透明底、g.svg 自带白色元素，
   透明底在暗色搜索框里会糊掉、在亮色里也不够突出。白底 + 一圈极淡描边，两种主题下都清晰。 */
.con .sou form .lg {
  position: absolute;
  left: 13px;
  top: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  /* 用内边距把图标收进圆内：background-size:cover 会让图标铺满方形，
     而容器是圆形（border-radius:50%），方形四角会被裁掉、图标显示不全。
     padding + background-origin:content-box + contain = 完整显示且四周留白。
     box-sizing:border-box 已全局生效，所以 30px 外框尺寸不变。 */
  padding: 5px;
  background-origin: content-box;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-color: #fff;
  box-shadow: 0 0 0 1px var(--border-color);
  cursor: pointer;
}

.con .sou form button {
  position: absolute;
  right: 6px;
  top: 5px;
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 40px;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
}

.con .sou form button svg.icon {
  width: 21px;
  height: 21px;
  opacity: .5;
}

/* 搜索建议 */
.con .sou #word {
  display: none;
  position: absolute;
  left: 20px;
  width: calc(100% - 40px);
  top: 65px;
  z-index: 500;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 0;
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  line-height: 30px;
  font-size: 16px;
}

.con .sou #word li {
  display: flex;
  align-items: center;
  padding: 0 15px;
  color: var(--text-secondary);
  cursor: pointer;
}

.con .sou #word li:hover {
  color: var(--accent-color);
}

.foot {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 20px;
  line-height: 20px;
  font-size: 12px;
  text-align: center;
  color: var(--text-muted);
  z-index: 1000;
}

.foot a {
  color: var(--text-secondary);
}

/* 主题切换按钮 */
.theme-toggle {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  z-index: 2000000;
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* 当前暗色 → 显示太阳（点击变亮）；当前亮色 → 显示月亮（点击变暗） */
.theme-toggle .tt-sun { display: none; }
[data-theme="dark"] .theme-toggle .tt-sun { display: block; }
[data-theme="dark"] .theme-toggle .tt-moon { display: none; }

/* 菜单按钮 */
#menu {
  position: absolute;
  right: 10px;
  top: 5px;
  width: 50px;
  height: 50px;
  transform: scale(.8);
  z-index: 2000000;
  cursor: pointer;
  transition: .5s;
}

#menu i {
  position: absolute;
  left: 0;
  right: 0;
  margin: 24px auto;
  width: 30px;
  height: 2px;
  background: var(--text-secondary);
}

#menu i::before,
#menu i::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
}

#menu i::before {
  top: -8px;
  right: 0;
}

#menu i::after {
  bottom: -8px;
  left: 0;
}

#menu.on {
  right: 337px;
  background: var(--accent-2);
  border-radius: 25px;
  box-shadow: 0 6px 8px var(--nav-shadow);
}

#menu.on i {
  width: 20px;
  background: #fff;
}

#menu.on i::before,
#menu.on i::after {
  right: -1px;
  left: auto;
  width: 14px;
  background: #fff;
}

#menu.on i::before {
  top: -5px;
  transform: rotate(45deg);
}

#menu.on i::after {
  bottom: -5px;
  transform: rotate(-45deg);
}

/* 侧边导航：整列可滚动，全部条目完整显示 */
.list {
  position: absolute;
  right: 0;
  top: 0;
  width: 337px;
  height: 100%;
  padding: 10px 20px 40px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 2000;
  background: var(--nav-bg);
  transition: .3s all linear;
  -webkit-overflow-scrolling: touch;
}

.list.closed {
  right: -377px;
}

.list ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.list ul li {
  min-width: 0;
}

.list ul li a {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  height: 30px;
  padding: 0 4px;
  border-radius: 5px;
  color: var(--nav-text);
  font-size: 12px;
  white-space: nowrap;
  background: var(--nav-item-bg);
  transition: .2s all linear;
}

.list ul li:hover a {
  color: #fff;
  background-color: var(--accent-2);
  background-image: linear-gradient(135deg, var(--accent-2) 0%, var(--accent-3) 100%);
  box-shadow: 0 3px 3px var(--nav-shadow);
}

.list ul li.title {
  grid-column: 1 / -1;
  height: 40px;
  line-height: 40px;
  margin-top: 20px;
  padding-left: 4px;
  color: var(--nav-title);
  font-size: 18px;
  font-weight: bold;
}

.list ul li.title svg.icon {
  width: 20px;
  height: 20px;
  vertical-align: -3px;
  margin-right: 5px;
}

.list ul li.title img.ico {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  margin-right: 5px;
}

.list ul li.title i.ico,
.list ul li.title iconify-icon.ico {
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 18px;
  vertical-align: -3px;
  margin-right: 5px;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--nav-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--nav-item-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2);
}

::-webkit-scrollbar-corner {
  background: var(--nav-bg);
}

/* 移动端 */
@media (max-width: 640px) {
  .con {
    top: 0;
  }

  .con .shlogo {
    height: 100px;
  }

  .con .sou form .wd:focus {
    background: var(--field-bg);
    border-color: var(--border-color);
    box-shadow: none;
  }

  .con .sou #word {
    max-height: 150px;
  }

  #menu.on {
    right: 227px;
  }

  .list {
    width: 227px;
  }

  .list.closed {
    right: -267px;
  }

  .list ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-height: 420px) {
  .con {
    margin: 0;
    top: 0;
  }

  .con .shlogo,
  #menu,
  .foot {
    display: none;
  }
}

/* ===== 404 提示页样式 =====
   整体从 index.php 的内联 <style> 迁入，规则原样保留（首页当前用不到，留作 404 页复用）。 */

.logo-svg {
  display: block;
  margin: 0 0 1.5rem;
  opacity: .9;
  transition: opacity .3s ease;
}

.logo-svg:hover {
  opacity: 1;
}

.error-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  padding: 3.5rem 3rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .06);
}

/* 渐变光晕装饰 */
.error-container::before,
.error-container::after {
  content: '';
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.error-container::before {
  top: -9rem;
  right: -3rem;
  background: radial-gradient(circle, rgba(99, 102, 241, .13) 0%, transparent 65%);
}

.error-container::after {
  bottom: -9rem;
  left: -3rem;
  background: radial-gradient(circle, rgba(168, 85, 247, .11) 0%, transparent 65%);
}

.error-container > * {
  position: relative;
  z-index: 1;
}

/* 404 数字：Radiant 渐变（sky-300 → white → fuchsia-300） */
.error-code {
  font-size: 4rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, #7dd3fc 0%, #ffffff 20%, #f0abfc 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .75rem;
}

/* 表情图标 */
.frown-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: .35rem;
  width: 1.3em;
  height: 1.3em;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), filter .3s ease;
  cursor: default;
}

.error-code:hover .frown-icon {
  transform: scale(1.18) rotate(-8deg);
  filter: drop-shadow(0 2px 6px rgba(99, 102, 241, .35));
}

.error-message {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: .5rem;
}

.error-description {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.75;
  margin-top: 20px;
  margin-bottom: 3rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  padding-top: .25rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 0 2rem;
  height: 2.75rem;
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: .625rem;
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}

.btn-secondary:hover {
  border-color: rgba(0, 0, 0, .2);
  background: #f8fafc;
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: scale(.97);
}

.hint {
  margin-top: 40px;
  font-size: 14px;
  letter-spacing: .08em;
  color: rgba(3, 7, 18, .55);
}

.hint b {
  color: rgba(3, 7, 18, .85);
}

@media (max-width: 650px) {
  .error-code     { font-size: 5rem; }
  .error-message  { font-size: 1.35rem; }
  .error-container { padding: 2rem 1.5rem; }
  .cta-group      { flex-direction: column; }
  .btn-secondary  { width: 100%; justify-content: center; }
}
