/* 嵩沈科技活动 H5 - 公用样式 */
:root {
  --primary: #186c86;
  --deep: #264153;
  --muted: #52646e;
  --primary-cyan: #186c86;
  --primary-blue: #264153;
  --deep-blue: #264153;
  --text-primary: #264153;
  --text-secondary: #52646e;
  --text-light: #52646e;
  --bg-page: #f5f9fa;
  --bg-white: #FFFFFF;
  --border-color: #E2E8EC;
  --status-active: #186c86;
  --status-ended: #9E9E9E;
  --price-red: #E53935;
  --shadow-card: 0 2px 12px rgba(38, 65, 83, 0.08);
  --shadow-nav: 0 -2px 10px rgba(0, 0, 0, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 50px;
  --nav-height: 60px;
  --header-height: 48px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input {
  font-family: inherit;
  outline: none;
}

/* 页面容器 */
.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-page);
  position: relative;
}

.page.has-tabbar {
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
}

.page.has-actionbar {
  padding-bottom: calc(80px + var(--safe-bottom));
}

/* 顶部导航 */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-back {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.header-back svg {
  width: 20px;
  height: 20px;
}

/* 搜索栏 */
.search-bar {
  padding: 12px 16px;
  background: var(--bg-white);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-page);
  border-radius: var(--radius-pill);
  padding: 0 16px;
  height: 42px;
  gap: 10px;
}

.search-input-wrap svg {
  width: 20px;
  height: 20px;
  color: var(--text-light);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-light);
}

/* Banner */
.banner {
  margin: 0 16px 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--primary);
  padding: 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
}

.banner-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.banner-content p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.banner-btn {
  flex-shrink: 0;
  background: #fff;
  color: var(--primary-blue);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* 区块标题 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 18px;
  margin-top: 4px;
  position: relative;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.filter-wrap {
  position: relative;
}

.section-more {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
}

.section-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.section-more.open svg {
  transform: rotate(180deg);
}

.filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(38, 65, 83, 0.15);
  border: 1px solid var(--border-color);
  overflow: hidden;
  z-index: 150;
}

.filter-dropdown.hidden {
  display: none;
}

.filter-option {
  display: block;
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--text-primary);
  text-align: left;
  background: var(--bg-white);
  border: none;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.filter-option:last-child {
  border-bottom: none;
}

.filter-option.active {
  color: var(--primary);
  font-weight: 600;
}

.filter-option.cancel {
  color: var(--text-secondary);
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.filter-option:active {
  background: var(--bg-page);
}

.filter-mask {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: transparent;
}

.filter-mask.hidden {
  display: none;
}

/* 活动卡片列表 */
.activity-list {
  padding: 0 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.activity-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: block;
  transition: transform 0.15s;
}

.activity-card:active {
  transform: scale(0.98);
}

.activity-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.activity-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.status-badge.active {
  background: var(--status-active);
}

.status-badge.ended {
  background: var(--status-ended);
}

.status-badge.full {
  background: var(--muted);
}

.participant-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 4px;
}

.participant-count svg {
  width: 14px;
  height: 14px;
}

.activity-card-body {
  padding: 14px 16px 16px;
}

.activity-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-meta {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.activity-meta:last-child {
  margin-bottom: 0;
}

.activity-meta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--primary);
}

/* 底部导航 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-white);
  border-top: 1px solid var(--border-color);
  box-shadow: var(--shadow-nav);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
}

.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0;
  color: var(--text-light);
  font-size: 12px;
  transition: color 0.2s;
}

.tabbar-item.active {
  color: var(--primary);
}

.tabbar-item svg {
  width: 26px;
  height: 26px;
}

/* 详情页 */
.detail-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  background: var(--bg-white);
  padding: 18px 16px;
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 14px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.tag {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

.tag.status-active {
  background: var(--status-active);
  color: #fff;
}

.tag.status-ended {
  background: var(--status-ended);
  color: #fff;
}

.tag.status-full {
  background: var(--muted);
  color: #fff;
}

.tag.type {
  background: #F0F4F8;
  color: var(--text-secondary);
}

/* 详情区块 */
.detail-section {
  background: var(--bg-white);
  margin-top: 10px;
  padding: 18px 16px;
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
}

.detail-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.detail-content img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.detail-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* 报名信息 */
.info-list {
  display: flex;
  flex-direction: column;
}

.info-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-item:first-child {
  padding-top: 4px;
}

.info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #EEF1F3;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-icon svg {
  width: 18px;
  height: 18px;
  color: #8A9AA3;
}

.info-body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.info-label {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 36px;
  margin-bottom: 6px;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.info-item--location .info-label {
  margin-bottom: 10px;
}

.info-item--people .info-label {
  margin-bottom: 10px;
}

.info-value {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.info-value.price {
  font-size: 28px;
  font-weight: 700;
  color: var(--price-red);
  line-height: 1.3;
  margin-top: -2px;
}

.info-value.price small {
  font-size: 17px;
  font-weight: 600;
}

.location-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.location-map-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #EEF1F3;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.location-map-btn svg {
  width: 18px;
  height: 18px;
  color: #8A9AA3;
}

.map-hint {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

.avatar-row {
  display: flex;
  align-items: center;
  margin-top: 0;
  max-width: 100%;
  overflow: hidden;
  flex-wrap: nowrap;
}

.avatar-row img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-row img:first-child {
  margin-left: 0;
}

.avatar-more {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #EEF1F3;
  border: 2px solid #fff;
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* 主办方 */
.organizer-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 20px;
}

.organizer-logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.organizer-logo {
  width: 130px;
  height: 48px;
  object-fit: cover;
  object-position: left center;
  max-width: none;
}

.organizer-info {
  flex: 1;
  min-width: 0;
}

.organizer-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.organizer-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

.organizer-arrow svg {
  width: 16px;
  height: 16px;
  color: var(--text-light);
}

/* 底部操作栏 */
.action-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: var(--bg-white);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  z-index: 200;
}

.btn-share {
  flex: 0 0 32%;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn-share svg {
  width: 18px;
  height: 18px;
}

.btn-register {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.btn-register.disabled {
  background: var(--status-ended);
  border-color: var(--status-ended);
  pointer-events: none;
}

/* 弹窗遮罩 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.center {
  align-items: center;
  padding: 20px;
}

/* 报名弹窗 */
.register-modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 20px calc(20px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.3s;
}

.modal-overlay.show .register-modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F0F4F8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.modal-close svg {
  width: 14px;
  height: 14px;
}

/* 表单 */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: block;
}

.form-label .required {
  color: var(--price-red);
  margin-left: 2px;
}

.form-input {
  width: 100%;
  height: 48px;
  background: var(--bg-page);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 15px;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
  background: #fff;
}

.form-input::placeholder {
  color: var(--text-light);
}

.btn-submit {
  width: 100%;
  height: 50px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  margin-top: 8px;
}

/* 成功弹窗 */
.success-modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px 24px 24px;
  text-align: center;
  width: 280px;
  transform: scale(0.8);
  transition: transform 0.3s;
}

.modal-overlay.show .success-modal {
  transform: scale(1);
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(24, 108, 134, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.success-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.success-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.btn-confirm {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

/* 我的页面 */
.mine-header {
  background: var(--primary);
  padding: 40px 20px 30px;
  text-align: center;
  color: #fff;
}

.mine-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.mine-avatar svg {
  width: 36px;
  height: 36px;
  color: #fff;
}

.mine-name {
  font-size: 20px;
  font-weight: 600;
}

.mine-menu {
  margin: 16px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.mine-menu-item {
  display: flex;
  align-items: center;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 16px;
}

.mine-menu-item:last-child {
  border-bottom: none;
}

.mine-menu-item svg {
  width: 22px;
  height: 22px;
  margin-right: 12px;
  color: var(--primary);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 15px;
}

/* 隐藏 */
.hidden {
  display: none !important;
}

/* 分享海报页 */
.page-share {
  background: #E8ECF0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.share-preview {
  flex: 1;
  padding: 16px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.share-poster {
  width: 100%;
  max-width: 300px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(38, 65, 83, 0.15);
}

.share-panel {
  background: var(--bg-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 16px calc(16px + var(--safe-bottom));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.share-panel-title {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.share-styles {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.share-style-item {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
}

.share-style-item.active {
  border-color: var(--primary);
}

.share-style-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-style-check {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-style-check svg {
  width: 10px;
  height: 10px;
  color: #fff;
}

.btn-save-poster {
  width: 100%;
  height: 50px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
}

.btn-save-poster svg {
  width: 20px;
  height: 20px;
}

/* 客服页 */
.page-service {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.service-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}

.service-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 32px;
}

.service-qrcode {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  object-fit: contain;
  background: #fff;
  padding: 12px;
}

/* 分享海报弹窗（详情页内） */
.share-modal {
  max-height: 88vh;
  overflow-y: auto;
}

.share-modal .share-preview {
  padding: 8px 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-modal .share-poster {
  display: block;
  width: auto;
  max-width: 260px;
  max-height: 46vh;
  height: auto;
}

.share-modal .share-panel-title {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* 布尔报名字段（开关式复选） */
.form-label--switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-switch {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}
