/* ==================== 
   SAO-World 服务器网站 CSS 样式表
   ==================== */

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

/* ===== 根样式 =====  */
:root {
  /* 主色彩 */
  --color-primary: #ff6b35;
  --color-dark: #000;
  --color-light: #fff;
  --color-dark-bg: #0a0a0a;
  --color-dark-secondary: #1a1a1a;

  /* 字体 */
  --font-main: "Arial", "Segoe UI", sans-serif;
  --font-mono: "Courier New", monospace;

  /* 间距 */
  --spacing-unit: 8px;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-dark-bg);
  color: var(--color-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 视频背景 - 保持原有样式 */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  overflow: hidden;
}

.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 1;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 添加背景图层 - 保持原有样式 */
.background-layer {
  position: fixed;
  top:0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("image/background.png");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.background-mask {
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index: -1;
  background:linear-gradient(to right,rgb(0, 0, 0),rgba(0, 0, 0, 0))
}

/* 添加点射容器样式 - 保持原有样式 */
.dot-shaft-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.dot {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  will-change: transform, opacity;
}

/* ===== 导航栏 ===== */
.navbar {
  position: sticky;
  top: 0;
  background-color: rgba(0, 0, 0, 0.95);
  border-bottom: 2px solid var(--color-primary);
  z-index: 100;
  padding: 1rem 0;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 2px;
}

/* 添加 logo 图标样式 */
.logo-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo-text {
  color: var(--color-primary);
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  flex: 1;
}

.nav-link {
  color: var(--color-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--color-primary);
}

/* 外部链接样式 */
.nav-link.external-link {
  color: #ff9f6b;
  font-weight: bold;
}

.nav-link.external-link:hover {
  color: #ffc29b;
  text-decoration: underline;
}

.nav-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* 语言按钮 */
.lang-btn {
  background-color: var(--color-primary);
  color: var(--color-dark);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.lang-btn:hover {
  background-color: #ff8551;
}

/* ===== 用户信息区域样式（新增，不影响原有样式） ===== */
#authArea {
  display: flex;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--color-dark);
  font-size: 14px;
}

.user-name {
  color: var(--color-light);
  font-weight: 500;
}

.logout-btn {
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-dark);
}

/* 登录按钮 */
.login-btn {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.login-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-dark);
}

/* 菜单按钮 */
.menu-btn {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 6px;
}

.menu-btn span {
  width: 25px;
  height: 3px;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== 主容器 ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 分段样式 ===== */
.section {
  display: none;
  padding: 4rem 0;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.section.active {
  display: block;
  opacity: 1;
}

.section-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--color-primary);
  margin: 1rem auto 0;
}

/* ===== 首页 ===== */
.home-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: 80vh;
}

.hero-text h1 {
  font-size: 4rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  animation: slideInLeft 0.8s ease;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--color-light);
  margin-bottom: 2rem;
  animation: slideInLeft 0.8s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  animation: slideInLeft 0.8s ease 0.4s both;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideInRight 0.8s ease;
}

.pixel-art {
  font-size: 8rem;
  display: flex;
  flex-wrap: wrap;
  width: 300px;
  height: 300px;
  justify-content: center;
  align-items: center;
}

/* ===== 按钮样式 ===== */
.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-dark);
}

.btn-primary:hover {
  background-color: #ff8551;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-dark);
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.85rem;
}

/* ===== 介绍卡片 ===== */
.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.intro-card {
  background-color: var(--color-dark-secondary);
  padding: 2rem;
  border-left: 4px solid var(--color-primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 0 4px 4px 0;
}

.intro-card:hover {
  transform: translateX(10px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
}

.intro-card h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.intro-card p {
  color: #ccc;
  line-height: 1.8;
  margin-bottom: 0.8rem;
}

/* ===== 开发者卡片 ===== */
.developers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.dev-card {
  background-color: var(--color-dark-secondary);
  padding: 2rem;
  border: 2px solid var(--color-primary);
  text-align: center;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.dev-card:hover {
  transform: scale(1.05);
}

.dev-avatar {
  width:25%;
  margin-bottom: 1rem;
}

.dev-card h3 {
  color: var(--color-primary);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.dev-card .role {
  color: var(--color-primary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dev-card .bio {
  color: #aaa;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.dev-contact {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* 开发者联系按钮样式 */
.dev-contact a {
  color: var(--color-primary);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--color-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
  cursor: pointer;
  background-color: transparent;
  font-family: inherit;
  font-size: 0.9rem;
}

.dev-contact a:hover {
  background-color: var(--color-primary);
  color: var(--color-dark);
}

/* 复制按钮特殊样式 */
.copy-qq-btn,
.copy-email-btn {
  background-color: rgba(255, 107, 53, 0.1) !important;
}

.copy-qq-btn:hover,
.copy-email-btn:hover {
  background-color: var(--color-primary) !important;
  color: var(--color-dark) !important;
}

/* ===== 玩家群组 ===== */
.groups-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.group-card {
  background-color: var(--color-dark-secondary);
  padding: 2rem;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.group-card:hover {
  box-shadow: 0 10px 35px rgba(255, 107, 53, 0.3);
  transform: translateY(-5px);
}

.group-card h3 {
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.group-leader {
  color: var(--color-primary);
  font-weight: bold;
  margin-bottom: 1rem;
}

.group-desc {
  color: #bbb;
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.group-members {
  color: var(--color-primary);
  margin: 1.5rem 0;
  font-weight: bold;
}

/* 加入群组按钮样式 */
.join-group-btn {
  display: inline-block;
  margin-top: 1rem;
  width: 100%;
}

/* ===== 捐赠部分 ===== */
.donate-intro {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #ddd;
  line-height: 1.8;
}

.donation-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.donation-card {
  background-color: var(--color-dark-secondary);
  padding: 2.5rem;
  border: 2px solid #333;
  border-radius: 4px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.donation-card.featured {
  border-color: var(--color-primary);
  transform: scale(1.05);
  box-shadow: 0 10px 40px rgba(255, 107, 53, 0.2);
}

.donation-card h3 {
  color: var(--color-primary);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.price {
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.benefits {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
  color: #bbb;
  flex-grow: 1;
}

.benefits li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #333;
}

.benefits li:last-child {
  border-bottom: none;
}

/* 支持按钮样式 */
.support-btn {
  margin-top: auto;
}

.payment-methods {
  text-align: center;
  padding: 2rem;
  background-color: var(--color-dark-secondary);
  border-radius: 4px;
  margin-top: 2rem;
}

.payment-methods h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.payment-methods p {
  color: #ddd;
}

/* ===== 下载部分 ===== */
.download-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.download-steps h3,
.download-files h3 {
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step-number {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background-color: var(--color-primary);
  color: var(--color-dark);
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.step-content h4 {
  color: var(--color-light);
  margin-bottom: 0.5rem;
}

.step-content p {
  color: #aaa;
  margin: 0;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--color-dark-secondary);
  padding: 1.5rem;
  border-radius: 4px;
  border-left: 4px solid var(--color-primary);
}

.file-icon {
  font-size: 2rem;
}

.file-info {
  flex: 1;
}

.file-info h4 {
  color: var(--color-light);
  margin-bottom: 0.3rem;
}

.file-info p {
  color: #999;
  font-size: 0.9rem;
  margin: 0;
}

/* 下载按钮样式 */
.download-btn {
  white-space: nowrap;
  min-width: 120px;
}

/* ===== 页脚 ===== */
.footer {
  background-color: var(--color-dark-secondary);
  border-top: 2px solid var(--color-primary);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.footer-section p {
  color: #aaa;
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.footer-section a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
  display: block;
  padding: 2px 0;
}

.footer-section a:hover {
  color: #ff8551;
  text-decoration: underline;
}

/* 备案信息样式 */
.footer-icp {
  text-align: center;
  padding: 1rem 20px;
  color: #666;
  font-size: 0.85rem;
  border-top: 1px solid #333;
  margin-top: 1rem;
}

.footer-icp p {
  margin: 0.3rem 0;
}

.footer-icp a {
  color: #888;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-icp a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
  color: #888;
  font-size: 0.9rem;
}

/* ===== 模态框 ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--color-dark-secondary);
  padding: 2.5rem;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  width: 90%;
  max-width: 450px;
  position: relative;
  animation: slideDown 0.3s ease;
}

.close {
  color: var(--color-primary);
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  position: absolute;
  top: 10px;
  right: 15px;
}

.close:hover {
  color: #ff8551;
}

/* ===== 表单样式 ===== */
.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.auth-form h2 {
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.3rem;
}

.form-group label {
  display: block;
  color: var(--color-light);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--color-dark);
  border: 2px solid #333;
  border-radius: 4px;
  color: var(--color-light);
  font-family: var(--font-main);
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-switch {
  text-align: center;
  margin-top: 1.5rem;
  color: #aaa;
}

.form-switch a {
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.form-switch a:hover {
  color: #ff8551;
}

/* 服务条款复选框样式 */
.terms-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terms-checkbox input[type="checkbox"] {
  width: auto;
}

.terms-link {
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: underline;
}

.terms-link:hover {
  color: #ff8551;
}

/* ===== Toast消息提示 ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--color-dark-secondary);
  color: var(--color-light);
  padding: 16px 24px;
  border-radius: 4px;
  border: 1px solid var(--color-primary);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
  min-width: 250px;
  text-align: center;
  font-weight: 500;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: #4caf50;
  background-color: rgba(76, 175, 80, 0.1);
}

.toast.error {
  border-color: #f44336;
  background-color: rgba(244, 67, 54, 0.1);
}

.toast.info {
  border-color: #2196f3;
  background-color: rgba(33, 150, 243, 0.1);
}

/* ===== 服务条款弹窗 ===== */
.terms-content {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.terms-container {
  color: #ddd;
  line-height: 1.8;
}

.terms-container h2 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  text-align: center;
}

.terms-container h3 {
  color: var(--color-primary);
  margin: 1.5rem 0 0.5rem;
}

.terms-container p {
  margin-bottom: 1rem;
}

.terms-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
}

/* ===== 动画 ===== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.95);
    padding: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-menu.active {
    max-height: 400px;
  }

  .menu-btn {
    display: flex;
  }

  .home-content {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-image {
    display: none;
  }

  .section-title {
    font-size: 2rem;
  }

  .download-content {
    grid-template-columns: 1fr;
  }

  .donation-card.featured {
    transform: scale(1);
  }

  .nav-right {
    gap: 0.5rem;
  }

  .lang-btn,
  .login-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .dev-contact {
    flex-direction: column;
  }

  .dev-contact a {
    width: 100%;
  }

  .file-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .download-btn {
    width: 100%;
    min-width: auto;
  }

  /* 移动端用户信息样式 */
  .user-info {
    flex-direction: column;
    gap: 5px;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .user-name {
    font-size: 0.9rem;
  }

  .logout-btn {
    padding: 3px 8px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 2rem 0;
    min-height: auto;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .intro-grid,
  .developers-grid,
  .groups-container {
    grid-template-columns: 1fr;
  }

  .steps {
    gap: 1rem;
  }

  .file-item {
    flex-direction: column;
    text-align: center;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .terms-content {
    max-height: 90vh;
  }
}
