/* 沧缘 H5 - 移动端相亲应用 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #FF6B6B;
  --primary-light: #FF8E8E;
  --primary-dark: #E55555;
  --secondary: #FFD93D;
  --accent: #6BCB77;
  --bg: #F8F8FA;
  --card: #FFFFFF;
  --text: #2D3436;
  --text-secondary: #636E72;
  --text-light: #B2BEC3;
  --border: #E8E8E8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  padding-bottom: 70px;
}

/* 页面切换 */
.page {
  display: none;
  min-height: calc(100vh - 70px);
  animation: fadeIn 0.3s ease;
}
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 顶部导航 */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(255,107,107,0.3);
}
.header h1 { font-size: 18px; font-weight: 600; }
.header .icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
}

/* 底部导航 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: white;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 12px;
  border-top: 1px solid var(--border);
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s;
  padding: 4px 0;
}
.tab-item.active { color: var(--primary); }
.tab-item .icon { font-size: 22px; margin-bottom: 2px; }
.tab-item .label { font-size: 11px; }

/* 卡片通用 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 12px 16px;
  overflow: hidden;
}

/* 首页 - Banner */
.banner {
  margin: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #FF6B6B, #FFD93D);
  padding: 24px 20px;
  color: white;
  position: relative;
  overflow: hidden;
}
.banner::after {
  content: '💕';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  opacity: 0.3;
}
.banner h2 { font-size: 20px; margin-bottom: 6px; }
.banner p { font-size: 13px; opacity: 0.9; }

/* 首页 - 快捷入口 */
.quick-actions {
  display: flex;
  justify-content: space-around;
  padding: 16px;
  background: white;
  margin: 0 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.quick-item .icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 6px;
}
.quick-item .label { font-size: 12px; color: var(--text-secondary); }

/* 相亲卡 - 卡片式浏览 */
.swipe-container {
  padding: 16px;
  position: relative;
  height: calc(100vh - 200px);
  min-height: 480px;
}
.profile-card {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease;
  cursor: grab;
  user-select: none;
}
.profile-card.dragging { transition: none; cursor: grabbing; }
.profile-card.swiped-left { transform: translateX(-150%) rotate(-20deg); opacity: 0; }
.profile-card.swiped-right { transform: translateX(150%) rotate(20deg); opacity: 0; }

.profile-photo {
  width: 100%;
  height: 320px;
  background: linear-gradient(135deg, #FFE0E0, #FFF0E0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  position: relative;
}
.profile-photo .online-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(107,203,119,0.9);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
}
.profile-info {
  padding: 16px;
}
.profile-info .name-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.profile-info .name { font-size: 20px; font-weight: 600; margin-right: 8px; }
.profile-info .age { font-size: 16px; color: var(--text-secondary); }
.profile-info .verified { color: var(--accent); font-size: 14px; margin-left: 6px; }
.profile-info .location {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
}
.profile-info .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.profile-info .tag {
  background: #FFF0F0;
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
}
.profile-info .bio {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 操作按钮 */
.swipe-actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px;
  position: absolute;
  bottom: 90px;
  left: 0;
  right: 0;
}
.action-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s;
  border: none;
}
.action-btn:active { transform: scale(0.9); }
.action-btn.dislike { background: white; color: #FF6B6B; }
.action-btn.superlike { background: white; color: #4ECDC4; width: 48px; height: 48px; font-size: 20px; }
.action-btn.like { background: linear-gradient(135deg, #FF6B6B, #FF8E8E); color: white; }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.empty-state .icon { font-size: 60px; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p { font-size: 13px; }

/* 活动列表 */
.activity-list { padding: 12px 16px; }
.activity-item {
  background: white;
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}
.activity-item:active { transform: scale(0.98); }
.activity-cover {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #FFE0E0, #FFF0E0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}
.activity-cover .status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,107,107,0.9);
  color: white;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
}
.activity-body { padding: 12px 14px; }
.activity-body .title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.activity-body .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}
.activity-body .price {
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
}
.activity-body .price.free { color: var(--accent); }

/* 个人中心 */
.profile-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 30px 20px 50px;
  color: white;
  position: relative;
}
.profile-header .avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 12px;
  border: 3px solid rgba(255,255,255,0.3);
}
.profile-header .name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.profile-header .desc { font-size: 13px; opacity: 0.9; }
.profile-header .edit-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
}

.profile-menu {
  margin: -30px 16px 16px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #F8F8FA; }
.menu-item .icon { font-size: 20px; margin-right: 12px; width: 24px; text-align: center; }
.menu-item .label { flex: 1; font-size: 14px; }
.menu-item .arrow { color: var(--text-light); font-size: 14px; }
.menu-item .badge {
  background: var(--primary);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  margin-right: 8px;
}

/* 会员卡片 */
.vip-card {
  margin: 16px;
  background: linear-gradient(135deg, #2D3436, #636E72);
  border-radius: var(--radius);
  padding: 18px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.vip-card .left .title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.vip-card .left .desc { font-size: 12px; opacity: 0.8; }
.vip-card .right {
  background: var(--secondary);
  color: #2D3436;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
}

/* 登录页 */
.login-page {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 40%, var(--bg) 40%);
  padding: 60px 30px 30px;
}
.login-logo {
  text-align: center;
  margin-bottom: 40px;
}
.login-logo .icon { font-size: 64px; margin-bottom: 12px; }
.login-logo h1 { color: white; font-size: 28px; margin-bottom: 6px; }
.login-logo p { color: rgba(255,255,255,0.9); font-size: 14px; }

.login-form {
  background: white;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--primary); }
.form-group .code-row { display: flex; gap: 10px; }
.form-group .code-row input { flex: 1; }
.form-group .code-btn {
  padding: 0 16px;
  background: #FFF0F0;
  color: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.form-group .code-btn:disabled { color: var(--text-light); cursor: not-allowed; }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:active { opacity: 0.9; }

.login-divider {
  text-align: center;
  margin: 20px 0;
  color: var(--text-light);
  font-size: 12px;
  position: relative;
}
.login-divider::before, .login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }

.wechat-login {
  width: 100%;
  padding: 12px;
  background: #07C160;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-agreement {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-light);
}
.login-agreement a { color: var(--primary); text-decoration: none; }

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}
.loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 匹配成功弹窗 */
.match-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 30px;
}
.match-modal.show { display: flex; }
.match-content {
  background: white;
  border-radius: 20px;
  padding: 30px 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  animation: popIn 0.4s ease;
}
@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
.match-content .hearts { font-size: 48px; margin-bottom: 12px; }
.match-content h2 { font-size: 22px; color: var(--primary); margin-bottom: 8px; }
.match-content p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.match-avatars {
  display: flex;
  justify-content: center;
  gap: -20px;
  margin-bottom: 20px;
}
.match-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFE0E0, #FFF0E0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.match-avatar:first-child { transform: translateX(10px); }
.match-avatar:last-child { transform: translateX(-10px); }
.match-btns { display: flex; gap: 10px; }
.match-btns button {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  border: none;
}
.match-btns .btn-chat { background: var(--primary); color: white; }
.match-btns .btn-later { background: var(--bg); color: var(--text-secondary); }

/* 活动详情 */
.activity-detail { padding-bottom: 80px; }
.activity-detail-cover {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #FFE0E0, #FFF0E0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}
.activity-detail-body { padding: 16px; }
.activity-detail-body h2 { font-size: 18px; margin-bottom: 12px; }
.activity-detail-meta {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 16px;
}
.activity-detail-meta .row {
  display: flex;
  padding: 6px 0;
  font-size: 13px;
}
.activity-detail-meta .row .label {
  width: 60px;
  color: var(--text-secondary);
}
.activity-detail-meta .row .value { flex: 1; }
.activity-detail-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.activity-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  z-index: 100;
}
.activity-bottom-bar .price { font-size: 20px; color: var(--primary); font-weight: 600; }
.activity-bottom-bar .price small { font-size: 12px; font-weight: 400; }
.activity-bottom-bar .signup-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* 首页推荐 - mini卡片 */
.profile-card-mini {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.2s;
}
.profile-card-mini:active { transform: scale(0.98); }
.mini-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFE0E0, #FFF0E0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-right: 12px;
  flex-shrink: 0;
}
.mini-info { flex: 1; min-width: 0; }
.mini-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.mini-age {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}
.mini-loc {
  font-size: 12px;
  color: var(--text-light);
}

/* 安全提示 */
.safety-tip {
  margin: 16px;
  padding: 12px 14px;
  background: #FFF9E6;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #B8860B;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.safety-tip .icon { flex-shrink: 0; }
