/* Shared styling for agreement pages */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Pingfang", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #111;
  color: #ddd;
  min-height: 100vh;
  line-height: 1.8;
  font-size: 18px;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

header {
  position: sticky;
  top: 20px;
  width: 100%;
  max-width: 920px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  z-index: 1000;
  padding: 10px 15px;
  background: rgba(17, 17, 17, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
}

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

.logo img {
  width: 60px;
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo a:hover img {
  transform: scale(1.1);
}

.language-switch {
  position: relative;
  display: none; /* Hide language switcher on agreement pages */
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px;
}

.language-switch .globe-icon {
  font-size: 20px;
}

.language-switch .language-options {
  display: block;
  position: absolute;
  background-color: #333;
  padding: 10px;
  border-radius: 5px;
  z-index: -1;
  top: 100%;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  min-width: 280px;
}

.language-switch:hover .language-options {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transform: translateY(0);
}

.language-switch .language-options a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  line-height: 1.5;
}

.language-switch .language-options a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.policy-wrapper {
  padding-top: 40px;
}

.version-update {
  color: #aaa;
  font-size: 14px;
  margin-top: 20px;
  margin-bottom: 20px;
  text-align: center;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.version-update svg {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.markdown-content {
  margin-top: 40px;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  color: #fff;
  margin-top: 32px;
  margin-bottom: 16px;
}

.markdown-content p,
.markdown-content li {
  color: #aaa;
  margin-bottom: 16px;
  font-size: 1.05em;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 20px;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid #444;
  padding: 12px;
  text-align: left;
}

.markdown-content th {
  background-color: #222;
}

.markdown-content a {
  color: #ff91cc;
}

.loading-message,
.load-error {
  color: #bbb;
  margin-top: 20px;
}

#footer {
  width: 100%;
  max-width: 1200px;
  padding: 40px 20px;
  margin-top: 100px;
  border-top: 1px solid #333;
}

.footer-content {
  display: flex;
  justify-content: space-around;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column {
  flex: 1;
}

.footer-column h3 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 15px;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #b1b1b1;
  text-decoration: none;
  font-size: 16px;
}

.footer-column ul li a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-column ul li .disabled-link {
  color: #666;
  cursor: not-allowed;
}

.footer-column ul li i {
  margin-right: 8px;
}

.copyright {
  text-align: center;
  font-size: 14px;
  color: #777;
}

@media (max-width: 768px) {
  body {
    font-size: 18px;
  }

  .container {
    padding: 0 15px 60px;
  }

  header {
    padding: 8px 12px;
    top: 10px;
    max-width: calc(100% - 20px);
    left: 10px;
    right: 10px;
  }
  
  .logo img {
    width: 60px;
    height: 60px;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-column {
    width: 100%;
  }
  
  .footer-column h3 {
    font-size: 18px;
  }
  
  .footer-column ul li a {
    font-size: 16px;
  }
  
  .copyright {
    font-size: 15px;
  }
}
