/* ========================================
   O助手（小O爱工作）用户协议 & 隐私政策 - 公共样式
   适配 App WebView / H5 移动端环境
   ======================================== */

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 0.875rem;
  line-height: 1.75;
  color: #333333;
  background-color: #f5f6f8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Container ---- */
.legal-container {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 1rem 5rem;
}

/* ---- Header ---- */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(135deg, #4f6ef7 0%, #6c8cff 100%);
  color: #ffffff;
  text-align: center;
  padding: 1.5rem 1rem 1.25rem;
  margin: 0 -1rem;
  border-radius: 0 0 1.25rem 1.25rem;
  box-shadow: 0 2px 12px rgba(79, 110, 247, 0.3);
}

.legal-header .icon {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.625rem;
  margin-bottom: 0.5rem;
  line-height: 2.5rem;
  font-size: 1.25rem;
}

.legal-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.legal-header .meta {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.375rem;
}

/* ---- Content Card ---- */
.legal-content {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 1.25rem 1rem;
  margin-top: 1rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

/* ---- Sections ---- */
.legal-content h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 1.5rem 0 0.625rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid #eef0f5;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #333;
  margin: 1rem 0 0.5rem;
}

.legal-content p {
  margin: 0.5rem 0;
  text-align: justify;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.legal-content li {
  margin: 0.25rem 0;
}

.legal-content strong {
  color: #1a1a2e;
}

/* ---- Highlight Box ---- */
.legal-highlight {
  background: #f0f4ff;
  border-left: 3px solid #4f6ef7;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.75rem 0.875rem;
  margin: 0.75rem 0;
  font-size: 0.8125rem;
  color: #3a4fb0;
}

/* ---- Bottom Navigation ---- */
.legal-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 750px;
  width: 100%;
  display: flex;
  background: #ffffff;
  border-top: 1px solid #e8ebf0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
  z-index: 20;
}

.legal-nav a,
.legal-nav span {
  flex: 1;
  text-align: center;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.legal-nav a.active,
.legal-nav span.active {
  color: #4f6ef7;
  font-weight: 600;
  position: relative;
}

.legal-nav a.active::after,
.legal-nav span.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2rem;
  height: 2px;
  background: #4f6ef7;
  border-radius: 0 0 2px 2px;
}

.legal-nav a:hover {
  color: #4f6ef7;
}

/* ---- Footer ---- */
.legal-footer {
  text-align: center;
  color: #999;
  font-size: 0.75rem;
  padding: 1rem 0;
  margin-top: 1rem;
}

/* ---- Scrollbar (WebView) ---- */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ---- Utility ---- */
.text-muted {
  color: #999;
  font-size: 0.75rem;
}

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
