/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}
body {
  background-color: #f0f0f0 !important;
  color: #000000 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding-top: 0;
}

/* 顶部导航栏 */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  background-color: #afd4ff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #fff;
}
.logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.site-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  margin: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000;
}

/* 菜单按钮 */
.menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
  z-index: 101;
}
.menu-line {
  width: 24px;
  height: 2px;
  background-color: #000000;
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.menu-btn.active .menu-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}
.menu-btn.active .menu-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 侧边栏 */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 135px;
  height: 160vh;
  background-color: #ffffff;
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding-top: 50px;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15);
  border-radius: 25px 25px 0px 25px;
  will-change: transform;
  backface-visibility: hidden;
}
.sidebar.show {
  transform: translateX(0);
}
.sidebar-list {
  /* 原有导航列表样式 */
}
.sidebar-list.hidden {
  display: none;
}
.sidebar-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-link {
  display: block;
  color: #080808;
  padding: 15px 20px;
  font-size: 16px;
  transition: all 0.2s;
  position: relative;
}
.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: #ffffff;
  transform: scaleY(0);
  transition: transform 0.2s;
}
.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  padding-left: 25px;
}
.sidebar-link:hover::before {
  transform: scaleY(1);
}

/* 返回按钮样式 */
.back-btn .sidebar-link {
  background-color: #6bc4ff;
  color: white;
}
.back-btn .sidebar-link:hover {
  background-color: #005eaa;
}

/* 遮罩层 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  backdrop-filter: blur(2px);
}
.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* 主内容区 */
.main-content {
  margin-top: 56px;
  padding: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  min-height: calc(100vh - 56px);
  width: 100%;
}
@media (max-width: 767px) {
  .main-content {
    background-image: url("images/main-bg-vertical.png");
    background-size: cover;
  }
}
@media (min-width: 768px) {
  .main-content {
    background-image: url("images/main-bg-horizontal.png");
    background-size: cover;
  }
}

/* 新界面样式 */
.new-page {
  width: 100%;
  padding: 20px;
  min-height: calc(100vh - 56px);
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  color: #000;
}
@media (max-width: 767px) {
  .new-page {
    background-image: url("images/main-bg-vertical.png");
    background-size: cover;
  }
}
@media (min-width: 768px) {
  .new-page {
    background-image: url("images/main-bg-horizontal.png");
    background-size: cover;
  }
}

/* 修改1：去除新界面左上角大标题 */
.new-page h2 {
  display: none;
}

/* 新界面板块布局 */
.big-section {
  margin-bottom: 30px;
  padding: 15px;
  background-color: transparent !important;
  border-radius: 8px;
}
.big-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #fff; /* 修改3：板块标题白色 */
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
  text-align: center;
}

/* 长方形板块容器 */
.rect-container {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
}
@media (max-width: 767px) {
  .rect-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) {
  .rect-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 长方形板块样式 */
.rect-item {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 12px 10px;
  text-align: center;
  font-size: 14px;
  color: #000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
}
@media (min-width: 768px) {
  .rect-item {
    height: 60px;
  }
}
.rect-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 板块容器 */
.section {
  min-height: calc(100vh - 76px);
  padding: 25px 15px;
  margin-bottom: 0;
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  position: relative;
  transition: all 0.5s ease;
}

/* 板块标题 */
.section-title {
  font-size: 20px;
  margin-bottom: 30px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #333;
}
.section-title::before {
  content: '';
  width: 8px;
  height: 24px;
  background-color: #00eeff;
  border-radius: 4px;
}
.slide-up {
  transform: translateY(20px);
  opacity: 0;
}

/* 公告弹窗 */
.announcement-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s;
}
.announcement-overlay.show {
  opacity: 1;
  visibility: visible;
}
.announcement-box {
  width: 90%;
  max-width: 400px;
  background-color: #fff;
  border-radius: 16px;
  padding: 20px;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.announcement-overlay.show .announcement-box {
  transform: scale(1);
  opacity: 1;
}
.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}
.announcement-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}
.countdown-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: #000;
}
.announcement-content {
  margin-bottom: 30px;
  line-height: 1.8;
  color: #666;
}
.close-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #005eaa;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.5;
  transition: all 0.2s;
}
.close-btn.active {
  cursor: pointer;
  opacity: 1;
  background-color: #6bc4ff;
}

/* 板块网格布局 */
.container {
  display: grid;
  gap: 0px;
  padding: 20px;
  width: 100%;
  justify-items: center;
}
@media (max-width: 767px) {
  .container {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 768px) {
  .container {
    grid-template-columns: repeat(6, 1fr);
  }
}
.square-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 120px;
  cursor: pointer;
}
.square {
  width: 80px;
  height: 80px;
  background-color: #82c0ff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
.square:hover {
  transform: translateY(-5px);
}
.square-text {
  color: #000000;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}
.square-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
@media (min-width: 1024px) {
  .square-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

/* 板块点击弹窗样式 */
.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  z-index: 300;
  width: 90%;
  max-width: 400px;
}
.popup h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: #333;
}
.popup p {
  margin-bottom: 20px;
  font-size: 15px;
  color: #666;
  line-height: 1.7;
}
.popup .close-btn {
  display: inline-block;
  width: 120px;
  padding: 10px;
  background-color: #005eaa;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.popup .close-btn:hover {
  background-color: #6bc4ff;
}

/* 新增修改样式 */
/* 修改1：返回按钮行为 */
.sidebar-item.back-btn a {
  pointer-events: none;
}
