/* 基础样式 */
:root {
  --primary-color: #0071e3;
  --text-color: #1d1d1f;
  --background-color: #ffffff;
  --section-background: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--text-color);
  background-color: var(--background-color);
}

/* 头部样式 */
header {
  background-color: var(--section-background);
  backdrop-filter: saturate(180%) blur(20px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
  height: 54px;
}

.logo {
  display: flex;
  align-items: center;
  height: 100%;
  padding-top: 10px;
}

.logo img {
  height: 30px;
  margin-right: 10px;
}

.logo a {
  font-size: 21px;
  font-weight: normal;
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
  padding-top: 0;
}

/* 主要内容样式 */
.update-date {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 2em;
    font-style: italic;
}

main {
  padding-top: 44px;
}

section {
  padding: 100px 0;
  text-align: center;
}

h1 {
  font-size: 56px;
  line-height: 1.07143;
  font-weight: 600;
  letter-spacing: -0.005em;
}

h2 {
  font-size: 48px;
  line-height: 1.08349;
  font-weight: 600;
  letter-spacing: -0.003em;
}

h3 {
  font-size: 28px;
  line-height: 1.14286;
  font-weight: 400;
  letter-spacing: .007em;
}

p {
  font-size: 17px;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
}

/* 英雄区域样式 */
#hero {
  text-align: center;
  padding: 120px 20px 40px;
  max-width: 800px;
  margin: 0 auto;
}

#hero .content {
  display: none;
}

#hero .content.visible,
#hero .content.active {
  display: block;
}

#hero h1 {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#hero p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 100%;
  color: var(--text-color);
  opacity: 0.8;
}

.download-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  margin-bottom: 30px;
}

.download-button {
  display: none;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.app-store-button.visible,
.app-store-button.active,
.google-play-button.visible,
.google-play-button.active {
  display: flex;
}

.app-store-button img,
.google-play-button img {
  height: 48px;
  width: auto;
}

.app-store-button:active,
.google-play-button:active {
  opacity: 0.7;
  transform: scale(0.98);
}

.android-buttons {
  display: contents;
}

/* 应用预览样式 */
#app-preview {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  margin-top: -50px;
}

.app-screenshots-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 20px;
  box-sizing: border-box;
}

.app-screenshots-container::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.app-screenshots {
  display: flex;
  padding: 80px 0;
  gap: 20px;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
}

.app-screenshots img {
  flex: 0 0 auto;
  width: calc((100% - 60px) / 4); /* 4张图片，3个间隔 */
  max-width: 240px;
  min-width: 180px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: opacity 0.3s ease;
}

.app-screenshots img[style*="display: none"] {
  opacity: 0;
  position: absolute;
}

.app-screenshots img:not([style*="display: none"]) {
  opacity: 1;
  position: relative;
}

/* 响应式设计 */
@media (max-width: 768px) {
  #hero, .error-page #error-404 {
    padding-top: 100px;
  }

  #hero h1, .error-page #error-404 h1 {
    font-size: 32px;
    white-space: normal;
  }

  #hero p, .error-page #error-404 p {
    font-size: 16px;
  }

  .app-screenshots {
    justify-content: flex-start;
  }

  .app-screenshots img {
    width: calc((100% - 40px) / 3); /* 3张图片，2个间隔 */
  }

  footer {
    padding: 20px 0;
  }

  footer p {
    font-size: 12px;
  }

  footer span.separator {
    margin: 0 5px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .app-screenshots {
    justify-content: center;
  }

  .app-screenshots img {
    width: calc((100% - 60px) / 4); /* 4张图片，3个间隔 */
  }
}

@media (min-width: 1025px) {
  .app-screenshots-container {
    overflow-x: visible;
  }

  .app-screenshots {
    flex-wrap: nowrap;
    justify-content: center;
  }

  .app-screenshots img {
    width: calc((100% - 60px) / 4); /* 4张图，3个间隔 */
  }
}

/* Footer 样式 */
footer {
  padding: 20px 0;
  text-align: left;
  font-size: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 50px;
}

footer .footer-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}

footer p {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  line-height: 1.4;
  font-size: inherit;
}

footer .separator {
  color: var(--text-color);
  opacity: 0.5;
  font-size: inherit;
}

footer a,
footer .footer-text {
  color: var(--text-color);
  opacity: 0.8;
  text-decoration: none;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  font-size: inherit;
}

footer a:hover {
  opacity: 0.6;
}

footer a:active {
  opacity: 0.4;
}

footer .footer-text {
  display: none;
  font-size: inherit;
}

footer .footer-text.visible,
footer .footer-text.active {
  display: inline;
}



/* 隐私政策和致谢页面通用样式 */
.privacy-policy-page #privacy-policy,
.acknowledgments-page #acknowledgments {
  max-width: 800px;
  margin: 0 auto;
  padding: 0px 20px 20px;
  text-align: left;
}

.privacy-policy-page h1,
.acknowledgments-page h1 {
  font-size: 28px;
  margin-bottom: 20px;
  text-align: left;
}

.privacy-policy-page h2,
.acknowledgments-page h2 {
  font-size: 22px;
  margin-top: 30px;
  margin-bottom: 15px;
}

.privacy-policy-page h3,
.acknowledgments-page h3 {
  font-size: 18px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.privacy-policy-page p:not(footer p),
.privacy-policy-page ul,
.acknowledgments-page p:not(footer p),
.acknowledgments-page ul,
.acknowledgments-page ol {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.privacy-policy-page ul,
.acknowledgments-page ul,
.acknowledgments-page ol {
  padding-left: 20px;
}

.privacy-policy-page a,
.acknowledgments-page a {
  color: var(--primary-color);
  text-decoration: none;
}

.privacy-policy-page a:hover,
.acknowledgments-page a:hover {
  text-decoration: none;
}

.privacy-policy-page main,
.acknowledgments-page main {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 20px;
}

#privacy-policy,
#acknowledgments {
  text-align: left;
}

#privacy-policy .content,
#acknowledgments .content {
  display: none;
}

#privacy-policy .content.visible,
#privacy-policy .content.active,
#acknowledgments .content.visible,
#acknowledgments .content.active {
  display: block;
}

#privacy-policy h1,
#acknowledgments h1 {
  font-size: 36px;
  margin-bottom: 30px;
  text-align: left;
}

#privacy-policy h2,
#acknowledgments h2 {
  font-size: 24px;
  margin: 30px 0 15px;
  color: var(--text-color);
}

#privacy-policy p,
#acknowledgments p {
  margin: 15px 0;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.8;
}

#privacy-policy ul,
#privacy-policy ol,
#acknowledgments ul,
#acknowledgments ol {
  margin: 15px 0;
  padding-left: 20px;
}

#privacy-policy li,
#acknowledgments li {
  margin: 10px 0;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.8;
}

#acknowledgments h4 {
  font-size: 18px;
  margin: 20px 0 10px;
  color: var(--text-color);
}

#acknowledgments ul {
  list-style-type: disc;
}

#acknowledgments ol {
  list-style-type: decimal;
}

#acknowledgments ul li {
  margin: 5px 0;
}

.language-selector {
  margin-left: auto; /* 将语言选择器推到右侧 */
}

.language-selector select {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background-color: var(--entry);
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7em top 50%;
  background-size: 1em auto;
  padding-right: 2.5em;
}

/* 统一顶部标题样式 */
.privacy-policy-page header .logo a,
.acknowledgments-page header .logo a {
  color: var(--text-color);
}

/* 统一底部 footer 样式 */
.privacy-policy-page footer a,
.acknowledgments-page footer a {
  color: var(--text-color);
}

.privacy-policy-page footer a:hover,
.acknowledgments-page footer a:hover {
  text-decoration: none;
}

/* 404错误页面样式 */
.error-page main {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 20px;
}

#error-404 {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

#error-404 .content {
  display: none;
}

#error-404 .content.visible,
#error-404 .content.active {
  display: block;
}

#error-404 h1 {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--text-color);
}

#error-404 p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.8;
}

#error-404 a {
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.3s;
}

#error-404 a:hover {
  opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

  .app-store-button,
  .google-play-button {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }
}

.content {
    display: none;
}

.content.visible {
    display: block;
}

.title {
    display: none;
}

.title.visible {
    display: block;
}

/* 在文件末尾添加以下样式 */
.content {
    display: none;
}

.content.visible {
    display: block;
}

.content {
  max-width: 100%; /* 确保内容不会超出容器 */
}

/* 在文件末尾添加以下样式 */
.nav-title,
.footer-text {
    display: none;
}

.nav-title.active,
.footer-text.active {
    display: inline;
}

.logo-title {
    display: flex;
    align-items: center;
}

.logo-title img {
    height: 30px;
    margin-right: 10px;
}

.nav-title {
    display: none;
}

.nav-title.active {
    display: block;
}

.nav-title a {
    font-size: 21px;
    font-weight: normal;
    color: var(--text-color);
    text-decoration: none;
}

/* 在文件中添加或修改以下样式 */
.title {
    display: none;
}

.title.active {
    display: block;
}

/* 在文件末尾添加以下样式 */
.language-selector {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.language-icon {
    margin-right: 8px;
    color: var(--text-color);
}

.language-selector select {
    padding: 5px 10px 5px 30px; /* 增加左侧内边距以容纳图标 */
    border: 1px solid var(--border);
    border-radius: 5px;
    background-color: var(--entry);
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%, left 0.5em center; /* 添加左侧图标位置 */
    background-size: 1em auto, 1em auto; /* 设置两个背景图像的大小 */
    padding-right: 2.5em;
}

.language-icon {
    position: absolute;
    left: 0.5em;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* 防止图标干扰选择操作 */
}

/* 隐藏除了选中选项之外的其他选项中的图标 */
.language-selector select option:not(:checked) .language-icon {
    display: none;
}

.logo-title a,
.nav-title a {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.logo-title a:active,
.nav-title a:active {
  opacity: 0.7;
}

.language-selector select {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.language-selector select:active {
  opacity: 0.7;
}

/* 修改 .language-selector 的样式 */
.language-selector {
    position: relative;
    display: inline-block;
    margin-left: auto;
}

/* 修改 select 的样式 */
.language-selector select {
    padding: 5px 10px 5px 30px; /* 左侧留出空间给图标 */
    border: 1px solid var(--border);
    border-radius: 5px;
    background-color: var(--entry);
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%;
    background-size: 1em auto;
    padding-right: 2.5em;
}

/* 添加新的样式来显示语言图标 */
.language-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    z-index: 1;
}

/* 确保 SVG 图标可见 */
.language-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--text-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 隐藏选项中的图标 */
.language-selector select option .language-icon {
    display: none;
}

/* 语言切换相关样式 */
[data-lang] {
    display: none;
}

[data-lang].visible,
[data-lang].active {
    display: flex;
}

/* 添加移动端列表样式 */
@media (max-width: 768px) {
    #acknowledgments ol,
    #acknowledgments ul,
    #privacy-policy ol,
    #privacy-policy ul {
        padding-left: 20px;
        margin: 10px 0;
        width: 100%;
        box-sizing: border-box;
    }

    #acknowledgments li,
    #privacy-policy li {
        word-wrap: break-word;
        overflow-wrap: break-word;
        width: 100%;
    }

    #acknowledgments a,
    #privacy-policy a {
        word-break: break-all;
    }

}