:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #162032;
  --bg-card-hover: #1c2940;
  --accent-cyan: #00d2ff;
  --accent-blue: #3a7bd5;
  --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.09);
  --border-highlight: rgba(0, 210, 255, 0.4);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-primary);
  background-image: radial-gradient(circle at 50% 0%, #152238 0%, #0a0e17 65%);
  background-repeat: no-repeat;
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 30px 16px 50px;
}

/* Header & Brand */
.brand-header {
  text-align: center;
  padding: 10px 0 28px;
}

.logo-wrapper {
  display: inline-block;
  margin-bottom: 14px;
}

.logo-box {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.brand-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.brand-badge {
  background: rgba(0, 210, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 210, 255, 0.35);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.brand-slogan {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 16px;
}

/* Trust Tags */
.trust-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.trust-item svg {
  color: var(--accent-cyan);
}

/* Main Content Grid */
.main-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 15px;
}

@media (min-width: 860px) {
  .main-content {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }
}

/* Download Cards Grid */
.download-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 540px) {
  .download-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Action Card */
.download-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.download-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
}

/* Recommended Highlight */
.download-card.is-recommended {
  border-color: rgba(0, 210, 255, 0.6);
  background: #18263d;
  box-shadow: 0 8px 25px rgba(0, 210, 255, 0.15);
}

.card-tag-rec {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-gradient);
  color: #040c18;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Header */
.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.card-icon-wrap.h5-icon {
  background: rgba(255, 154, 0, 0.12);
  color: #ff9a00;
  border-color: rgba(255, 154, 0, 0.3);
}

.card-icon-wrap.android-icon {
  background: rgba(61, 220, 132, 0.12);
  color: #3ddc84;
  border-color: rgba(61, 220, 132, 0.3);
}

.card-icon-wrap.ios-icon {
  background: rgba(0, 210, 255, 0.12);
  color: #00d2ff;
  border-color: rgba(0, 210, 255, 0.3);
}

.card-icon-wrap.exe-icon {
  background: rgba(0, 164, 239, 0.12);
  color: #00a4ef;
  border-color: rgba(0, 164, 239, 0.3);
}

.card-info {
  flex: 1;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 18px;
  min-height: 36px;
}

/* Card Button */
.card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: filter 0.2s, transform 0.2s;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #030a16;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-ios {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ios:hover {
  background: #253349;
  border-color: var(--accent-cyan);
}

.btn-h5 {
  background: linear-gradient(135deg, #ff9a00, #ff5a00);
  color: #ffffff;
}

.btn-h5:hover {
  filter: brightness(1.1);
}

/* Secondary Links inside card */
.card-sub-action {
  margin-top: 8px;
  text-align: center;
}

.sub-link {
  font-size: 12px;
  color: var(--accent-cyan);
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.sub-link:hover {
  text-decoration: underline;
}

/* QR Code & Side Panel */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qr-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.qr-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.qr-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.qr-code-box {
  width: 150px;
  height: 150px;
  background: #ffffff;
  border-radius: 12px;
  margin: 0 auto 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-hint {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Fast Links Card */
.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.stat-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-label {
  color: var(--text-muted);
}

.stat-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Features Section */
.features-section {
  margin-top: 35px;
}

.section-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 600px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 210, 255, 0.1);
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.feature-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.feature-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* iOS Tutorial Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #141d2c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #ffffff;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.step-item {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-cyan);
  color: #000000;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
  margin-bottom: 2px;
}

.step-content p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* WeChat Browser Warning */
.wx-browser-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 14, 23, 0.95);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  text-align: center;
}

.wx-arrow {
  position: absolute;
  top: 15px;
  right: 20px;
}

.wx-card {
  margin-top: 80px;
  background: #182234;
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  max-width: 320px;
}

.wx-card h3 {
  font-size: 18px;
  color: var(--accent-cyan);
  margin-bottom: 10px;
}

.wx-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Footer */
.page-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--text-muted);
}

.page-footer p {
  margin-bottom: 4px;
}
