/* ============================================
   心遇 - 社交产品暖色调视觉系统
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
  /* 主色 - 珊瑚暖调 */
  --primary: #E8646A;
  --primary-light: #F09DA1;
  --primary-dark: #C94C52;
  --primary-gradient: linear-gradient(135deg, #E8646A 0%, #F2A07B 100%);

  /* 辅助色 */
  --accent: #F2A07B;
  --accent-light: #F8C4A2;
  --gold: #E6A23C;

  /* 中性色 */
  --bg-primary: #FFFAF7;
  --bg-secondary: #FFF5EE;
  --bg-card: #FFFFFF;
  --bg-overlay: rgba(232, 100, 106, 0.06);

  --text-primary: #2D2D2D;
  --text-secondary: #6B6B6B;
  --text-muted: #9B9B9B;
  --text-inverse: #FFFFFF;

  --border-light: rgba(232, 100, 106, 0.12);
  --border-medium: rgba(0, 0, 0, 0.08);

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(232, 100, 106, 0.1);
  --shadow-lg: 0 8px 30px rgba(232, 100, 106, 0.15);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 28px rgba(232, 100, 106, 0.18);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;

  /* 动画 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 500ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- 导航栏 ---------- */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(255, 250, 247, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--duration-normal) var(--ease-out);
}

.nav-bar.scrolled {
  background: rgba(255, 250, 247, 0.96);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 24px;
  color: var(--primary);
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 0;
  position: relative;
  transition: color var(--duration-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 1px;
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.btn-login {
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast);
}

.btn-login:hover {
  background: var(--primary);
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  background: rgba(232, 100, 106, 0.08);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  border: 1.5px solid transparent;
  transition: all var(--duration-fast);
}

.lang-switch:hover {
  border-color: var(--primary-light);
  background: rgba(232, 100, 106, 0.14);
}

.lang-switch-item {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  transition: all var(--duration-fast);
  line-height: 1;
}

.lang-switch-item.active {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 6px rgba(232, 100, 106, 0.3);
}

/* ---------- Hero 区域 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  overflow: hidden;
  background: linear-gradient(160deg, #FFFAF7 0%, #FFF0E8 40%, #FFE4DB 70%, #FFD6CA 100%);
}

.hero-bg-photo {
  position: absolute;
  inset: 0;
  background: url('../assets/53ccb37d-9cbe-4749-be89-f1461088360b.png') center center / cover no-repeat;
  filter: blur(3px) brightness(1.05);
  opacity: 0.85;
  transform: scale(1.02);
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 100, 106, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(242, 160, 123, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(232, 100, 106, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(242, 160, 123, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
}

.hero-title {
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-subtitle {
  font-size: clamp(16px, 3vw, 20px);
  color: var(--text-secondary);
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.4s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s var(--ease-out) 0.6s forwards;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-light);
}

/* CTA 主按钮 */
.btn-cta {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 20px 52px;
  background: var(--primary-gradient);
  border-radius: var(--radius-xl);
  box-shadow: 0 6px 24px rgba(232, 100, 106, 0.35);
  transition: all var(--duration-normal) var(--ease-spring);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s var(--ease-out) 0.8s forwards;
}

.btn-cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 36px rgba(232, 100, 106, 0.45);
}

.btn-cta:active {
  transform: translateY(0) scale(0.98);
}

.btn-cta-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-inverse);
  letter-spacing: 2px;
}

.btn-cta-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1px;
}

.btn-cta-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.7);
  transition: transform var(--duration-fast);
}

.btn-cta:hover .btn-cta-arrow {
  transform: translateY(-50%) translateX(4px);
}

.btn-cta-secondary {
  padding: 16px 44px;
  animation: none;
  opacity: 1;
  transform: none;
}

.btn-cta-secondary .btn-cta-text {
  font-size: 17px;
}

/* 滚动提示 */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1.2s forwards;
}

.hero-scroll-hint svg {
  width: 16px;
  height: 16px;
  animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- 发现区 ---------- */
.discover-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

/* 筛选条 */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast);
}

.filter-tag:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.filter-tag.active {
  background: var(--primary-gradient);
  color: var(--text-inverse);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(232, 100, 106, 0.25);
}

/* ---------- 瀑布流 ---------- */
.waterfall {
  columns: 2;
  column-gap: 16px;
}

@media (min-width: 640px) {
  .waterfall { columns: 3; column-gap: 20px; }
}

@media (min-width: 1024px) {
  .waterfall { columns: 4; column-gap: 20px; }
}

/* 用户卡片 */
.user-card {
  break-inside: avoid;
  margin-bottom: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
}

.user-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.user-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.card-photo {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 20%;
  transition: transform var(--duration-slow) var(--ease-out);
}

.user-card:hover .card-photo img {
  transform: scale(1.05);
}

.card-online {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 11px;
  color: #fff;
}

.online-dot {
  width: 6px;
  height: 6px;
  background: #4ADE80;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.card-info {
  padding: 14px;
}

.card-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-age {
  font-size: 13px;
  color: var(--text-muted);
}

.card-distance {
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 8px;
}

.card-status {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tag {
  padding: 3px 10px;
  font-size: 11px;
  color: var(--primary);
  background: var(--bg-overlay);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* 加载更多 */
.load-more {
  text-align: center;
  margin-top: 40px;
}

.btn-load-more {
  padding: 12px 36px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast);
}

.btn-load-more:hover {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* ---------- 功能介绍 ---------- */
.features-section {
  background: var(--bg-secondary);
  padding: 80px 24px;
}

.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.feature-card {
  background: var(--bg-card);
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-overlay);
  border-radius: var(--radius-md);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

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

/* ---------- 动态区 ---------- */
.moments-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

.moments-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
}

.moments-scroll::-webkit-scrollbar {
  height: 4px;
}

.moments-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.moments-scroll::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 2px;
}

.moment-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.moment-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.moment-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.moment-content {
  padding: 14px;
}

.moment-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.moment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  background: var(--bg-secondary);
}

.moment-user-info {
  flex: 1;
}

.moment-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.moment-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.moment-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.moment-location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--primary);
}

.moment-location svg {
  width: 14px;
  height: 14px;
}

/* ---------- CTA 底部 ---------- */
.cta-section {
  padding: 80px 24px;
  background: var(--primary-gradient);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -10%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}

.cta-inner {
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 800;
  color: var(--text-inverse);
  margin-bottom: 12px;
}

.cta-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
}

.btn-cta-secondary {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.btn-cta-secondary:hover {
  background: #FFFFFF;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.btn-cta-secondary .btn-cta-text {
  color: var(--primary-dark);
}

.btn-cta-secondary .btn-cta-arrow {
  color: var(--primary);
}

.btn-cta-secondary:hover .btn-cta-text {
  color: var(--primary-dark);
}

/* ---------- Footer ---------- */
.footer {
  background: #1A1A1A;
  padding: 48px 24px 32px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.footer-brand .logo-icon {
  color: var(--primary);
  animation: none;
}

.footer-brand .logo-text {
  color: #fff;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--duration-fast);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
}

/* ---------- 登录弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 92%;
  max-width: 420px;
  padding: 32px 24px;
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: transform var(--duration-normal) var(--ease-spring);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-height: 92vh;
  overflow-y: auto;
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  font-size: 22px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--duration-fast);
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-header .logo-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 10px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.modal-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Tab 切换 ---------- */
.auth-tabs {
  display: flex;
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all var(--duration-fast);
  position: relative;
  z-index: 1;
}

.auth-tab:hover {
  color: var(--text-secondary);
}

.auth-tab.active {
  color: var(--primary-dark);
  background: var(--bg-card);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.auth-tab-indicator {
  display: none;
}

/* ---------- 表单区 ---------- */
.auth-form {
  display: block;
  margin-top: 20px;
}

.auth-form-hidden {
  display: none;
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-group input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 100, 106, 0.1);
}

.input-group input.input-invalid {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.input-group input.input-valid {
  border-color: #4ADE80;
}

.input-error {
  display: block;
  min-height: 18px;
  font-size: 12px;
  color: #EF4444;
  margin-top: 4px;
  line-height: 1.4;
  transition: opacity var(--duration-fast);
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row input {
  flex: 1;
}

.input-row-password {
  position: relative;
}

.input-row-password input {
  padding-right: 44px;
}

.btn-toggle-pwd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color var(--duration-fast);
}

.btn-toggle-pwd:hover {
  color: var(--text-primary);
}

.btn-toggle-pwd .icon-eye-off {
  display: none;
}

.btn-toggle-pwd.showing .icon-eye {
  display: none;
}

.btn-toggle-pwd.showing .icon-eye-off {
  display: block;
}

.btn-toggle-pwd svg {
  width: 18px;
  height: 18px;
}

.btn-code {
  flex-shrink: 0;
  padding: 0 14px;
  height: 44px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all var(--duration-fast);
}

.btn-code:hover {
  background: var(--primary);
  color: var(--text-inverse);
}

.btn-code:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: none;
  color: var(--text-muted);
  border-color: var(--border-medium);
}

.btn-submit {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-inverse);
  background: var(--primary-gradient);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
  letter-spacing: 1px;
}

.btn-submit:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.modal-agreement {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.modal-agreement a {
  color: var(--primary);
}

/* ---------- 已登录导航按钮 ---------- */
.btn-user-center {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 6px;
  background: var(--bg-overlay);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-light);
  transition: all var(--duration-fast);
}

.btn-user-center:hover {
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
}

.user-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-name-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 100px 20px 50px; }
  .hero-stats { gap: 16px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 11px; }
  .btn-cta { padding: 16px 36px; }
  .btn-cta-text { font-size: 17px; }
  .discover-section { padding: 60px 16px 40px; }
  .waterfall { columns: 2; column-gap: 12px; }
  .user-card { margin-bottom: 12px; }
  .card-info { padding: 12px; }
  .card-name { font-size: 14px; }
  .card-status { font-size: 12px; }
  .feature-card { padding: 20px 16px; }
  .moment-card { flex: 0 0 240px; }
  .modal-card { padding: 24px 18px; }
  .auth-tab { font-size: 13px; padding: 9px 0; }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .nav-links { gap: 20px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== 资料预览弹窗 ========== */
.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.profile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.profile-card {
  position: relative;
  width: 92%;
  max-width: 420px;
  max-height: 92vh;
  background: var(--bg-primary);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(232, 100, 106, 0.18), 0 4px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateY(40px) scale(0.95);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}
.profile-card-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.profile-overlay.active .profile-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.profile-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 20px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.profile-close:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: scale(1.1);
}

/* 照片区 */
.profile-photo-wrap {
  position: relative;
  width: 100%;
  height: 320px;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.profile-photo-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to top, var(--bg-primary) 0%, transparent 100%);
  pointer-events: none;
}

/* 信息区 */
.profile-info {
  padding: 0 24px 20px;
  margin-top: -48px;
  position: relative;
  z-index: 2;
}
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.profile-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.profile-age {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(232, 100, 106, 0.1);
  padding: 2px 10px;
  border-radius: 20px;
}
.profile-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.profile-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.profile-distance {
  display: flex;
  align-items: center;
  gap: 4px;
}
.profile-distance::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center/contain no-repeat;
}
.profile-online {
  color: #52c41a;
  font-weight: 600;
}
.profile-online::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52c41a;
  margin-right: 4px;
  animation: onlinePulse 2s ease-in-out infinite;
}
@keyframes onlinePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.profile-bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-tags .profile-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(232, 100, 106, 0.08);
  color: var(--primary);
  border: 1px solid rgba(232, 100, 106, 0.15);
}

/* 操作区 */
.profile-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 28px;
  flex-shrink: 0;
  background: var(--bg-primary);
  border-top: 1px solid rgba(232, 100, 106, 0.08);
}
.btn-greet {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
  box-shadow: 0 4px 16px rgba(232, 100, 106, 0.3);
}
.btn-greet:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232, 100, 106, 0.4);
}
.btn-greet:active {
  transform: translateY(0) scale(0.97);
}
.btn-greet-icon {
  width: 20px;
  height: 20px;
}

.btn-heart {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, border-color 0.2s;
}
.btn-heart svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
  fill: none;
  transition: fill 0.3s, stroke 0.3s;
}
.btn-heart:hover {
  transform: scale(1.1);
  border-color: var(--primary);
  background: rgba(232, 100, 106, 0.06);
}
.btn-heart.liked {
  background: var(--primary);
  border-color: var(--primary);
  animation: heartPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-heart.liked svg {
  stroke: #fff;
  fill: #fff;
}
@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* 心动提示 */
.heart-toast {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, var(--primary) 0%, #d94f55 100%);
  color: #fff;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(232, 100, 106, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.3s;
  z-index: 10;
  pointer-events: none;
}
.heart-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.heart-toast-icon {
  display: inline-block;
  animation: heartBeat 1.2s ease-in-out infinite;
  margin-right: 4px;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
}

/* 资料预览弹窗移动端适配 */
@media (max-width: 480px) {
  .profile-card {
    width: 96%;
    max-height: 95vh;
    border-radius: 20px;
  }
  .profile-photo-wrap {
    height: 280px;
  }
  .profile-info {
    padding: 0 20px 16px;
  }
  .profile-name {
    font-size: 20px;
  }
  .profile-actions {
    padding: 12px 20px 24px;
  }
  .btn-greet {
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 14px;
  }
  .btn-heart {
    width: 48px;
    height: 48px;
  }
  .heart-toast {
    bottom: 80px;
    font-size: 12px;
    padding: 10px 16px;
  }
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

/* ---------- 选中文本色 ---------- */
::selection {
  background: var(--primary-light);
  color: var(--text-primary);
}
