/* =========================================================
   龙起星湾 · 玩购美兰 · 共享样式
   龙舟传统 + 星湾滨海 + 游戏化探索美学
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=ZCOOL+XiaoWei&family=ZCOOL+KuaiLe&family=Ma+Shan+Zheng&family=Noto+Sans+SC:wght@300;400;500;700;900&family=Noto+Serif+SC:wght@500;700;900&display=swap');

:root {
  /* 海湾主色 */
  --ocean-deep: #0a4d5c;
  --ocean: #127880;
  --ocean-light: #3ba9b0;
  --ocean-tint: #d4ede9;

  /* 龙舟主色 - 中国红/朱砂 */
  --dragon-red: #c9302c;
  --dragon-deep: #8b1e1a;
  --dragon-bright: #e84a3b;
  --vermilion: #f25f3a;
  --cinnabar: #d63d2f;
  --red-tint: #fde0dc;

  /* 传统金 */
  --gold: #e8b547;
  --gold-light: #f7d776;
  --gold-deep: #b88b1a;
  --imperial-yellow: #f5c542;

  /* 辅色 */
  --coral: #ff6b4a;
  --sunset: #f39c5e;
  --cream: #fdf6e6;
  --cream-deep: #f5ead0;
  --sand: #e8dcc0;
  --navy: #0d2c3d;
  --charcoal: #2a3942;
  --ink: #1a1a1a;
  --text: #333;
  --text-soft: #6b7680;
  --text-mute: #9aa3ab;
  --line: #ece5d4;
  --line-soft: #f4ecda;
  --bronze: #b87333;
  --silver: #9fa9b3;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --sh-sm: 0 2px 8px rgba(10,77,92,.06);
  --sh-md: 0 8px 24px rgba(10,77,92,.10);
  --sh-lg: 0 18px 48px rgba(10,77,92,.16);
  --sh-red: 0 8px 20px rgba(201,48,44,.25);

  --ff-display: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  --ff-brush: 'Ma Shan Zheng', 'ZCOOL KuaiLe', serif;
  --ff-serif: 'Noto Serif SC', serif;
  --ff-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { font-family: var(--ff-sans); color: var(--text); }
body { background: #e5e1d4; min-height: 100vh; }

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ================= 手机框架 ================= */
.phone-frame {
  width: 375px;
  min-height: 812px;
  margin: 40px auto;
  background: var(--cream);
  border-radius: 42px;
  box-shadow:
    0 0 0 12px #1a1a1a,
    0 0 0 14px #333,
    0 40px 80px rgba(0,0,0,.3);
  position: relative;
  overflow: hidden;
  padding-bottom: 70px;
}
.phone-frame.no-tabbar { padding-bottom: 0; }

/* 状态栏 */
.status-bar {
  height: 44px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: #000;
  background: transparent;
  position: relative;
  z-index: 50;
}
.status-bar.dark { color: #fff; }
.status-bar .time { font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.status-bar .icons { display: flex; gap: 5px; align-items: center; font-size: 13px; }
.status-bar .notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px; background: #1a1a1a; border-radius: 20px;
}

/* 顶部导航栏 */
.topbar {
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  position: relative;
  z-index: 10;
}
.topbar .back {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--navy);
  box-shadow: var(--sh-sm);
  transition: all .2s;
}
.topbar .back:hover { background: #fff; transform: translateX(-2px); }
.topbar .title {
  font-family: var(--ff-display);
  font-size: 18px; font-weight: 500;
  color: var(--navy);
  letter-spacing: 2px;
}
.topbar .action {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--ocean-deep);
  background: rgba(255,255,255,.85);
  box-shadow: var(--sh-sm);
}

/* 底部 tabbar */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 70px;
  background: rgba(253, 246, 230, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 6px 8px 14px;
  z-index: 100;
}
.tabbar a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: var(--text-mute);
  font-size: 10px;
  transition: all .2s;
  position: relative;
}
.tabbar a .ico {
  font-size: 22px;
  line-height: 1;
}
.tabbar a.active { color: var(--dragon-red); }
.tabbar a.active .ico { transform: translateY(-2px); }
.tabbar a.center {
  position: relative;
}
.tabbar a.center .ico {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--dragon-red), var(--vermilion));
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-top: -24px;
  box-shadow: 0 6px 20px rgba(201,48,44,.5);
  border: 4px solid var(--cream);
}
.tabbar a.center span:last-child { margin-top: -4px; }

/* 通用按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 14px;
  transition: all .2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--dragon-red), var(--dragon-deep));
  color: #fff;
  box-shadow: var(--sh-red);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(201,48,44,.4); }
.btn-ocean {
  background: linear-gradient(135deg, var(--ocean), var(--ocean-deep));
  color: #fff;
  box-shadow: 0 6px 16px rgba(10,77,92,.3);
}
.btn-coral {
  background: linear-gradient(135deg, var(--coral), var(--sunset));
  color: #fff;
  box-shadow: 0 6px 16px rgba(255,107,74,.3);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--sunset));
  color: #fff;
}
.btn-outline {
  background: #fff;
  color: var(--dragon-red);
  border: 1.5px solid var(--dragon-red);
}

/* 徽章 / 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .5px;
}
.tag-red { background: var(--red-tint); color: var(--dragon-red); }
.tag-coral { background: #ffe4dc; color: var(--coral); }
.tag-ocean { background: var(--ocean-tint); color: var(--ocean-deep); }
.tag-gold { background: #fef3d8; color: var(--gold-deep); }
.tag-green { background: #dbeedf; color: #2d7d4a; }
.tag-sand { background: var(--sand); color: var(--charcoal); }

/* 积分代币 */
.coin {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 700;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}
.coin::before {
  content: '';
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c4, var(--gold) 60%, #a87a1f);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.15);
  flex-shrink: 0;
}

/* 等级徽章 */
.rank-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 4px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}
.rank-badge::before {
  content: '';
  width: 16px; height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 30% 30%, #fff, currentColor 60%);
}
.rank-bronze { background: #f5e3d0; color: var(--bronze); }
.rank-silver { background: #e8edf2; color: var(--silver); }
.rank-gold { background: #fbeec3; color: var(--gold-deep); }

/* 卡片 */
.card {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 16px;
}

/* 分隔线 */
.hr { height: 1px; background: var(--line-soft); margin: 14px 0; }

/* 滚动吸附 */
.scroll-x {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0;
  scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { scroll-snap-align: start; flex-shrink: 0; }

/* 页面内容容器 */
.page-content {
  padding: 0 16px 20px;
  position: relative;
  z-index: 5;
}

/* 龙纹云纹装饰 */
.cloud-pattern {
  position: absolute;
  pointer-events: none;
  opacity: .12;
  z-index: 1;
}

/* Animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulse-ring {
  0% { transform: scale(.8); opacity: .8; }
  100% { transform: scale(2.4); opacity: 0; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes bounce-in {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes wave {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-8px); }
}

/* Emoji 图标统一样式 */
.emoji { font-style: normal; }

/* 龙舟 SVG 装饰 */
.dragon-boat-deco {
  position: absolute;
  opacity: .14;
  pointer-events: none;
  z-index: 1;
}
