:root {
  --shell-max-w: 430px;
  --shell-max-h: 860px;
  --bg-outer: #041222;
  --ocean-top: #0c4a6e;
  --ocean-abyss: #051629;
  --dock-bg: #082038;
  --card-bg: rgba(10, 36, 62, 0.9);
  --border-soft: rgba(125, 211, 252, 0.22);
  --text-main: #f0f9ff;
  --text-muted: #93c5fd;
  --gold: #fbbf24;
  --gold-bright: #fde047;
  --emerald: #34d399;
  --rare: #38bdf8;
  --epic: #c084fc;
  --legend: #fbbf24;
  --danger: #fb7185;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, #0e3a5c 0%, #051426 65%, #020812 100%);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wx-shell {
  position: relative;
  width: 100%;
  max-width: var(--shell-max-w);
  height: min(100dvh, var(--shell-max-h));
  background: linear-gradient(180deg, #0b3a60 0%, #061b31 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(125, 211, 252, 0.16);
}

@media (min-width: 460px) {
  .wx-shell {
    border-radius: 24px;
  }
}

/* 微信顶栏 */
.wx-topbar {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(6, 28, 52, 0.94), rgba(8, 36, 66, 0.88));
  border-bottom: 1px solid rgba(125, 211, 252, 0.14);
  z-index: 30;
}

.wx-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e0f2fe;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.12s, background 0.15s;
}

.wx-back:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.18);
}

.wx-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 6px;
}

.wx-capsule {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.wx-cap-btn {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  width: 30px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s, transform 0.1s;
}

.wx-cap-btn:active {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(0.92);
}

.wx-cap-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.22);
}

/* 顶部赛况 HUD */
.hud-bar {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(180deg, rgba(8, 34, 62, 0.92), rgba(7, 29, 53, 0.85));
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
  z-index: 20;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(2, 16, 32, 0.55);
  border: 1px solid rgba(125, 211, 252, 0.2);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hud-timer.fever {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.35), rgba(239, 68, 68, 0.35));
  border-color: rgba(253, 224, 71, 0.85);
  color: #fef08a;
  animation: pulseGlow 0.9s ease-in-out infinite alternate;
}

.hud-cash {
  color: #fde047;
  border-color: rgba(251, 191, 36, 0.35);
  min-width: 96px;
  justify-content: center;
}

.hud-cash.pop {
  animation: cashPop 0.28s ease-out;
}

.hud-catch {
  color: #bae6fd;
}

.hud-sub {
  font-size: 11px;
  color: #7dd3fc;
  padding-left: 4px;
  border-left: 1px solid rgba(125, 211, 252, 0.25);
}

@keyframes pulseGlow {
  from { box-shadow: 0 0 6px rgba(251, 191, 36, 0.35); }
  to { box-shadow: 0 0 14px rgba(251, 191, 36, 0.85); }
}

@keyframes cashPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.13); }
  100% { transform: scale(1); }
}

/* 主 Canvas 舞台 */
.stage-wrap {
  position: relative;
  flex: 1;
  min-height: 280px;
  width: 100%;
  overflow: hidden;
  touch-action: none;
  background: #082c4c;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: pointer;
}

/* 黄金鱼潮横幅 */
.fever-banner {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 20px);
  max-width: 390px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.92), rgba(245, 158, 11, 0.96), rgba(217, 70, 239, 0.88));
  border: 1.5px solid #fef08a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  z-index: 12;
  pointer-events: none;
  animation: feverPulse 1.3s ease-in-out infinite;
}

@keyframes feverPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.03); }
}

/* 浮层提示 */
.toast-banner {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(6, 24, 46, 0.88);
  border: 1.5px solid rgba(125, 211, 252, 0.5);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  z-index: 15;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.toast-banner.gold {
  background: linear-gradient(90deg, #b45309, #f59e0b);
  border-color: #fef08a;
  color: #fffbeb;
}

.toast-banner.danger {
  background: linear-gradient(90deg, #be123c, #e11d48);
  border-color: #fda4af;
}

.toast-banner.surge {
  background: linear-gradient(90deg, #059669, #10b981, #fbbf24);
  border-color: #fef08a;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(0.85); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* 钓获战利品弹卡 */
.catch-card {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 368px;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(10, 38, 68, 0.96), rgba(5, 20, 40, 0.96));
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  z-index: 18;
  overflow: hidden;
  cursor: pointer;
  animation: catchPop 0.34s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.catch-card.r-common {
  border-color: #cbd5e1;
}

.catch-card.r-rare {
  border-color: #38bdf8;
  box-shadow: 0 12px 34px rgba(56, 189, 248, 0.35);
}

.catch-card.r-epic {
  border-color: #c084fc;
  box-shadow: 0 12px 38px rgba(192, 132, 252, 0.45);
}

.catch-card.r-legendary {
  border-color: #fde047;
  background: linear-gradient(155deg, rgba(84, 42, 6, 0.96), rgba(26, 14, 4, 0.96));
  box-shadow: 0 14px 44px rgba(251, 191, 36, 0.65);
}

.catch-card-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.16), transparent 60%);
  pointer-events: none;
}

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

.catch-rarity {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.r-common .catch-rarity { background: #475569; color: #f8fafc; }
.r-rare .catch-rarity { background: #0284c7; color: #e0f2fe; }
.r-epic .catch-rarity { background: #7e22ce; color: #f3e8ff; }
.r-legendary .catch-rarity { background: linear-gradient(90deg, #d97706, #fbbf24); color: #271300; }

.catch-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #fde047);
  color: #451a03;
}

.catch-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.catch-emoji {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  flex-shrink: 0;
}

.catch-info {
  flex: 1;
  min-width: 0;
}

.catch-name {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.catch-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
}

.catch-weight {
  font-size: 13px;
  font-weight: 700;
  color: #bae6fd;
}

.catch-money {
  font-size: 18px;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 1px 6px rgba(251, 191, 36, 0.4);
}

.catch-bonus {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #6ee7b7;
}

@keyframes catchPop {
  0% { opacity: 0; transform: translateX(-50%) scale(0.72) translateY(14px); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}

/* 开始与结算覆盖层 */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: linear-gradient(180deg, rgba(4, 24, 46, 0.45) 0%, rgba(3, 15, 30, 0.84) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 25;
}

.start-card,
.end-card {
  width: 100%;
  max-width: 374px;
  background: linear-gradient(165deg, rgba(10, 42, 74, 0.94), rgba(5, 22, 42, 0.96));
  border: 1.5px solid rgba(125, 211, 252, 0.34);
  border-radius: 22px;
  padding: 18px 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.start-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.3), rgba(52, 211, 153, 0.3));
  border: 1px solid rgba(125, 211, 252, 0.45);
  color: #bae6fd;
  margin-bottom: 8px;
}

.start-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
  line-height: 1.2;
}

.start-title span {
  display: block;
  margin-top: 2px;
  font-size: 28px;
  background: linear-gradient(90deg, #fde047, #fb923c, #fef08a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.3));
}

.start-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #93c5fd;
  font-weight: 600;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.mode-btn {
  text-align: left;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.16s ease;
}

.mode-btn.active {
  background: linear-gradient(155deg, rgba(14, 165, 233, 0.28), rgba(251, 191, 36, 0.2));
  border-color: #fde047;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.25);
}

.mode-name {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.mode-desc {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.3;
  color: #bae6fd;
}

.rules-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(2, 16, 32, 0.56);
  border: 1px solid rgba(125, 211, 252, 0.16);
  text-align: left;
  font-size: 11.5px;
  line-height: 1.5;
  color: #e0f2fe;
}

.rules-box p + p {
  margin-top: 5px;
}

.rules-box b {
  color: #fde047;
}

.start-stats {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
}

.stat-chip {
  flex: 1;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 11.5px;
  color: #bae6fd;
}

.stat-chip strong {
  color: #fde047;
}

.primary-cta {
  width: 100%;
  border: none;
  padding: 13px 16px;
  border-radius: 15px;
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
  color: #2c1300;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 0 #b45309, 0 12px 26px rgba(245, 158, 11, 0.45);
  transition: transform 0.1s, box-shadow 0.1s;
}

.primary-cta:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #b45309, 0 6px 16px rgba(245, 158, 11, 0.35);
}

/* 结算成绩单 */
.end-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 1px;
}

.rank-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 20px;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(90deg, #f59e0b, #fde047, #fb923c);
  color: #361700;
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.5);
}

.new-record-pill {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #6ee7b7;
}

.end-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.end-cell {
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(2, 16, 32, 0.6);
  border: 1px solid rgba(125, 211, 252, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.end-cell.highlight {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.12);
}

.end-label {
  font-size: 11px;
  color: #93c5fd;
}

.end-value {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.end-cell.highlight .end-value {
  color: #fde047;
}

.end-value.sm {
  font-size: 13px;
  line-height: 1.3;
}

.end-best-row {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #bae6fd;
}

.end-best-row strong {
  color: #fde047;
  font-size: 14px;
}

.end-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.end-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(125, 211, 252, 0.24);
  color: #e0f2fe;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-btn:active {
  background: rgba(255, 255, 255, 0.18);
}

/* 底部操作与船舱商店 */
.bottom-dock {
  flex-shrink: 0;
  background: linear-gradient(180deg, #09233d 0%, #051526 100%);
  border-top: 1px solid rgba(125, 211, 252, 0.2);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.action-area {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cast-meter-wrap {
  transition: opacity 0.15s;
}

.cast-meter-wrap.dimmed {
  opacity: 0.32;
}

.cast-zones {
  display: grid;
  grid-template-columns: 42% 36% 22%;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 3px;
  padding: 0 2px;
}

.cz.shallow { color: #86efac; text-align: left; }
.cz.deep { color: #7dd3fc; text-align: center; }
.cz.gold { color: #fde047; text-align: right; }

.cast-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg,
    #15803d 0%, #22c55e 42%,
    #0284c7 42%, #38bdf8 78%,
    #d97706 78%, #fde047 96%, #fb7185 96%, #f43f5e 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cast-fill {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 24, 0.52);
  transform-origin: right center;
  width: 100%;
  left: 0;
  pointer-events: none;
  opacity: 0.45;
}

.cast-needle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 0%;
  width: 6px;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 10px #fff, 0 0 14px #fde047;
  transition: opacity 0.1s;
}

.action-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  transition: transform 0.08s, filter 0.12s, background 0.15s;
}

.action-btn.state-idle {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #fff;
  box-shadow: 0 4px 0 #075985, 0 8px 20px rgba(2, 132, 199, 0.4);
}

.action-btn.state-charging {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
  color: #361700;
  box-shadow: 0 2px 0 #b45309, 0 0 22px rgba(251, 191, 36, 0.65);
  transform: translateY(2px);
}

.action-btn.state-waiting {
  background: linear-gradient(180deg, #1e3a5f 0%, #0f2540 100%);
  color: #93c5fd;
  box-shadow: 0 3px 0 #081526;
}

.action-btn.state-reeling {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  color: #022c22;
  box-shadow: 0 4px 0 #065f46, 0 0 22px rgba(52, 211, 153, 0.55);
}

.action-btn.state-reeling.holding {
  background: linear-gradient(180deg, #fde047 0%, #10b981 100%);
  transform: translateY(2px);
  box-shadow: 0 2px 0 #065f46, 0 0 28px rgba(253, 224, 71, 0.75);
}

.action-main {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
}

.action-hint {
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 2px;
}

/* 船舱 4 项渔具商店 */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  transition: opacity 0.16s;
}

.shop-grid.locked {
  opacity: 0.48;
  pointer-events: none;
}

.shop-item {
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 48, 82, 0.9), rgba(8, 28, 52, 0.95));
  padding: 6px 5px;
  color: #e0f2fe;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
}

.shop-item.can-buy {
  border-color: #34d399;
  background: linear-gradient(180deg, rgba(12, 74, 78, 0.95), rgba(6, 40, 48, 0.96));
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.32);
}

.shop-item.can-buy:active {
  transform: scale(0.95);
}

.shop-item.maxed {
  border-color: rgba(251, 191, 36, 0.55);
  background: linear-gradient(180deg, rgba(72, 46, 12, 0.7), rgba(34, 22, 6, 0.9));
}

.shop-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.shop-ico {
  font-size: 16px;
  line-height: 1;
}

.shop-lv {
  font-size: 10px;
  font-weight: 800;
  color: #7dd3fc;
}

.shop-item.maxed .shop-lv {
  color: #fde047;
}

.shop-name {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.shop-desc {
  font-size: 9.5px;
  color: #93c5fd;
  white-space: nowrap;
}

.shop-cost {
  margin-top: 2px;
  width: 100%;
  padding: 2px 0;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
  background: rgba(2, 16, 32, 0.6);
  color: #94a3b8;
}

.shop-item.can-buy .shop-cost {
  background: linear-gradient(90deg, #10b981, #34d399);
  color: #022c22;
}

.shop-item.maxed .shop-cost {
  background: rgba(251, 191, 36, 0.25);
  color: #fde047;
}

/* 图鉴弹窗 */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 22, 0.76);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  z-index: 40;
}

.modal-sheet {
  width: 100%;
  max-height: 82%;
  background: linear-gradient(180deg, #0b2d50 0%, #05182d 100%);
  border: 1.5px solid rgba(125, 211, 252, 0.34);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.modal-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(125, 211, 252, 0.16);
}

.modal-head h3 {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}

.modal-head p {
  font-size: 11.5px;
  color: #93c5fd;
  margin-top: 2px;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.dex-list {
  padding: 10px 12px 14px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dex-card {
  padding: 9px 10px;
  border-radius: 13px;
  background: rgba(2, 16, 32, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dex-card.unlocked.r-common { border-color: rgba(203, 213, 225, 0.45); }
.dex-card.unlocked.r-rare { border-color: rgba(56, 189, 248, 0.6); }
.dex-card.unlocked.r-epic { border-color: rgba(192, 132, 252, 0.65); }
.dex-card.unlocked.r-legendary {
  border-color: rgba(253, 224, 71, 0.8);
  background: linear-gradient(160deg, rgba(84, 42, 6, 0.45), rgba(14, 24, 42, 0.82));
}

.dex-card.locked {
  opacity: 0.62;
}

.dex-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dex-ico {
  font-size: 24px;
}

.dex-card.locked .dex-ico {
  filter: brightness(0) invert(0.35);
}

.dex-rar {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
}

.dex-rar.r-common { background: #475569; color: #f8fafc; }
.dex-rar.r-rare { background: #0284c7; color: #e0f2fe; }
.dex-rar.r-epic { background: #7e22ce; color: #f3e8ff; }
.dex-rar.r-legendary { background: #f59e0b; color: #271300; }

.dex-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.dex-meta {
  font-size: 10.5px;
  color: #93c5fd;
  display: flex;
  justify-content: space-between;
}

.hidden {
  display: none !important;
}

@media (max-height: 700px) {
  .start-card,
  .end-card {
    padding: 13px 13px;
  }
  .start-title { font-size: 20px; }
  .start-title span { font-size: 23px; }
  .action-btn { height: 46px; }
  .shop-item { padding: 5px 4px; }
}
