:root {
  --primary-color: #0084FF;
  --secondary-color: #F6F8FF;
  --text-color: #151515;
  --light-text: #686F7E;
  --border-radius: 10px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--secondary-color);
}

.container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  background-color: var(--secondary-color);
  background-image: url("https://static.yximgs.com/udata/pkg/559f6c913534458e87ab238c222550c8.png");
  background-size: 100% auto;
  background-position: top center;
  background-repeat: no-repeat;
  padding: 0 20px 60px;
}

@media (min-width: 1200px) {
  .main-content {
    padding: 0 360px 60px;
  }
}

header {
  padding-top: 20px;
  margin-bottom: 30px;
}

.logo-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  border-radius: 16px;
  padding: 20px 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 132, 255, 0.08);
}

.logo-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.logo-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.2;
}

.logo-slogan {
  font-size: 15px;
  color: var(--light-text);
  letter-spacing: 1px;
  line-height: 1.4;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  color: var(--text-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  background-image: url("https://static.yximgs.com/udata/pkg/f5c2f2432bdb48bc9ebcd15721e052be.png");
  background-size: 60px 12px;
  background-position: left bottom;
  background-repeat: no-repeat;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.download-card {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px 32px;
  box-shadow: var(--box-shadow);
}

.app-info {
  flex: 1;
  margin-left: 16px;
}

.app-name {
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 8px;
}

.app-description {
  font-size: 14px;
  color: var(--light-text);
}

.download-button {
  background-color: rgba(50, 156, 255, 0.16);
  color: var(--primary-color);
  font-size: 16px;
  font-weight: 500;
  padding: 0 20px;
  height: 40px;
  line-height: 40px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.download-button:hover {
  background-color: var(--primary-color);
  color: white;
}

.alert {
  background-color: white;
  color: var(--primary-color);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  margin-bottom: 30px;
  box-shadow: var(--box-shadow);
  line-height: 1.6;
  border: 1px solid rgba(0, 132, 255, 0.2);
}

.installation-guide {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 25px;
  margin-bottom: 40px;
  box-shadow: var(--box-shadow);
}

.guide-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.guide-tab {
  padding: 8px 15px;
  background-color: rgba(50, 156, 255, 0.16);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--primary-color);
}

.guide-tab.active {
  background-color: var(--primary-color);
  color: white;
}

.guide-content {
  display: none;
}

.guide-content.active {
  display: block;
}

/* 官方联系渠道 */
.contact-section {
  margin-bottom: 40px;
}

.contact-buttons {
  display: flex;
  gap: 12px;
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 12px 16px;
  background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.25);
  white-space: nowrap;
}

.contact-btn:hover {
  box-shadow: 0 6px 16px rgba(0, 136, 204, 0.35);
  transform: translateY(-1px);
}

.contact-btn-orange {
  background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.25);
}

.contact-btn-orange:hover {
  box-shadow: 0 6px 16px rgba(245, 124, 0, 0.35);
}

.contact-btn-green {
  background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
  box-shadow: 0 4px 12px rgba(67, 160, 71, 0.25);
}

.contact-btn-green:hover {
  box-shadow: 0 6px 16px rgba(67, 160, 71, 0.35);
}

footer {
  background-color: white;
  padding: 20px;
  text-align: center;
  color: #888;
  font-size: 12px;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .main-content {
    padding: 0 16px 40px;
  }

  header {
    padding-top: 16px;
    margin-bottom: 20px;
  }

  .logo-card {
    padding: 16px 20px;
    gap: 14px;
    border-radius: 14px;
  }

  .logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .logo-text {
    font-size: 22px;
  }

  .logo-slogan {
    font-size: 13px;
  }

  .section-title {
    font-size: 17px;
    margin-bottom: 16px;
  }

  .download-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 40px;
  }

  .download-card {
    padding: 16px;
  }

  .download-button {
    padding: 0 14px;
    height: 36px;
    line-height: 36px;
    font-size: 14px;
  }

  .custom-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
    padding: 8px;
  }

  .alert {
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 20px;
  }

  .installation-guide {
    padding: 16px;
    margin-bottom: 24px;
  }

  .guide-tabs {
    gap: 8px;
  }

  .guide-tab {
    padding: 6px 12px;
    font-size: 13px;
  }

  .guide-step {
    font-size: 13px;
    line-height: 1.7;
    word-break: break-all;
  }

  footer {
    padding: 16px;
    font-size: 11px;
  }
}

.custom-icon {
  width: 50px;
  height: 50px;
  background-color: #999;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
  padding: 10px;
  box-sizing: border-box;
}

.custom-icon svg {
  width: 100%;
  height: 100%;
  fill: white;
}

/* 滚动条处理 */
html {
  scrollbar-gutter: stable;
}

body.modal-open {
  overflow: hidden;
  padding-right: 15px;
}

/* 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  overflow-y: auto;
}

.modal-content {
  background: white;
  padding: 24px 20px 20px;
  border-radius: 16px;
  width: 380px;
  max-width: 88%;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
  height: auto;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes modalSlideIn {
  from {
    transform: translateY(24px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  cursor: pointer;
  font-size: 18px;
  color: #999;
  line-height: 1;
  background: none;
  border: none;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
  background: #f0f0f0;
}

.modal-title {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #222;
  text-align: center;
  padding: 0 24px;
  letter-spacing: 0.3px;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  bottom: -20px;
  background: white;
  padding: 16px 0 20px;
  margin-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.modal-button {
  padding: 12px 16px;
  background: linear-gradient(135deg, #ff8533 0%, #ff6b00 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

.modal-button:hover {
  background: linear-gradient(135deg, #ff6b00 0%, #e55d00 100%);
  box-shadow: 0 6px 16px rgba(255, 107, 0, 0.35);
  transform: translateY(-1px);
}

.modal-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.2);
}

.modal-button-secondary {
  background: #f5f5f5;
  color: #555;
  box-shadow: none;
  border: 1px solid #e0e0e0;
}

.modal-button-secondary:hover {
  background: #eaeaea;
  color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.modal-button-secondary:active {
  background: #e0e0e0;
  box-shadow: none;
}

/* 滚动条美化 */
.modal-content::-webkit-scrollbar {
  width: 5px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

/* 弹窗手机端优化 */
@media (max-width: 480px) {
  .modal-content {
    padding: 20px 16px 16px;
    min-width: auto;
    width: 90vw;
    max-height: 85vh;
    border-radius: 14px;
  }

  .modal-buttons {
    bottom: -16px;
    padding: 14px 0 16px;
  }

  .modal-button {
    padding: 11px 16px;
    font-size: 13px;
    border-radius: 10px;
  }

  .modal-title {
    font-size: 15px;
    margin-bottom: 14px;
  }

  .modal-instructions {
    margin: 10px 0;
    padding: 0;
  }

  .tip-text {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .step-list {
    font-size: 12px;
  }

  .notice p {
    font-size: 11px;
  }

  .tutorial-notice {
    font-size: 12px;
    padding: 10px 14px 10px 20px;
    margin-bottom: 10px;
  }

  .tutorial-modal-content {
    width: auto;
    min-width: auto;
  }
}

/* iOS专属样式 */
.modal-instructions {
  margin: 15px 0;
  padding: 0 10px;
  text-align: center;
}

.tip-text {
  color: #666;
  font-size: 13px;
  margin-bottom: 12px;
}

.step-list {
  display: inline-block;
  text-align: left;
  padding-left: 20px;
  margin: 12px 0;
  color: #444;
  font-size: 13px;
  line-height: 1.6;
}

.step-list li {
  margin-bottom: 8px;
}

.notice {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 12px;
  margin-top: 15px;
}

.notice p {
  color: #ff3b30;
  font-size: 12px;
  margin: 6px 0;
}

.ios-button {
  background: linear-gradient(135deg, #3ddc84 0%, #34c759 100%);
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

.ios-button:hover {
  background: linear-gradient(135deg, #34c759 0%, #2db84e 100%);
  box-shadow: 0 6px 16px rgba(52, 199, 89, 0.4);
}

/* 图文教程提示 */
.tutorial-notice {
  background: linear-gradient(135deg, #fff8f0 0%, #fff3e0 100%);
  color: #d84315;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 20px 12px 24px;
  border-radius: 10px;
  margin-bottom: 14px;
  text-align: center;
  border: 1px solid #ffcc80;
  letter-spacing: 0.3px;
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.1);
  position: relative;
  white-space: normal;
  word-break: break-all;
}

.tutorial-notice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #ff9800 0%, #f44336 100%);
  border-radius: 4px 0 0 4px;
}

.tutorial-image-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

/* 图文教程下载按钮 */
.tutorial-download-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #3ddc84 0%, #34c759 100%);
  color: white;
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
  transition: all 0.3s ease;
}

.tutorial-download-btn:hover {
  box-shadow: 0 6px 16px rgba(52, 199, 89, 0.4);
  transform: translateY(-1px);
}

/* 图文教程弹窗 */
.tutorial-modal-content {
  max-width: 95vw;
  max-height: 95vh;
  width: fit-content;
  min-width: 320px;
  padding: 20px 16px 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tutorial-image-wrapper {
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8f8f8;
}

.tutorial-image {
  max-width: 90vw;
  max-height: calc(95vh - 120px);
  width: auto;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: contain;
}

@media (max-width: 480px) {
  .tutorial-modal-content {
    max-width: 98vw;
    max-height: 92vh;
    padding: 16px 10px 10px;
  }

  .tutorial-image {
    max-width: 95vw;
    max-height: calc(92vh - 110px);
  }
}
