/* 解决Vue插值闪烁 */
[v-cloak] {
  display: none;
}

input {
  outline: none;
  border: none;
}

/* ========== 顶部导航栏样式 核心修改【渐变蓝白+深色悬浮 视觉拉满】 ========== */
.nav-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 15px;
}

.header-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
  box-shadow: 0 2px 8px rgba(22, 93, 255, 0.08);
  transition: all 0.3s ease;
  padding: 12px 0;
}

.header-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.header-wrap>a,
.header-wrap>.mobile-menu-btn {
  flex-shrink: 0;
}

.news-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #165DFF;
  font-weight: 700;
  flex: 0 0 auto;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #165DFF;
  cursor: pointer;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(22, 93, 255, 0.1);
  z-index: 99;
  transition: all 0.2s ease;
  margin-left: 10px;
}

.mobile-menu-btn:hover {
  background: #165DFF;
  color: #fff;
}

@media (min-width:950px) {
  .mobile-menu-btn {
    display: none;
  }
}

.search-pc-box {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 500px;
  margin: 0 24px;
}

/* PC端搜索框 */
.search-pc {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border-radius: 9999px;
  padding: 8px 16px;
  flex: 1;
  max-width: 400px;
  margin: 0 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.search-icon {
  margin-right: 8px;
  color: #165DFF;
}

.search-input {
  background-color: transparent;
  width: 100%;
  font-size: 0.85rem;
  padding: 4px 0;
  color: #333;
}

/* 主导航+9栏目+二级菜单【核心最终版：PC端导航区域整体加深配色，移动端不变】 */
.main-nav {
  display: none;
  align-items: center;
  z-index: 9;
  width: 100%;
  order: 4;
  margin: 10px 0 0 0;
}

.main-nav.show {
  display: flex;
}

.main-nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1px;
  list-style: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

.nav-item {
  position: relative;
  padding: 6px 8px;
  cursor: pointer;
  flex: 0 0 calc(33.33% - 5px);
  box-sizing: border-box;
  text-align: center;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.nav-item:hover {
  background: rgba(22, 93, 255, 0.06);
}

.nav-link {
  color: #222d3d;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 0;
  display: block;
  transition: color 0.2s ease;
  line-height: 1.2;
}

.nav-link:hover {
  color: #165DFF;
}

/* 二级下拉菜单样式 */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  width: 100%;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(22, 93, 255, 0.12);
  border: 1px solid #eaf0ff;
  list-style: none;
  padding: 8px 0;
  display: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.2s ease-in-out;
  z-index: 999;
}

.submenu li a {
  display: block;
  padding: 8px 16px;
  color: #333;
  font-size: 1rem;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.submenu li a:hover {
  color: #165DFF;
  background-color: #f0f5ff;
  padding-left: 20px;
}

/* 功能导航区：登录/头像 */
.func-nav {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  width: 100%;
  justify-content: center;
}

.func-nav.show {
  display: flex;
}

@media (min-width:950px) {
  .func-nav {
    display: flex;
    gap: 20px;
    margin-top: 0;
    width: auto;
    padding-top: 10px;
    display: none !important;
  }

  .main-nav {
    display: flex;
    /* width: auto; */
    width: 100%;
    order: unset;
    margin: 0;
    padding-top: 10px;
  }

  .main-nav-list {
    flex-wrap: nowrap;
    border-radius: 5px;
    background: rgba(22, 93, 255, 0.8);
  }

  .nav-item {
    flex: unset;
    padding: 8px 15px;
    text-align: left;
  }

  .nav-item:hover {
    background: rgba(22, 93, 255, 1);
  }

  .nav-link {
    font-size: 1.05rem;
    /* color: #112238; */
    color: #fff;
    font-weight: 600;
  }

  .nav-link:hover {
    color: #999;
  }

  .submenu {
    min-width: 180px;
    width: auto;
    border: 1px solid #dde5ff;
    box-shadow: 0 6px 20px rgba(22, 93, 255, 0.18);
  }

  .submenu li a:hover {
    background-color: #e6eeff;
  }
}

/* ========== 【核心修改】移动端适配 949px以下 ========== */
@media (max-width:949px) {
  .search-pc-box {
    display: none !important;
  }

  .search-pc {
    display: none;
  }

  .news-logo {
    /* width: 320px; */
    flex: 1;
    max-width: 400px;
  }

  .search-mobile {
    display: flex !important;
    background-color: #ffffff;
    border-radius: 9999px;
    padding: 8px 16px;
    margin: 8px 0 0 0 !important;
    width: 100%;
    order: 3;
    flex-wrap: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  .search-mobile .search-icon {
    color: #165DFF;
  }

  /* 移动端导航全部展开核心样式 - 一级+二级全部显示 */
  .main-nav.show {
    max-height: 60vh;
    /* 限制最大高度，防止占满屏幕 */
    overflow-y: auto;
    /* 超出高度自动滚动，上下滑动查看 */
    overflow-x: hidden;
    /* padding: 10px 0; */
  }

  .main-nav-list .nav-item {
    flex: 0 0 100% !important;
    /* 移动端一级栏目独占一行，排版清晰 */
    text-align: left;
    /* margin-bottom: 5px; */
    /* padding: 10px 15px; */
  }

  /* 移动端：所有二级子菜单默认强制显示，永不隐藏 */
  .main-nav-list .nav-item .submenu {
    position: static !important;
    /* 取消绝对定位，变成普通流，跟随父级 */
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    box-shadow: none;
    border: none;
    background: #f8fbff;
    margin-top: 5px;
    padding: 5px 0;
    width: 100%;
  }

  .main-nav-list .nav-item .submenu li {
    padding: 0;
  }

  .main-nav-list .nav-item .submenu li a {
    font-size: 0.85rem;
    padding: 6px 15px 6px 25px;
  }
}

/* 登录按钮+头像样式 */
.login-btn {
  background-color: #165DFF;
  color: #fff;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(22, 93, 255, 0.25);
}

.login-btn:hover {
  opacity: 0.95;
  transform: scale(1.03);
  background: #0e4bdb;
}

.moretximg {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

@media (min-width:950px) {
  .search-pc {
    display: flex;
  }

  .search-mobile {
    display: none;
  }
}

/* 导航吸顶样式 */
.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #f0f5ff 0%, #e6eeff 100%);
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.15);
  z-index: 50;
  padding: 8px 0;
}

/* PC端专用登录按钮容器样式控制 - 仅大屏显示，小屏隐藏 */
.func-nav-pc {
  display: none;
}

@media (min-width:950px) {
  .func-nav-pc {
    display: flex;
    align-items: center;
    gap: 12px;
  }
}

@media (max-width:949px) {
  .func-nav-pc {
    display: none !important;
  }
}

/* ========== 底部信息样式 无修改 ========== */
.footer-box {
  background-color: #1F2937;
  color: #fff;
  padding: 24px 0;
  margin-top: 48px;
  line-height: 1.6;
}

.footer-copyright {
  text-align: center;
  color: #c9cacc;
  font-size: 0.78rem;
  padding: 0;
  margin: 0 auto;
  border: none;
}

.footer-beian {
  text-align: center;
  color: #c9cacc;
  font-size: 0.78rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.beian-logo {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.footer-link,
.beian-link {
  color: #c9cacc;
  text-decoration: none;
  transition: all 0.25s ease;
}

.footer-link:hover,
.beian-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ========== 登录注册模态窗样式 无修改 ========== */
.modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  margin: 0 15px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #E5E7EB;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  color: #9CA3AF;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #1F2937;
}

.modal-form {
  padding: 24px;
}

.form-item {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 8px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 0.85rem;
}

.form-input:focus {
  border-color: #165DFF;
}

.form-submit {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  transition: all 0.3s ease;
  margin-top: 8px;
  border: none;
  cursor: pointer;
}

.login-submit {
  background-color: #165DFF;
}

.register-submit {
  background-color: #FF7D00;
}

.form-submit:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

.form-switch {
  text-align: center;
  font-size: 0.85rem;
  color: #6B7280;
  margin-top: 16px;
}

.switch-link {
  color: #165DFF;
  transition: text-decoration 0.3s ease;
}

.switch-link:hover {
  text-decoration: underline;
}

.register-form {
  display: none;
}

/* 图片放大CSS 无修改 */
.maximg-box {
  background-color: rgba(0, 0, 0, 0.8);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.maximg-colse {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 30px;
  height: 30px;
  z-index: 99999;
  color: #fff;
  cursor: pointer;
}

.maximg-content {
  width: 90%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.maximg-btn {
  width: 30px;
  height: 30px;
  cursor: pointer;
  position: relative;
  z-index: 99999;
  color: #fff;
}

.maximg-img {
  width: 80%;
  height: auto;
  max-height: 90vh;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}