* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gold: #f5e56b;
  --gold-soft: #b8a84a;
  --gold-dim: #7a6e3a;
  --gold-mid: #e0d06a;
  --bg: #1a1a1a;
  --card: #0d0d0d;
  --panel: #121212;
  --ink: #0d0d0d;
}

body {
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  padding: 16px;
  margin: 0;
  color: var(--gold);
}

.app-card {
  max-width: 400px;
  width: 100%;
  background: var(--card);
  border-radius: 40px 40px 28px 28px;
  padding: 28px 22px 32px;
  box-shadow: 0 12px 40px rgba(245, 229, 107, 0.15), 0 2px 8px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  border: 1px solid #f5e56b40;
  animation: card-in 0.55s ease both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ecg-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f5e56b, #f7c948, #f5e56b);
  background-size: 200% 100%;
  opacity: 0.9;
  box-shadow: 0 2px 16px rgba(245, 229, 107, 0.3);
  animation: shine 3.2s linear infinite;
}

@keyframes shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(245, 229, 107, 0.25);
  background: var(--gold);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--gold);
}

.product-name small {
  font-size: 13px;
  font-weight: 400;
  color: var(--gold-soft);
  margin-left: 4px;
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
}

.ecg-big {
  width: 110px;
  height: 110px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(245, 229, 107, 0.2);
  margin-bottom: 16px;
  border: 2px solid rgba(245, 229, 107, 0.15);
  flex-shrink: 0;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(245, 229, 107, 0.2); }
  50% { box-shadow: 0 10px 36px rgba(245, 229, 107, 0.38); }
}

.ecg-big svg {
  width: 64px;
  height: 64px;
  fill: var(--ink);
}

.invite-badge {
  background: var(--bg);
  padding: 12px 24px;
  border-radius: 60px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #f5e56b60;
  box-shadow: 0 2px 8px rgba(245, 229, 107, 0.08);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 4px;
}

.invite-label {
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 0.3px;
  font-weight: 500;
}

.invite-label i {
  color: var(--gold);
  margin-right: 6px;
}

.invite-sub {
  font-size: 13px;
  color: var(--gold-soft);
  margin-top: 8px;
  letter-spacing: 0.3px;
}

.invite-sub i {
  color: var(--gold);
  margin-right: 4px;
}

.friend-invite {
  text-align: center;
  margin: 18px 0 16px;
  line-height: 1.8;
}

.friend-invite .name {
  font-weight: 600;
  font-size: 17px;
  color: var(--gold);
}

.friend-invite .action-text {
  font-size: 15px;
  color: #c8b85a;
  display: block;
}

.friend-invite .action-text strong {
  color: var(--gold);
  font-weight: 600;
}

.version-line {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--gold-dim);
}

.platform-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #f5e56b40;
  font-size: 12px;
  color: var(--gold-soft);
  background: #121212;
}

.platform-switch {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 4px 0 8px;
}

.platform-chip {
  min-width: 96px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #f5e56b50;
  background: #121212;
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}

.platform-chip.active,
.platform-chip:hover {
  background: linear-gradient(145deg, #f5e56b, #e6c84a);
  color: var(--ink);
  border-color: var(--gold);
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(145deg, #f5e56b, #e6c84a);
  border: none;
  width: 100%;
  padding: 18px 10px;
  border-radius: 60px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(245, 229, 107, 0.25);
  transition: all 0.15s;
  cursor: pointer;
  margin: 16px 0 10px;
  letter-spacing: 0.5px;
  border: 1px solid var(--gold);
}

.download-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.download-btn i {
  font-size: 22px;
  color: var(--ink);
}

.download-btn:not(:disabled):active {
  transform: scale(0.96);
  box-shadow: 0 4px 14px rgba(245, 229, 107, 0.2);
  background: var(--gold);
}

.upgrade-des {
  font-size: 13px;
  color: var(--gold-soft);
  text-align: center;
  line-height: 1.6;
  margin: 0 4px 14px;
  white-space: pre-wrap;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--panel);
  padding: 16px 18px;
  border-radius: 28px;
  border: 1px solid #f5e56b30;
  margin: 6px 0 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--gold-mid);
  padding: 4px 0;
}

.feature-item i {
  width: 22px;
  color: var(--gold);
  font-size: 16px;
  text-align: center;
}

.feature-item strong {
  color: var(--gold);
  font-weight: 600;
}

.feature-item .sep {
  color: var(--gold-dim);
  margin-left: 4px;
}

.enter-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 16px;
  text-decoration: none;
  padding: 12px 0 4px;
  border-top: 1px solid #f5e56b30;
  margin-top: 10px;
  cursor: pointer;
  transition: 0.2s;
  outline: none;
}

.enter-link i {
  color: var(--gold);
  font-size: 14px;
  transition: transform 0.2s;
}

.enter-link:active i,
.enter-link:focus-visible i {
  transform: translateX(6px);
}

.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--bg);
  backdrop-filter: blur(12px);
  padding: 12px 28px;
  border-radius: 60px;
  color: var(--gold);
  font-weight: 500;
  font-size: 15px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid #f5e56b60;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.toast i {
  margin-right: 10px;
  color: var(--gold);
}

.footer-note {
  text-align: center;
  font-size: 10px;
  color: var(--gold-dim);
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #f5e56b20;
  letter-spacing: 0.5px;
}

.footer-note i {
  color: var(--gold);
  opacity: 0.4;
}

@media (max-width: 420px) {
  .app-card { padding: 20px 16px 24px; border-radius: 32px; }
  .ecg-big { width: 92px; height: 92px; }
  .ecg-big svg { width: 50px; height: 50px; }
  .download-btn { font-size: 18px; padding: 16px 10px; }
}
