/* ================= 基础重置 ================= */
:root {
  --primary: #0078d7;
  --primary-hover: #005a9e;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --text-main: #333;
  --text-sub: #666;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.15);
  --radius-std: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent; /* 新增这一行 */
}
body {
  background-color: #005a9e;
  background: url("https://images.unsplash.com/photo-1579546929518-9e396f3cc809?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80")
    no-repeat center center fixed;
  background-size: cover;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

/* ================= 导航栏 ================= */
.navbar {
  background: linear-gradient(90deg, #005a9e, #0078d7);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: white;
  z-index: 100;
  position: relative;
}
.brand {
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-menu {
  display: flex;
  gap: 10px;
}
.nav-menu li a {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  transition: 0.3s;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-menu li a:hover,
.nav-menu li a.active {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
}
.user-area {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* ================= 主视图容器 ================= */
.main-container {
  flex: 1;
  padding: 40px 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.view-section {
  display: none;
  width: 100%;
  max-width: 900px;
  animation: fadeIn 0.4s ease-out;
}
.view-section.active {
  display: block;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.content-box {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-std);
  box-shadow: var(--shadow-card);
  padding: 40px;
  width: 100%;
}

/* ================= 1. 开始页样式 ================= */
.home-box {
  text-align: center;
  padding: 60px 40px;
}
.logo-large {
  font-size: 80px;
  color: var(--primary);
  margin-bottom: 20px;
}
.home-hero h1 {
  font-size: 36px;
  margin-bottom: 10px;
  font-weight: 300;
}
.home-hero p {
  color: var(--text-sub);
  font-size: 18px;
  margin-bottom: 40px;
  letter-spacing: 2px;
}
.start-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.start-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}
.features-row {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 50px;
  border-top: 1px solid #eee;
  padding-top: 40px;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #555;
}
.feature i {
  font-size: 24px;
  color: var(--primary);
}

/* ================= 2. 镜像页样式 ================= */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 5px;
}
.section-header p {
  color: #888;
  font-size: 14px;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.version-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 25px 20px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: 0.3s;
  overflow: hidden;
}
.version-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}
.highlight-card {
  border-top: 3px solid var(--primary);
}
.badge-hot {
  position: absolute;
  top: 0;
  right: 0;
  background: #ff4757;
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-bottom-left-radius: 8px;
}
.card-icon {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 15px;
}
.card-title {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 15px;
  line-height: 1.4;
  color: #333;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
  border-top: 1px dashed #eee;
  padding-top: 15px;
  margin-bottom: 15px;
}
.card-action {
  background: #f5f5f5;
  color: #666;
  padding: 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: 0.2s;
}
.version-card:hover .card-action {
  background: var(--primary);
  color: white;
}

.helper-links-bar {
  margin-top: 40px;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.helper-item {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  justify-content: center;
  transition: 0.2s;
  cursor: pointer;
}
.helper-item:hover .icon-box {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.icon-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 18px;
  transition: 0.2s;
}
.text-box {
  display: flex;
  flex-direction: column;
}
.main-text {
  font-weight: bold;
  font-size: 14px;
  color: #333;
}
.sub-text {
  font-size: 12px;
  color: #999;
}
.divider {
  width: 1px;
  height: 30px;
  background: #ddd;
}

/* ================= 3. 激活页样式 (保姆级) ================= */
.tutorial-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.step-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  gap: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.step-num {
  background: var(--primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}
.step-content h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
}
.step-content p {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.5;
}
.code-box {
  background: #f1f1f1;
  padding: 10px 15px;
  border-radius: 4px;
  font-family: "Consolas", monospace;
  color: #c7254e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e0e0e0;
  margin: 10px 0;
}
.copy-btn {
  background: white;
  border: 1px solid #ccc;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.copy-btn:active {
  background: #eee;
}
.tip-box {
  background: #fff3cd;
  color: #856404;
  padding: 10px;
  border-radius: 4px;
  font-size: 13px;
  margin-top: 10px;
}
.small-text {
  font-size: 12px;
  color: #888;
  font-style: italic;
}

/* ================= 4. 工具页样式 ================= */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.tool-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  transition: 0.3s;
  border: 1px solid #eee;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.tool-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.tool-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #666;
  font-weight: bold;
  flex-shrink: 0;
}
.tool-icon.wepe-bg {
  background: linear-gradient(135deg, #1e90ff, #00bfff);
  color: white;
}
.tool-info h3 {
  font-size: 16px;
  margin-bottom: 5px;
}
.tool-info p {
  font-size: 12px;
  color: #777;
  margin-bottom: 15px;
  line-height: 1.4;
  height: 34px;
  overflow: hidden;
}
.tool-btn {
  display: inline-block;
  padding: 6px 15px;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  transition: 0.2s;
  border: none;
}
.tool-btn:hover {
  background: var(--primary-hover);
}
.tool-btn[disabled] {
  background: #ccc;
}

/* ================= 弹窗通用样式 ================= */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: white;
  width: 90%;
  max-width: 480px;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  transition: 0.3s;
}
.modal-overlay.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}
.modal-header {
  background: #f8f9fa;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
}
.modal-header h3 {
  font-size: 16px;
  color: #333;
}
.close-modal {
  font-size: 24px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}
.close-modal:hover {
  color: #333;
}
.modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}
.modal-desc {
  text-align: center;
  color: #666;
  font-size: 13px;
  margin-bottom: 20px;
}

/* 文本教程弹窗排版 */
.text-tutorial h4 {
  margin: 15px 0 10px;
  color: var(--primary);
  font-size: 15px;
}
.text-tutorial p {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.6;
}
.text-tutorial hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 15px 0;
}
.text-tutorial ol {
  padding-left: 20px;
  margin-bottom: 10px;
  color: #555;
  font-size: 14px;
}
.text-tutorial li {
  margin-bottom: 5px;
}

/* 下载列表样式 */
.download-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dl-item {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #e0e0e0;
  padding: 12px 15px;
  border-radius: 8px;
  transition: 0.2s;
  color: #333;
}
.dl-item:hover {
  border-color: var(--primary);
  background: #f0f8ff;
  transform: translateX(5px);
}
.dl-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 各大网盘图标颜色 */
.baidu .dl-name i {
  color: #06a7ff;
}
.tianyi .dl-name i {
  color: #ff9933;
}
.pan123 .dl-name i {
  color: #ff5555;
}
/* 新增：腾讯微云图标颜色 */
.weiyun .dl-name i {
  color: #00a4ff;
}

.dl-code {
  font-size: 12px;
  color: #666;
  background: #eee;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 10px;
  width: 100px;
  text-align: center;
}
.dl-arrow {
  color: #ccc;
  font-size: 12px;
}
.dl-item:hover .dl-arrow {
  color: var(--primary);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 10px;
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  }
  .nav-menu li a {
    color: #333;
    flex-direction: column;
    font-size: 12px;
    padding: 5px;
    gap: 2px;
  }
  .nav-menu li a.active {
    background: none;
    color: var(--primary);
  }
  .brand {
    margin: 0 auto;
  }
  .main-container {
    padding-bottom: 80px;
  }
  .cards-container {
    grid-template-columns: 1fr;
  }
  .helper-links-bar {
    flex-direction: column;
    gap: 20px;
  }
  .divider {
    width: 100%;
    height: 1px;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= 自定义通知弹窗 (Toast) ================= */
#toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-msg {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #333;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.27),
    toastOut 0.4s 2.6s forwards;
  pointer-events: auto;
}

.toast-msg i {
  color: var(--primary);
  font-size: 16px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* 适配移动端：通知放在顶部避免遮挡底部导航 */
@media (max-width: 768px) {
  #toast-container {
    top: 20px;
    bottom: auto;
  }
}
/* ... 保留你原有的 CSS ... */

/* ========== 新增/修改的 CSS (追加到文件末尾即可) ========== */

/* 按钮组：用于让下载按钮和复制按钮并排 */
.btn-group {
  display: flex;
  gap: 8px;
  margin-top: auto; /* 确保按钮沉底 */
}

/* 修改原来的 .card-action 以适应按钮组 */
.card-action {
  flex: 1; /* 占据主要宽度 */
  background: #f5f5f5;
  color: #666;
  padding: 10px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

/* 仅图标按钮（用于复制磁力链） */
.card-action.icon-only {
  flex: 0 0 40px; /* 固定宽度 */
  padding: 0;
  font-size: 16px;
}

.card-action.full-width {
  width: 100%;
}

.version-card:hover .card-action {
  background: var(--primary);
  color: white;
}

/* 针对不同链接的特定样式 */
.version-card:hover .card-action.icon-only {
  background: #0063b1; /* 深一点的颜色区分主次 */
}

/* 腾讯微云图标颜色适配 */
.weiyun .dl-name i {
  color: #00a4ff;
}

/* 确保版本卡片内容垂直拉伸，使按钮对齐底部 */
.version-card {
  display: flex;
  flex-direction: column;
}
.card-meta {
  margin-bottom: auto; /* 将按钮推到底部 */
}
