:root {
  --pink: #e889ab;
  --pink-hover: #de7399;
  --pink-soft: #fdf2f6;
  --blue: #6aa8e0;
  --blue-dark: #4d92d0;
  --blue-soft: #dcf4fb;
  --bg: #f4f6fb;
  --bg-card: #ffffff;
  --border: #e2e6f0;
  --text: #3d4a5c;
  --text-secondary: #7d8a9c;
  --shadow-card: 0 4px 20px rgba(61, 74, 92, 0.06);
  --shadow-hover: 0 10px 28px rgba(106, 168, 224, 0.16);
  --radius: 16px;
  --radius-lg: 24px;
  --max-width: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.home-loading {
  padding: 96px 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
}

/* 首页骨架屏 */
.home-skeleton {
  pointer-events: none;
  user-select: none;
}

.sk {
  display: block;
  background: #e6eaf2;
  animation: sk-pulse 1.2s ease-in-out infinite;
  border-radius: 10px;
}

.sk-badge {
  width: 180px;
  height: 28px;
  margin: 0 auto 20px;
  border-radius: 999px;
}

.sk-title {
  width: min(320px, 70%);
  height: 42px;
  margin: 0 auto 18px;
  border-radius: 12px;
}

.sk-lead {
  width: min(520px, 88%);
  height: 14px;
  margin: 0 auto 10px;
}

.sk-lead--short {
  width: min(360px, 62%);
  margin-bottom: 28px;
}

.sk-btn {
  width: 120px;
  height: 44px;
  margin: 0 auto;
  border-radius: 999px;
}

.sk-section-label {
  width: 72px;
  height: 12px;
  margin: 0 auto 12px;
}

.sk-section-title {
  width: 140px;
  height: 28px;
  margin: 0 auto 36px;
}

.sk-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  min-height: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.sk-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.sk-line {
  width: 100%;
  height: 12px;
}

.sk-line--md {
  width: 55%;
  height: 16px;
  margin-top: 4px;
}

.sk-line--short {
  width: 72%;
}

.sk-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 12px;
}

.sk-badge-row {
  width: 160px;
  height: 26px;
  border-radius: 6px;
}

.sk-qr {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  flex-shrink: 0;
}

@keyframes sk-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk {
    animation: none;
    opacity: 0.75;
  }
}

#home-root.is-ready > *:not(.home-skeleton) {
  animation: home-fade-in 0.35s ease;
}

@keyframes home-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #home-root.is-ready > *:not(.home-skeleton) {
    animation: none;
  }
}

a {
  color: var(--blue-dark);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--pink);
}

.container {
  width: min(100% - 48px, var(--max-width));
  margin-inline: auto;
}

.site-header {
  padding: 72px 0 48px;
  text-align: center;
}

.site-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}

.site-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
}

.site-header h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text);
}

.site-header h1 .gradient {
  color: var(--pink);
}

.site-header .lead {
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 137, 171, 0.28);
}

.btn-primary:hover {
  color: #fff;
  background: var(--pink-hover);
  box-shadow: 0 8px 20px rgba(77, 146, 208, 0.22);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
}

.apps-section {
  padding: 24px 0 80px;
}

.section-label {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 8px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  margin-bottom: 36px;
  color: var(--text);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(106, 168, 224, 0.4);
}

.app-card.current {
  border-color: var(--pink);
  background: var(--bg-card);
  box-shadow: 0 8px 28px rgba(232, 137, 171, 0.16), inset 0 3px 0 var(--pink);
}

.app-card.current:hover {
  border-color: var(--pink-hover);
  box-shadow: 0 12px 36px rgba(232, 137, 171, 0.22), inset 0 3px 0 var(--pink-hover);
}

.app-card.current::before {
  content: "博主推荐";
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--pink);
  box-shadow: 0 2px 8px rgba(232, 137, 171, 0.35);
}

.app-card--logo {
  padding-top: 0;
  overflow: hidden;
}

.app-card--logo .app-icon-logo {
  width: calc(100% + 56px);
  max-width: none;
  margin: 0 -28px 20px;
  min-height: 72px;
  padding: 18px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--blue-soft);
}

.app-card--logo .app-icon-logo--wordmark img {
  height: 38px;
}

.app-card--logo .app-icon-logo--icon {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.app-card--logo .app-icon-logo--with-text img {
  flex-shrink: 0;
}

.app-card--logo .app-icon-logo--icon img {
  height: 44px;
  width: 44px;
  object-fit: contain;
}

.app-card--logo .app-icon-logo--text {
  justify-content: flex-start;
  align-items: center;
}

.app-card.current.app-card--logo .app-icon-logo {
  background: var(--pink-soft);
  border-bottom-color: rgba(232, 137, 171, 0.28);
  padding-right: 96px;
}

.app-logo-text {
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.app-card.current .app-logo-text {
  color: var(--pink);
}

.app-card.current .app-tag {
  color: var(--pink);
}

.app-card.current .app-link {
  color: var(--pink);
}

.app-card.current .app-link:hover,
.app-card.current .app-link--secondary:hover {
  color: var(--pink-hover);
}

.app-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 14px;
  font-size: 26px;
  background: var(--blue-soft);
}

.app-icon-logo {
  width: fit-content;
  max-width: 100%;
  height: 52px;
  padding: 8px 12px;
  background: var(--blue-soft);
  border: 1px solid var(--border);
}

.app-icon img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.app-tag {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-dark);
}

.app-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-card p {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.app-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}

.app-card-footer-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* Findu 风格商店徽章：App Store / Android APK */
.app-store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.store-badge {
  display: inline-block;
  width: 76px;
  height: 26px;
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  line-height: 0;
  background: #3a3a3a;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 2px 8px rgba(61, 79, 102, 0.1);
}

.store-badge img {
  display: block;
  width: 76px;
  height: 26px;
  object-fit: cover;
}

.store-badge:hover {
  transform: translateY(-1px);
  opacity: 0.92;
  box-shadow: 0 4px 12px rgba(61, 79, 102, 0.14);
}

.store-badge--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 64px;
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 650;
  line-height: 26px;
  color: #fff;
  background: #3a3a3a;
}

.store-badge--text:hover {
  color: #fff;
}

.app-card-footer .app-link {
  flex: 0 1 auto;
  min-width: 0;
}

.app-card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.app-link--secondary {
  font-weight: 600;
  color: var(--text-secondary);
}

.app-link--secondary:hover {
  color: var(--pink);
}

.app-qr {
  flex-shrink: 0;
  text-align: center;
}

.app-qr img {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 4px;
  background: #fff;
}

.app-qr-caption {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.app-link::after {
  content: "→";
  transition: transform 0.2s;
}

.app-card:hover .app-link::after {
  transform: translateX(4px);
}

.site-footer {
  padding: 32px 0 48px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
}

.site-footer p + p {
  margin-top: 8px;
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 48px;
  }

  .app-card.current.app-card--logo .app-icon-logo {
    padding-right: 88px;
  }
}
