/* header.css 头部和公告栏样式，主站风格统一 */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0058af;
  color: #fff;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
  height: 64px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: auto;
}

.logo-img {
  width: 40px;
  height: 40px;
  background: #ffeb3b;
  color: #0158af;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  /* border: 2px solid #fbc02d; */
  font-weight: bold;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: 1px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  position: static;
  flex-direction: row;
  box-shadow: none;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.main-nav a,
.main-nav .dropdown-toggle {
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.2s;
  font-size: 1rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  border-bottom: none;
}

.main-nav a:hover,
.main-nav .dropdown-toggle:hover {
  background: #1565c0;
  color: #fff;
}

.telegram-link {
  color: #fff;
  background: #229ED9;
  border-radius: 4px;
  padding: 8px 12px;
  margin-left: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
  display: inline-block;
}

.telegram-link:hover {
  background: #1976d2;
  color: #fff;
}

.cooperation-link {
  background-color: #229ED9 !important;
}

.cooperation-link:hover {}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  color: #222;
  min-width: 140px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  top: 36px;
  left: 0;
  z-index: 10;
  flex-direction: column;
  padding: 6px 0;
  width: max-content;
}

.dropdown-content a {
  color: #1976d2;
  padding: 8px 20px;
  display: block;
  text-decoration: none;
  border-radius: 0;
  background: none;
  font-size: 1rem;
  border-bottom: none;
  text-align: left;
}

.dropdown-content a:hover {
  background: #e3f2fd;
  color: #6a11cb;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.fixed-notice {
  position: sticky;
  top: 64px;
  z-index: 99;
  background: #ffeb3b;
  color: #333;
  text-align: left;
  padding: 2px 0;
  font-size: 1rem;
  overflow: hidden;
  white-space: nowrap;
}

#notice-content {
  display: inline-block;
}

.nav-toggle {
  display: none;
  /* 默认隐藏，移动端显示 */
  background: none;
  border: none;
  outline: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  margin-left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.18s;
}

.nav-toggle:active,
.nav-toggle:focus {
  background: #1565c0;
}

@media (max-width: 800px) {
  .main-nav {
    display: none;
    position: absolute;
    right: 0;
    top: 64px;
    background: #1c5389;
    flex-direction: column;
    width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    /* border-radius: 8px; */
    padding: 8px 0;
    z-index: 200;
    width: 100%;
    text-align: center;
  }

  .main-nav.show {
    display: flex;
  }

  .main-nav a,
  .main-nav .dropdown-toggle {
    color: #fff;
    background: none;
    border: none;
    width: 100%;
    font-size: 1.08rem;
    padding: 12px 0px;
    border-radius: 0;
    font-weight: 500;
    border-bottom: 1px solid #0a437c;
    transition: background 0.18s, color 0.18s;
  }

  .main-nav a:last-child,
  .main-nav .dropdown-toggle:last-child {
    border-bottom: none;
  }

  .dropdown {
    width: 100%;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    background: #f8fafc;
    border-radius: 0;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    display: none;
    border-top: 1px solid #e0e0e0;
  }

  .dropdown-content a {
    color: #1976d2;
    padding: 12px 38px;
    background: none;
    border-radius: 0;
    font-size: 1.02rem;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.18s, color 0.18s;
  }

  .dropdown-content a:last-child {
    border-bottom: none;
  }

  .dropdown-content a:hover {
    background: #e3f2fd;
    color: #6a11cb;
  }

  .dropdown.open .dropdown-content {
    display: block;
  }

  .nav-toggle {
    display: block;
  }
}