/* 景区语音导览 H5 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: #333;
  background: #f5f5f5;
  height: 100%;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* 颜色变量 */
:root {
  --primary: #4A90D9;
  --primary-dark: #3A7BC8;
  --secondary: #FF6B6B;
  --success: #52C41A;
  --warning: #FAAD14;
  --text: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --bg: #f5f5f5;
  --card-bg: #ffffff;
  --border: #eeeeee;
}

/* 顶部导航 */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #16284B 0%, #24406F 100%);
  color: #fff;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(74,144,217,0.3);
}

.header .back-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header .title {
  font-size: 16px;
  font-weight: 600;
}

/* 底部Tab栏 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  display: flex;
  border-top: 1px solid #eee;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.tabbar .tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s;
}

.tabbar .tab .icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.tabbar .tab .label {
  font-size: 11px;
}

.tabbar .tab.active {
  color: var(--primary);
}

.tabbar .tab:not(.active) {
  color: #999;
}

/* 主内容区 */
.main {
  padding-bottom: 70px;
  min-height: 100vh;
}

/* 景区卡片 */
.scenic-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scenic-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  cursor: pointer;
  transition: transform 0.2s;
}

.scenic-card:active {
  transform: scale(0.98);
}

.scenic-card .cover {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e8f0fe, #d6e4ff);
  overflow: hidden;
}

.scenic-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scenic-card .cover-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: linear-gradient(135deg, #e8f0fe, #d6e4ff);
}

.scenic-card .info {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.scenic-card .name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.scenic-card .meta {
  font-size: 12px;
  color: #999;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scenic-card .bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.scenic-card .price {
  color: var(--secondary);
  font-weight: 600;
  font-size: 15px;
}

.scenic-card .price small {
  font-size: 11px;
  font-weight: 400;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.tag-locked {
  background: #f0f0f0;
  color: #999;
}

.tag-unlocked {
  background: #e6f7e6;
  color: var(--success);
}

/* 景区详情 */
.scenic-hero {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #ddd;
}

.scenic-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scenic-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
}

.scenic-hero .hero-title {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  z-index: 1;
}

.scenic-content {
  background: #fff;
  padding: 16px;
  margin-bottom: 12px;
}

.scenic-content h3 {
  font-size: 15px;
  margin-bottom: 8px;
  color: #333;
}

.scenic-content p {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
}

/* 景点列表 */
.spot-section {
  background: #fff;
  margin-bottom: 12px;
}

.spot-section .section-title {
  padding: 16px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
}

.spot-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
}

.spot-item:last-child { border-bottom: none; }

.spot-item .spot-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f0fe, #d6e4ff);
  margin-right: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spot-item .spot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spot-item .spot-thumb-ph {
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
}

.spot-item .spot-body {
  flex: 1;
  min-width: 0;
}

.spot-item .spot-name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spot-item .spot-meta {
  font-size: 12px;
  color: #999;
}

.spot-item .arrow {
  color: #ccc;
  font-size: 18px;
}

/* 景点详情 */
.spot-detail {
  background: #fff;
  min-height: 100vh;
}

.spot-detail .spot-image {
  width: 100%;
  height: 220px;
  background: #f0f0f0;
}

.spot-detail .spot-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spot-detail .spot-title {
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
}

/* 音频播放器 */
.audio-player {
  margin: 16px;
  background: linear-gradient(135deg, #16284B 0%, #24406F 100%);
  border-radius: 16px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(74,144,217,0.3);
}

.audio-player .player-top {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.audio-player .play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  border: none;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}

.audio-player .play-btn:active { transform: scale(0.95); }

.audio-player .play-btn.playing {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
  50% { box-shadow: 0 4px 20px rgba(255,255,255,0.5); }
}

.audio-player .audio-title {
  font-size: 15px;
  flex: 1;
}

.audio-player .progress-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-player .time {
  font-size: 12px;
  min-width: 32px;
  text-align: center;
}

.audio-player .progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.audio-player .progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 0;
  transition: width 0.1s;
}

.audio-player .progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  left: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.audio-player .player-controls {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 16px;
}

.audio-player .ctrl-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

/* 锁定态遮罩 */
.locked-mask {
  background: rgba(0,0,0,0.03);
  backdrop-filter: blur(4px);
  border-radius: 16px;
}

/* 文字解说 */
.description-section {
  padding: 16px;
  background: #fff;
}

.description-section h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: #333;
}

.description-section p {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #16284B 0%, #24406F 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(74,144,217,0.3);
}

.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-contact {
  background: linear-gradient(135deg, #FF6B6B, #E55555);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,107,107,0.3);
}

/* 空态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

/* Toast提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.toast.show { opacity: 1; }

/* 加载态 */
.loading {
  text-align: center;
  padding: 40px;
  color: #999;
}

.loading .spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #f0f0f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* 我的页面 */
.profile-header {
  background: linear-gradient(135deg, #16284B 0%, #24406F 100%);
  padding: 40px 20px 60px;
  padding-top: calc(40px + env(safe-area-inset-top));
  color: #fff;
}

.profile-header .avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 12px;
}

.profile-header .visitor-name {
  font-size: 18px;
  font-weight: 600;
}

.profile-header .visitor-id {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
  word-break: break-all;
}

.stats-card {
  background: #fff;
  margin: -40px 12px 12px;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.stats-card .stat {
  flex: 1;
  text-align: center;
}

.stats-card .stat-num {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
}

.stats-card .stat-label {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.section-title {
  padding: 16px 12px 8px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* 解锁页 */
.unlock-status {
  text-align: center;
  padding: 80px 20px;
}

.unlock-status .status-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.unlock-status .status-text {
  font-size: 16px;
  margin-bottom: 12px;
}

.unlock-status .sub-text {
  font-size: 13px;
  color: #999;
}

/* 联系运营方弹窗 */
.contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.contact-modal .modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
}

.contact-modal h3 {
  font-size: 17px;
  text-align: center;
  margin-bottom: 16px;
}

.contact-modal p {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 20px;
}

.contact-modal .close-btn {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: #999;
  font-size: 13px;
}

/* 首页标题 */
.page-header {
  background: linear-gradient(135deg, #16284B 0%, #24406F 100%);
  padding: 16px;
  color: #fff;
  padding-top: calc(16px + env(safe-area-inset-top));
}

.page-header .header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header .header-logo {
  width: 30px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.page-header h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.page-header p {
  font-size: 12px;
  opacity: 0.82;
  margin-top: 3px;
}

/* 购买按钮区域 */
.buy-section {
  padding: 16px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

/* 解锁链接进入时的订单提示条 */
.unlock-banner {
  margin: 12px 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #16284B 0%, #24406F 100%);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(22, 40, 75, 0.18);
}
.unlock-banner .ub-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.unlock-banner .ub-sub {
  display: block;
  font-size: 12px;
  opacity: 0.82;
  margin-top: 3px;
}
.unlock-banner .ub-link {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
}
.unlock-banner .ub-link:active {
  background: rgba(255, 255, 255, 0.3);
}

/* 已购但暂未开放的景区 */
.scenic-card.disabled {
  opacity: 0.6;
  cursor: default;
  background: #fafbfc;
}
.scenic-card.disabled .cover-ph {
  background: #eef1f5;
  font-size: 26px;
  opacity: 0.7;
}
.scenic-card.disabled .name {
  color: #6b7280;
}
.tag-closed {
  display: inline-block;
  background: #f1f3f5;
  color: #8c9199;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 10px;
}
