:root {
  --bg: #0a0b12;
  --surface: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f4f4f8;
  --muted: rgba(244, 244, 248, 0.62);
  --accent: #7c5cff;
  --accent-2: #ff5c9a;
  --btn-shadow: 0 12px 40px rgba(124, 92, 255, 0.35);
  --ios-btn-bg: rgba(0, 0, 0, 0.3);
  --ios-btn-border: rgba(255, 255, 255, 0.25);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family:
    'Segoe UI',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
}

.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) 20px calc(32px + var(--safe-bottom));
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.55;
}

.glow-a {
  width: 280px;
  height: 280px;
  background: var(--accent);
  top: -60px;
  right: -40px;
}

.glow-b {
  width: 240px;
  height: 240px;
  background: var(--accent-2);
  bottom: 10%;
  left: -50px;
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 36px;
}

.logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--btn-shadow);
  overflow: hidden;
}

.logo .logo-mark {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 24px;
}

.app-name {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

.version {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.version:empty {
  display: none;
}

.actions {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
}

.actions[hidden],
.ios-redirect[hidden],
.coming-soon[hidden],
.platform-unavailable[hidden],
#btn-android-desktop[hidden],
#btn-ios-desktop[hidden] {
  display: none !important;
}

.actions-dual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #9b6bff);
  box-shadow: var(--btn-shadow);
}

.btn-secondary {
  color: #fff;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #1e1e3a, #1a1a4a);
  border-color: rgba(255, 255, 255, 0.3);
}

/* iOS 按钮专属样式 */
#btn-ios-desktop {
  background: linear-gradient(135deg, #2c2c3e, #1a1a2e);
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

#btn-ios-desktop::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

#btn-ios-desktop:hover::before {
  left: 100%;
}

.hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.ios-redirect {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 320px;
}

.ios-text {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--muted);
}

.link {
  color: var(--accent);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.coming-soon {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.coming-soon-text {
  margin: 0;
  padding: 18px 20px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.platform-unavailable {
  margin: 0;
  padding: 14px 16px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* 响应式调整 - 大屏幕稍微放大 */
@media (min-width: 768px) {
  .logo {
    width: 110px;
    height: 110px;
    border-radius: 28px;
  }
  
  .logo .logo-mark {
    border-radius: 28px;
  }
}