/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #fff;
}

a {
  text-decoration: none;
  color: #ff4d4a;
}

/* 头部样式 */
.x-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  height: 2rem;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h-back {
  position: absolute;
  left: 0;
  width: 2rem;
  height: 100%;
  background: url(../back.png) no-repeat center center;
  background-size: 0.3rem 0.5rem;
  cursor: pointer;
}

.h-title {
  font-size: 10pt;
  color: #333;
  font-weight: 500;
  margin: 0;
}

/* 协议内容区域 */
.protocol {
  padding: 2.5rem 1.05rem 1rem 1.05rem;
  line-height: 1.8;
  overflow: hidden;
  word-wrap: break-word;
  word-break: normal;
  font-size: 10pt;
}

.protocol h1 {
  font-size: 14pt;
  text-align: center;
  margin-bottom: 1rem;
}

.protocol h2 {
  font-size: 12pt;
  margin: 1rem 0 0.5rem 0;
}

.protocol p {
  font-size: 10pt;
  margin-block-start: 0;
  margin-bottom: 0.5rem;
  text-align: justify;
  text-justify: inter-ideograph;
  text-indent: 2em;
}

.protocol a {
  font-style: normal;
  color: #ff4d4a;
  text-decoration: underline;
  cursor: pointer;
}

/* 加载状态 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-size: 10pt;
  color: #999;
}

/* Android SDK 6.1.0+ 和 iOS SDK 6.2.0+ 背景色 */
.sdk-bg {
  background: #f9f9f9;
}

/* 隐藏头部时的样式调整 */
.hide-header .x-header {
  display: none;
}

.hide-header .protocol {
  padding-top: 1rem;
}

.hide-header p {
  margin-block-start: 0;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 2rem;
  width: 2rem;
  height: 2rem;
  background: rgba(255, 77, 74, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 998;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: rgba(255, 77, 74, 1);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top:active {
  transform: translateY(-1px);
}

.back-to-top::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 0.4rem solid transparent;
  border-right: 0.4rem solid transparent;
  border-bottom: 0.6rem solid #fff;
}
