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

html, body {
  background: transparent !important;
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: transparent !important;
  color: #000000;
}

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

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent !important;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* 顶部透明视频Logo - 固定在页面顶部中央 */
.top-video-logo {
  position: fixed;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 1001;
  pointer-events: none;
}

.top-video-logo video {
  height: 80px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: screen;
}

.logo {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.logo img {
  height: 84px;
  display: block;
}

.menu {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  justify-content: space-around;
  flex-wrap: wrap;
}

.menu a {
  color: #000000 !important;
  opacity: 0.8;
  padding: 0.3rem 0.5rem;
  border-radius: 0.3rem;
  transition: all 0.2s ease;
}

.menu a:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.menu a.active-nav {
  opacity: 1;
  color: #40e0d0 !important;
}

.menu a:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.menu a.active-nav {
  opacity: 1;
  color: #40e0d0 !important;
}

.main {
  flex: 1;
  padding: 80px 0 100px 0;
}

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2rem;
  padding-top: 0;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  background: transparent !important;
}

.landing-title {
  font-size: 2.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.enter-button {
  padding: 0.9rem 2.6rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, #40e0d0, #7fffd4, #f0e68c);
  color: #050608;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(127, 255, 212, 0.4);
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: 1.5rem;
}

.card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1rem 1.3rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.card-title {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.6rem;
}

.progress-bar {
  width: 100%;
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-inner {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #40e0d0, #7fffd4);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.quick-action-btn {
  padding: 0.5rem 0.4rem;
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 0.8rem;
  cursor: pointer;
}

.quick-action-btn:hover {
  border-color: rgba(127, 255, 212, 0.6);
}

.list {
  font-size: 0.8rem;
  opacity: 0.8;
}

.list-item {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.seed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr);
  gap: 1rem;
}

.seed-status {
  font-size: 0.9rem;
  opacity: 0.85;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.8rem;
}

.btn-primary {
  border: none;
  background: linear-gradient(120deg, #40e0d0, #7fffd4);
  color: #050608;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.seed-ar-box {
  min-height: 160px;
  border-radius: 1rem;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0.8;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  margin-top: 1rem;
}

.puzzle-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.04);
}

.puzzle-cell.unlocked {
  background: linear-gradient(135deg, #40e0d0, #7fffd4);
}

.map-placeholder {
  margin-top: 0.8rem;
  padding: 0.8rem;
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.03);
  font-size: 0.8rem;
}

.map-seeds {
  margin-top: 0.5rem;
  height: 100%;
  overflow: auto;
  font-size: 0.8rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  font-size: 0.7rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
  gap: 1rem;
}

.leaderboard-list {
  font-size: 0.85rem;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  background: #000;
}

/* 排行榜样式 */
.leaderboard-section {
  padding: 1rem;
  padding-bottom: 5rem;
  min-height: calc(100vh - 200px);
  background: #000;
}

.leaderboard-card {
  padding: 0 !important;
  overflow: hidden;
}

.leaderboard-header {
  display: grid;
  grid-template-columns: 80px 70px 1fr 100px 140px;
  gap: 10px;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(0, 0, 0, 0.95));
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: sticky;
  top: 0;
  z-index: 10;
  color: #fff;
}

.leaderboard-header span {
  text-align: center;
}

.leaderboard-header span:nth-child(3) {
  text-align: left;
}

.leaderboard-header span:nth-child(5) {
  text-align: right;
}

.leaderboard-item {
  display: grid;
  grid-template-columns: 80px 70px 1fr 100px 140px;
  gap: 10px;
  padding: 12px 20px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
}

.leaderboard-item:hover {
  background: rgba(30, 30, 30, 0.9);
}

.leaderboard-item.rank-1 {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.leaderboard-item.rank-2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.leaderboard-item.rank-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.leaderboard-item .rank {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.leaderboard-item.rank-1 .rank { color: #FFD700; }
.leaderboard-item.rank-2 .rank { color: #C0C0C0; }
.leaderboard-item.rank-3 .rank { color: #CD7F32; }

.leaderboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.leaderboard-item:hover .leaderboard-avatar {
  border-color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.user-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-info .nickname {
  font-weight: 600;
  color: #000;
}

.user-info .user-id {
  font-size: 0.75rem;
  color: #666;
}

.unlock-count {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.unlock-count .count {
  font-size: 1.3rem;
  font-weight: 700;
  color: #000;
}

.unlock-count .label {
  font-size: 0.7rem;
  color: #666;
}

.unlock-time {
  text-align: right;
  font-size: 0.85rem;
  color: #333;
  font-weight: 500;
}

/* 自定义滚动条 */
.leaderboard-list::-webkit-scrollbar {
  width: 6px;
}

.leaderboard-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #333, #666);
  border-radius: 3px;
}

/* 响应式 */
@media (max-width: 768px) {
  .leaderboard-header {
    display: none;
  }
  
  .leaderboard-item {
    grid-template-columns: 60px 50px 1fr;
    gap: 8px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
  }
  
  .unlock-count, .unlock-time {
    display: none;
  }
  
  .leaderboard-avatar {
    width: 40px;
    height: 40px;
  }
}

.small {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* 注册表单 */
.form-card {
  max-width: 420px;
  margin: 2rem auto;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.form-field label {
  font-size: 0.85rem;
  opacity: 0.8;
  color: #000;
}

.form-field input {
  padding: 0.5rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  font-size: 0.9rem;
  color: #000 !important;
  background: #fff !important;
  pointer-events: auto !important;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.form-field input:focus {
  outline: 2px solid #333;
  outline-offset: 1px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* 主题覆写：深色主题 */
/* body {
  background: #ffffff;
  color: #111111;
} */

.card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.quick-action-btn {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.seed-ar-box {
  border: 1px dashed rgba(0, 0, 0, 0.2);
}

.puzzle-cell {
  background: rgba(0, 0, 0, 0.04);
}

.map-placeholder {
  background: rgba(0, 0, 0, 0.03);
}

.pill {
  border: 1px solid rgba(0, 0, 0, 0.2);
}

@media (max-width: 900px) {
  .main {
    padding: 1rem;
  }

  .dashboard-grid,
  .seed-layout,
  .profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ======== 手机端响应式增强 ======== */
@media (max-width: 768px) {
  /* 隐藏顶部视频logo */
  .top-video-logo {
    display: none !important;
  }

  /* 主内容区顶部padding - 避开顶部Logo和EN按钮 */
  .main {
    padding-top: 60px !important;
  }

  /* 导航栏 */
  .top-nav {
    padding: 0.6rem 0.3rem;
  }
  .top-nav .menu {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto auto;
    gap: 0.3rem;
    width: 100%;
  }
  .top-nav .menu a {
    font-size: 0.6rem;
    padding: 0.25rem 0.3rem;
    text-align: center;
  }
  /* 伊甸园拼图放在第二行中间 */
  .top-nav .menu a.nav-puzzle {
    grid-column: 3 / 4;
    grid-row: 2;
    justify-self: center;
  }

  /* 仪表盘卡片 */
  .dashboard-grid {
    gap: 0.8rem;
  }
  .card {
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
  }
  .card-title {
    font-size: 0.8rem;
  }

  /* 按钮 */
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  /* 种子图鉴网格 - 手机端排列更紧凑 */
  .seed-dex-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.05rem;
    padding: 0.1rem;
  }

  .seed-video-cell {
    position: relative;
    aspect-ratio: 3 / 4;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
  }

  .seed-video-cell video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .seed-number {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.03rem;
    line-height: 1;
    color: #333;
    z-index: 1;
  }

  /* 个人资料页面 */
  .profile-grid {
    gap: 1rem;
  }

  /* 地图 */
  #map {
    height: 100% !important;
  }

  /* 排行榜 - 手机端更紧凑 */
  .leaderboard-item {
    padding: 4px 2px;
    gap: 2px;
    font-size: 0.7rem;
  }

  .leaderboard-item .rank {
    font-size: 0.7rem;
    color: #fff;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 3px rgba(0,0,0,0.8);
  }

  .leaderboard-avatar {
    width: 22px;
    height: 22px;
  }

  /* 表单 */
  .form-card {
    margin: 1rem;
    padding: 1rem;
    pointer-events: auto;
  }
}

@media (max-width: 480px) {
  /* 进一步缩小 */
  .top-nav .menu a {
    font-size: 0.55rem;
    padding: 0.2rem 0.25rem;
  }

  .seed-dex-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.05rem;
    padding: 0.1rem;
  }

  .seed-number {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.02rem;
    line-height: 1;
    color: #333;
    z-index: 1;
  }

  .card {
    padding: 0.6rem 0.8rem;
  }

  /* 种子详情页 */
  .seed-layout {
    gap: 0.5rem;
  }
}

/* 主题：白底黑字 */
body {
  background: #ffffff;
  color: #000000;
}

.card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.quick-action-btn {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.seed-ar-box {
  border: 1px dashed rgba(0, 0, 0, 0.2);
}

.puzzle-cell {
  background: rgba(0, 0, 0, 0.04);
}

.map-placeholder {
  background: rgba(0, 0, 0, 0.03);
}

.pill {
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* 种子图鉴视频网格：5列 x 20行 */
.seed-dex-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  padding: 1rem 2rem 100px 2rem;
}

.seed-video-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.5rem;
  overflow: hidden;
  padding: 2px;
}

.seed-video-cell video {
  width: 100%;
  height: calc(100% - 12px);
  object-fit: cover;
  background: transparent;
}

.seed-video-cell video {
  width: 100%;
  height: calc(100% - 12px);
  object-fit: cover;
  background: transparent;
}

.model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.model-grid video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #000000;
  border-radius: 0.5rem;
}

/* 手机端 WebM 透明背景修复 */
@supports (-webkit-touch-callout: none) {
  .model-grid video,
  .seed-video-cell video {
    background: #000000;
  }
}

@media (max-width: 768px) {
  .model-grid video,
  .seed-video-cell video {
    background: #000000;
  }
}

.seed-number {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-top: 4px;
  text-align: center;
  display: block;
  width: 100%;
}

/* 我的页面样式 */
.my-page {
  padding: 1rem;
  padding-bottom: 100px;
  max-width: 600px;
  margin: 0 auto;
}

.my-profile-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
  max-width: 100%;
  overflow: hidden;
}

.my-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.my-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.verified-badge {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #40e0d0, #7fffd4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #fff;
  border: 2px solid #fff;
}

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

.my-nickname {
  margin: 0 0 0.25rem 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #000;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.my-user-id {
  margin: 0;
  font-size: 0.75rem;
  color: #666;
  word-break: break-all;
}

.my-stats {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.8rem;
}

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

.my-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #000;
}

.my-stat-label {
  font-size: 0.7rem;
  color: #666;
}

.my-progress-section {
  background: #fff;
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
}

.my-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.my-progress-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.my-progress-inner {
  height: 100%;
  background: linear-gradient(90deg, #40e0d0, #7fffd4);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.my-records-section {
  background: #fff;
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
}

.my-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.8rem;
}

.my-empty-records {
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  padding: 1.5rem 0;
}

.my-records-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.my-record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.6rem;
}

.my-record-seed {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #000;
}

.my-seed-icon {
  font-size: 1rem;
}

.my-record-time {
  font-size: 0.75rem;
  color: #888;
}

.my-records-more {
  text-align: center;
  font-size: 0.8rem;
  color: #888;
  padding: 0.5rem 0;
}

.my-register-prompt {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
}

.my-prompt-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.my-register-prompt p {
  margin: 0;
  font-size: 0.95rem;
  color: #000;
}

.my-prompt-desc {
  margin: 0.4rem 0 1rem 0 !important;
  font-size: 0.8rem !important;
  color: #888 !important;
}

.my-menu-section {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.my-menu-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.my-menu-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.my-menu-icon {
  font-size: 1.2rem;
}

.my-menu-item span:nth-child(2) {
  flex: 1;
  font-size: 0.9rem;
  color: #000;
}

.my-menu-arrow {
  font-size: 1.2rem;
  color: #ccc;
}

/* 地图样式 */
.map-card {
  padding: 0 !important;
  overflow: hidden;
}

.map-container {
  width: 100%;
  height: 100%;
  border-radius: 0 0 1rem 1rem;
}

.map-placeholder {
  margin-top: 0.8rem;
  padding: 0.8rem;
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.03);
  font-size: 0.8rem;
}

/* 用户位置标记 */
.user-marker {
  background: transparent;
}

.user-marker-dot {
  width: 16px;
  height: 16px;
  background: #40e0d0;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 种子标记 */
.seed-marker {
  background: transparent;
}

.seed-marker-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.seed-marker-dot:hover {
  transform: scale(1.2);
}

/* ======== Geocaching风格地图布局 - 白色背景 ======== */
.map-section {
  padding: 0 !important;
  margin: 0;
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.map-layout {
  display: flex;
  gap: 0;
  height: 100%;
  flex: 1;
}

/* 左侧线索列表 */
.clue-list-panel {
  width: 280px;
  min-width: 280px;
  background: #f8f9fa;
  border-right: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.clue-list-header {
  padding: 15px;
  background: linear-gradient(90deg, #f0f0f0 0%, #f5f5f5 100%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #333;
  letter-spacing: 1px;
}

.clue-count {
  background: rgba(255,255,255,0.1);
  color: #a0a0a0;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  border: 1px solid rgba(255,255,255,0.15);
}

.clue-list {
  flex: 1;
  overflow-y: auto;
  max-height: 100%;
}

.clue-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.15s ease;
}

.clue-item:hover {
  background: rgba(0,0,0,0.03);
}

.clue-item.active {
  background: rgba(0,0,0,0.05);
  border-left: 2px solid #606060;
}

.clue-status-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

.clue-status-icon.public {
  background: #ffd700;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.clue-status-icon.hidden {
  background: #ff6b6b;
  box-shadow: 0 0 6px rgba(255, 107, 107, 0.5);
}

.clue-status-icon.unlocked {
  background: #40e0d0;
  box-shadow: 0 0 6px rgba(64, 224, 208, 0.5);
}

.clue-status-icon.primary {
  background: #9e9e9e;
}

.clue-status-icon.intermediate {
  background: #424242;
}

.clue-status-icon.advanced {
  background: #c62828;
}

.clue-info {
  flex: 1;
}

.clue-title {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.clue-meta {
  font-size: 0.75rem;
  color: #666;
  margin-top: 2px;
}

.clue-arrow {
  color: #999;
  font-size: 1rem;
  font-weight: 300;
}

/* 中间地图面板 */
.map-panel {
  flex: 1;
  min-width: 400px;
  position: relative;
}

.map-panel .map-container {
  height: 100%;
}

/* 右侧详情面板 */
.detail-panel {
  width: 400px;
  min-width: 400px;
  background: #f8f9fa;
  border-left: 1px solid rgba(0,0,0,0.06);
  overflow-y: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.detail-panel.hidden {
  transform: translateX(100%);
  opacity: 0;
  width: 0;
  min-width: 0;
  overflow: hidden;
}

.detail-panel.visible {
  transform: translateX(0);
  opacity: 1;
}

/* 显示详情面板的按钮（当面板隐藏时显示） */
.detail-panel-toggle {
  position: fixed;
  right: 20px;
  bottom: 100px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #555 0%, #777 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 1001;
}

.detail-panel-toggle.visible {
  display: flex;
}

/* 关闭详情面板按钮 */
.close-detail-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666;
  z-index: 10;
}

.close-detail-panel:hover {
  background: rgba(0,0,0,0.15);
}

.no-selection {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #606070;
  font-size: 0.9rem;
}

/* 种子详情 */
.seed-detail {
  padding: 0;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.detail-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.detail-status.public {
  background: #fff3cd;
  color: #856404;
}

.detail-status.hidden {
  background: #f8d7da;
  color: #721c24;
}

.detail-status.unlocked {
  background: #d4edda;
  color: #155724;
}

.detail-id {
  font-weight: 600;
  color: #333;
}

.detail-title {
  padding: 15px;
  margin: 0;
  font-size: 1.3rem;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.detail-tags {
  padding: 12px 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.detail-tags .tag {
  background: #e9ecef;
  color: #495057;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.detail-section {
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.detail-section h3 {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  color: #333;
  font-weight: 600;
}

.detail-section p {
  margin: 10px 0 0 0;
  color: #666;
  line-height: 1.6;
  font-size: 0.9rem;
}

.clue-image {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.coords {
  font-family: monospace;
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 10px;
}

.hints-list {
  margin: 0;
  padding-left: 20px;
  color: #666;
  font-size: 0.9rem;
}

.hints-list li {
  margin-bottom: 8px;
}

/* 访问者列表 */
.visitors-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.visitor-item {
  display: flex;
  align-items: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 8px;
}

.visitor-avatar {
  font-size: 1.2rem;
  margin-right: 10px;
}

.visitor-name {
  flex: 1;
  font-size: 0.85rem;
  color: #333;
}

.visitor-time {
  font-size: 0.75rem;
  color: #999;
}

/* 互动评论区域 */
.interaction-section {
  background: #fafbfc;
}

.comment-form {
  margin-bottom: 15px;
}

.comment-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9rem;
  resize: none;
  font-family: inherit;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #667eea;
}

.comment-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.login-prompt {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.login-prompt p {
  margin: 0 0 10px 0;
  color: #666;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.comment-author {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.comment-time {
  font-size: 0.75rem;
  color: #999;
}

.comment-text {
  color: #555;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.comment-actions {
  display: flex;
  gap: 15px;
}

.action-btn {
  background: none;
  border: none;
  color: #667eea;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
}

.action-btn:hover {
  opacity: 0.7;
}

.reply-form {
  margin-top: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

.reply-form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  resize: none;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.detail-actions {
  padding: 15px;
  display: flex;
  gap: 10px;
  border-top: 1px solid #f0f0f0;
}

.detail-actions .btn {
  flex: 1;
  text-align: center;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .clue-list-panel {
    width: 240px;
    min-width: 240px;
  }
  
  .detail-panel {
    width: 320px;
    min-width: 320px;
  }
}

@media (max-width: 992px) {
  .map-layout {
    flex-direction: column;
    gap: 0;
    height: calc(100vh - 100px);
  }

  /* 地图置顶 */
  .map-panel {
    order: 1;
    width: 100%;
    min-width: unset;
    height: 50vh;
    flex: none;
  }

  /* 任务列表在下方 */
  .clue-list-panel {
    order: 2;
    width: 100%;
    height: auto;
    min-width: unset;
    border-right: none;
    border-bottom: none;
    border-top: 1px solid #e0e0e0;
    overflow-y: auto;
    flex: 1;
  }

  .clue-list-header {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .clue-count {
    padding: 1px 6px;
    font-size: 0.7rem;
  }

  .clue-item {
    padding: 5px 10px;
    min-height: unset;
    align-items: center;
  }

  .clue-title {
    font-size: 0.78rem;
    line-height: 1.2;
  }

  .clue-meta {
    display: none;
  }

  .clue-status-icon {
    width: 6px;
    height: 6px;
    margin-right: 8px;
  }

  /* 分类任务列表（可折叠） */
  .task-category-items {
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  /* 详情面板 - 底部抽屉式，保持地图可见 */
  .detail-panel {
    position: fixed;
    top: auto;
    bottom: 70px; /* 紧贴底部导航栏 */
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    min-width: unset;
    border-left: none;
    border-top: 4px solid #40e0d0;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    z-index: 1000;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  }

  /* 展开状态：最大高度约 45%，保留 55% 地图空间 */
  .detail-panel.visible {
    max-height: calc(100vh - 70px - 55vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 折叠状态：完全收到底部导航栏下方 */
  .detail-panel.hidden {
    max-height: 0;
    overflow: hidden;
    transform: translateY(100%);
    border-top-width: 0;
  }

  /* 抽屉顶部手柄区域 */
  .detail-panel-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 6px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .detail-panel-drag-bar {
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    flex-shrink: 0;
  }

  /* 收起按钮 - 移到手柄右侧，不再与内容叠加 */
  .detail-panel .close-detail-panel {
    position: static;
    width: auto;
    height: 28px;
    padding: 0 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.07);
    border: none;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-family: inherit;
  }

  .detail-panel .close-detail-panel:hover {
    background: rgba(0, 0, 0, 0.12);
  }

  .detail-panel.hidden .close-detail-panel {
    display: none;
  }

  /* 详情内容区域 - 可滚动 */
  .detail-content-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .detail-panel-toggle {
    position: fixed;
    right: 20px;
    bottom: 90px; /* 在底部导航栏上方 */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #40e0d0, #7fffd4);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(64, 224, 208, 0.4);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 999;
  }

  .detail-panel-toggle.visible {
    display: flex;
  }

  .map-section {
    height: calc(100vh - 60px);
  }

  .map-section > p.small {
    padding: 6px 10px;
    margin: 0;
    font-size: 0.65rem;
    line-height: 1.4;
    background: #fafafa;
    border-bottom: 1px solid #eee;
  }

  .task-category {
    padding: 4px 10px !important;
    margin: 4px 0 2px !important;
  }

  .task-category span {
    font-size: 10px !important;
  }

  /* 详情面板紧凑样式 */
  .seed-detail .detail-header {
    padding: 8px 12px;
  }

  .seed-detail .detail-status {
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 8px;
  }

  .seed-detail .detail-id {
    font-size: 0.75rem;
  }

  .seed-detail .detail-title {
    padding: 10px 12px;
    font-size: 1rem;
  }

  .seed-detail .detail-tags {
    padding: 8px 12px;
    gap: 6px;
  }

  .seed-detail .detail-tags .tag {
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 8px;
  }

  .seed-detail .detail-section {
    padding: 10px 12px;
  }

  .seed-detail .detail-section h3 {
    font-size: 0.85rem;
    margin: 0 0 6px 0;
  }

  .seed-detail .detail-section p {
    font-size: 0.8rem;
    margin: 6px 0 0 0;
    line-height: 1.4;
  }

  .seed-detail .clue-image {
    max-height: 150px;
    margin-bottom: 6px;
  }
}

/* ======== 我的页面移动端适配 ======== */
@media (max-width: 768px) {
  /* 我的页面容器 */
  .my-page {
    padding: 0.5rem;
    padding-bottom: 80px;
  }

  /* 用户信息卡片 */
  .my-profile-card {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    gap: 0.8rem;
  }

  .my-avatar {
    width: 50px;
    height: 50px;
  }

  .my-nickname {
    font-size: 1.1rem;
  }

  .my-user-id {
    font-size: 0.7rem;
  }

  /* 统计信息 */
  .my-stats {
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.6rem;
  }

  .my-stat-value {
    font-size: 1rem;
  }

  .my-stat-label {
    font-size: 0.65rem;
  }

  /* 进度区域 */
  .my-progress-section {
    padding: 0.8rem 1rem;
  }

  .my-progress-header {
    font-size: 0.75rem;
  }

  /* 记录列表 */
  .my-records-section {
    padding: 0.8rem 1rem;
  }

  .my-section-title {
    font-size: 0.85rem;
  }

  .my-record-item {
    padding: 0.5rem 0.6rem;
  }

  .my-record-seed {
    font-size: 0.8rem;
  }

  .my-record-time {
    font-size: 0.7rem;
  }

  /* 菜单 */
  .my-menu-section {
    margin-top: 0.5rem;
  }

  .my-menu-item {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .my-menu-icon {
    font-size: 1.1rem;
    width: 24px;
  }

  /* 注册提示 */
  .my-register-prompt {
    padding: 1.5rem 1rem;
  }

  .my-prompt-icon {
    font-size: 2.5rem;
  }

  .my-register-prompt p {
    font-size: 0.9rem;
  }

  .my-prompt-desc {
    font-size: 0.75rem;
  }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
  .my-page {
    padding: 0.3rem;
    padding-bottom: 80px;
  }

  .my-profile-card {
    padding: 0.8rem;
  }

  .my-avatar {
    width: 45px;
    height: 45px;
  }

  .my-stats {
    gap: 1rem;
  }

  .my-menu-item {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}
