/* 通用设置 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Noto Sans', 'Noto Sans SC', 'Noto Sans Thai',
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 默认不加下划线 */
a {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* 正文 main 内的链接悬停才加下划线 */
main a:hover {
  text-decoration: underline;
}

/* 顶部深色栏 */
.top-bar {
  background: #6A0DAD;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar img {
  height: 40px;
}

.top-bar-links a {
  color: #fff;
  margin-left: 1.5rem;
  font-size: 0.95rem;
}

/* 第二导航栏 */
.nav-bar {
  background: #2A2A2A;
  padding: 0.8rem 2rem;
  display: flex;
  gap: 1.5rem;
  font-weight: bold;
  font-size: 0.9rem;
}

.nav-bar a {
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  display: inline-block;
}

.nav-bar a.active {
  background: #ffffff33;
}

/* 顶部导航和菜单链接不加 */
.nav-bar a:hover,
.top-bar-links a:hover {
  text-decoration: none;
}

/* 页面主区域 */
main {
  padding: 2rem;
  max-width: 900px;
  margin: auto;
  min-height: 60vh;
}

/* 语言切换按钮区域 */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #ddd;
}

.tabs button {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.tabs button.active {
  border-color: #9932CC;
  color: #9932CC;
}

/* 语言内容块 */
.lang-content {
  display: none;
}

.lang-content.active {
  display: block;
}

/* 返回顶部按钮 */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #9932CC;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
}