/* pass.css — 冠軍之路通行證 */

/* ── 首頁 banner ── */
.pass-banner {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid #ffd455;
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(255,212,85,0.18), transparent 55%),
    linear-gradient(150deg, #241c0a, #1c1430 60%, #101828);
  color: #fff; text-align: left; cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(255,212,85,0.3);
}
.pass-banner-shine {
  position: absolute; top: -20%; bottom: -20%; width: 30%;
  background: linear-gradient(105deg, transparent, rgba(255,244,200,0.22) 50%, transparent);
  animation: passShine 3.2s linear infinite;
}
@keyframes passShine { from { left: -35%; } to { left: 115%; } }
.pass-banner-trophy { font-size: 30px; flex: 0 0 auto; filter: drop-shadow(0 0 8px rgba(255,212,85,0.6)); }
.pass-banner-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.pass-banner-title { font-size: 15px; font-weight: 900; letter-spacing: 0.5px; }
.pass-banner-tag {
  font-size: 10px; padding: 1px 7px; border-radius: 999px; margin-left: 4px;
  background: linear-gradient(120deg, #ffd455, #ffb14e); color: #241c0a;
}
.pass-banner-sub { font-size: 11.5px; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 6px; }
.pass-banner-bar {
  display: inline-block; width: 90px; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.12); overflow: hidden;
}
.pass-banner-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd455, #ffb14e); border-radius: 3px; }
.pass-banner-cta { flex: 0 0 auto; font-size: 13px; font-weight: 900; color: #ffd455; }

/* ── 通行證 modal ── */
.pass-overlay {
  position: fixed; inset: 0; z-index: 10500;
  background: rgba(6,10,18,0.82);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.22s;
  padding: 12px;
}
.pass-overlay.open { opacity: 1; pointer-events: auto; }
.pass-card {
  position: relative;
  width: min(920px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(165deg, #1b1530, #101826 55%, #0c1420);
  border: 2px solid rgba(255,212,85,0.55);
  border-radius: 18px;
  padding: 18px 16px 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(255,212,85,0.18);
}
.pass-loading { text-align: center; padding: 60px 0; color: rgba(255,255,255,0.7); font-weight: 700; }
.pass-close {
  position: absolute; top: 10px; right: 12px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  color: #fff; font-size: 18px; cursor: pointer;
}
/* 任務 */
.pass-sec-title { font-size: 13px; font-weight: 900; color: #fff; margin: 12px 0 8px; }
.pass-sec-title span { font-size: 10px; color: rgba(255,255,255,0.5); font-weight: 700; margin-left: 6px; }
.pass-quest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.pass-quest {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px; padding: 8px 10px;
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; text-align: left;
}
.pass-quest:hover { border-color: rgba(255,212,85,0.5); }
.pass-quest.done { opacity: 0.55; cursor: default; }
.pass-quest-icon { flex: 0 0 auto; }
.pass-quest-label { flex: 1; min-width: 0; }
.pass-quest-xp { flex: 0 0 auto; color: #ffd455; font-weight: 900; font-size: 12px; }
.pass-quest.done .pass-quest-xp { color: #66bb6a; }

@media (max-width: 480px) {
  .pass-card { padding: 10px 8px; max-height: 96vh; }
  .pass-quest-grid { grid-template-columns: 1fr 1fr; }
  .pass-col { flex: 0 0 100px; }
  .pass-final-col .pass-col { flex: 0 0 110px; width: 110px; }
  .pass-tab { font-size: 12px; padding: 7px 10px; }
  .pass-time { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .pass-banner-shine { animation: none; display: none; }
  .pass-cell.claimable { animation: none; }
}

/* ══ v2 版式（仿經典手遊通行證：上免費/中經驗條/下黃金）══ */
.pass-tabs {
  display: flex; align-items: center; gap: 6px;
  border-bottom: 2px solid rgba(255,212,85,0.25);
  padding-bottom: 0; margin-bottom: 10px;
}
.pass-tab {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14); border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 8px 14px;
  color: rgba(255,255,255,0.6); font-size: 13px; font-weight: 900; cursor: pointer;
}
.pass-tab.active {
  background: linear-gradient(180deg, rgba(255,212,85,0.25), rgba(255,212,85,0.08));
  border-color: rgba(255,212,85,0.55);
  color: #ffd455;
}
.pass-time {
  margin-left: auto; margin-right: 40px;
  font-size: 10.5px; font-weight: 800; color: #ffb14e;
  background: rgba(255,177,78,0.10); border: 1px solid rgba(255,177,78,0.35);
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.pass-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pass-lv-chip, .pass-xp-chip {
  font-size: 12px; font-weight: 800; color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px; padding: 4px 12px;
}
.pass-lv-chip b, .pass-xp-chip b { color: #ffd455; font-size: 13px; }
.pass-summary .pass-buy {
  margin-left: auto; width: auto;
  background: linear-gradient(120deg, #ffd455, #ffb14e);
  border: none; border-radius: 10px; padding: 6px 14px;
  font-size: 12.5px; font-weight: 900; color: #241c0a; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  box-shadow: 0 3px 12px rgba(255,212,85,0.35);
}
.pass-summary .pass-buy span { font-size: 9px; font-weight: 700; opacity: 0.75; }
.pass-summary .pass-gold-owned {
  margin-left: auto;
  font-size: 12px; font-weight: 900; color: #ffd455;
  background: rgba(255,212,85,0.10); border: 1px dashed rgba(255,212,85,0.5);
  border-radius: 10px; padding: 6px 12px;
}
/* 黃金特權一覽（未購時顯示、先講價值再講價） */
.pass-gold-perks {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.75);
  background: linear-gradient(120deg, rgba(255,212,85,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,212,85,0.18); border-radius: 10px;
  padding: 7px 12px; margin-bottom: 10px; line-height: 1.6;
}

/* 棋盤：側標籤 + 橫捲軌 + 釘住大獎欄 */
.pass-board { display: flex; align-items: stretch; gap: 4px; }
.pass-side-labels {
  flex: 0 0 22px;
  display: flex; flex-direction: column; gap: 0;
}
.pass-side-labels span {
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; text-orientation: upright;
  border-radius: 8px; font-size: 11px; font-weight: 900; letter-spacing: 2px;
}
.pass-side-labels .side-free, .pass-side-labels .side-gold { height: 84px; }
.pass-side-labels .side-free { background: rgba(79,148,255,0.18); border: 1px solid rgba(79,148,255,0.45); color: #9cc4ff; }
.pass-side-labels .side-mid  { height: 32px; }
.pass-side-labels .side-gold { background: rgba(255,212,85,0.15); border: 1px solid rgba(255,212,85,0.5); color: #ffd455; }
.pass-track-scroll { flex: 1; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.pass-track { display: flex; gap: 0; }
.pass-col { flex: 0 0 114px; display: flex; flex-direction: column; gap: 0; padding: 0 3px; }

/* 上下獎勵格 */
.pass-cell {
  position: relative;
  height: 84px;
  border-radius: 10px;
  padding: 5px 4px 3px;
  display: flex; flex-direction: row; gap: 5px; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(79,148,255,0.10), rgba(79,148,255,0.03));
  border: 1.5px solid rgba(79,148,255,0.35);
  font-size: 10.5px;
  overflow: hidden;
}
.pass-cell.gold {
  background: linear-gradient(180deg, rgba(255,212,85,0.14), rgba(255,212,85,0.04));
  border-color: rgba(255,212,85,0.45);
}
.pass-cell.unreached { opacity: 0.78; filter: saturate(0.85); }
.pass-cell.goldlocked { filter: saturate(0.55); }
.pass-cell.claimable {
  cursor: pointer;
  border-width: 2px; border-color: #ffd455;
  animation: passCellPulse 1.6s ease-in-out infinite;
}
@keyframes passCellPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(255,212,85,0.35); }
  50% { box-shadow: 0 0 16px rgba(255,212,85,0.75); }
}
.pass-cell.claimed { opacity: 0.75; }
/* 大綠勾（仿參考版式）*/
.pass-check {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 900; color: #4caf50;
  background: rgba(10,20,14,0.45);
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
.pass-item {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  flex: 0 1 auto; min-width: 0;
}
.pass-item-imgwrap { position: relative; }
.pass-item-imgwrap img {
  width: 42px; height: 42px; display: block;
  image-rendering: pixelated;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.45);
}
.pass-cell.dense .pass-item-imgwrap img { width: 30px; height: 30px; }
.pass-item-badge {
  position: absolute; right: -5px; bottom: -3px;
  font-size: 9px; font-weight: 900; font-style: normal;
  color: #241c0a; background: linear-gradient(120deg, #ffd455, #ffb14e);
  border-radius: 999px; padding: 0 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.pass-item-name {
  font-style: normal; font-size: 8.5px; font-weight: 700;
  color: rgba(255,255,255,0.75);
  max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pass-cell.dense .pass-item-name { font-size: 7.5px; max-width: 36px; }
.pass-item.ur .pass-item-name, .pass-item.eq.rarity-UR .pass-item-name {
  background: linear-gradient(100deg, #ffd455, #ff7ac8 60%, #7af0ff);
  -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900;
}
.pass-item.eq.rarity-SSR .pass-item-name { color: #ffd54f; }
.pass-item.eq.rarity-SR .pass-item-name { color: #9cc4ff; }
.pass-cell-state { position: absolute; right: 5px; bottom: 4px; font-size: 10px; font-weight: 900; color: rgba(255,255,255,0.4); }
.pass-cell-state.go {
  color: #241c0a; background: linear-gradient(120deg, #ffd455, #ffb14e);
  padding: 2px 9px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(255,212,85,0.5);
}

/* 中間經驗條：每級一段、相連成一條、等級數字為節點 */
.pass-bar-seg {
  position: relative;
  height: 26px; margin: 3px -3px;   /* 負 margin 讓相鄰段相連 */
  background: rgba(255,255,255,0.08);
  overflow: visible;
  display: flex; align-items: center;
}
.pass-col:first-child .pass-bar-seg { border-radius: 13px 0 0 13px; }
.pass-bar-seg i {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #ff4dd2, #ff7ac8);
  box-shadow: 0 0 10px rgba(255,77,210,0.5);
}
.pass-bar-node {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #2a2344; border: 2px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6); font-size: 11px; font-weight: 900;
}
.pass-bar-node.on {
  background: linear-gradient(135deg, #ff4dd2, #b44dff);
  border-color: #fff; color: #fff;
  box-shadow: 0 0 10px rgba(255,77,210,0.7);
}
.pass-bar-node.sp { border-color: #ffd455; }
.pass-bar-node.sp.on { background: linear-gradient(135deg, #ffd455, #ff8c42); color: #241c0a; }

/* 右側釘住的大獎欄 */
.pass-final-col {
  flex: 0 0 122px;
  position: relative;
  border: 2px solid rgba(255,77,210,0.65);
  border-radius: 12px;
  padding: 3px;
  background: linear-gradient(180deg, rgba(255,77,210,0.10), rgba(180,77,255,0.06));
  box-shadow: 0 0 14px rgba(255,77,210,0.3);
}
.pass-final-col .pass-col { flex: 1 1 auto; width: 112px; padding: 0; }
.pass-final-col .pass-bar-seg { margin: 3px 0; border-radius: 13px; }

.pass-final-tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 900; color: #fff;
  background: linear-gradient(120deg, #ff4dd2, #b44dff);
  border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}

/* 底列：說明 + 一鍵領取 */
.pass-actions-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pass-foot { flex: 1; text-align: left; font-size: 10.5px; color: rgba(255,255,255,0.45); margin-top: 0; }
.pass-claim-all {
  flex: 0 0 auto;
  background: linear-gradient(120deg, #ffd455, #ffb14e);
  border: none; border-radius: 12px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 900; color: #241c0a; cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,212,85,0.4);
}
.pass-claim-all:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

/* ── 獎勵詳情彈窗 ── */
.pass-detail-overlay {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(6,10,18,0.7); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.18s; border-radius: 18px;
  padding: 16px;
}
.pass-detail-overlay.open { opacity: 1; }
.pass-detail-card {
  position: relative;
  width: min(380px, 100%);
  background: linear-gradient(165deg, #241c40, #131c2c);
  border: 2px solid rgba(255,212,85,0.6);
  border-radius: 16px;
  padding: 16px 14px 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.pass-detail-title { font-size: 14px; font-weight: 900; color: #ffd455; margin-bottom: 10px; }
.pass-detail-items { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.pass-detail-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 8px;
}
.pass-detail-item img { width: 64px; height: 64px; border-radius: 10px; image-rendering: pixelated; flex: 0 0 auto; }
.pass-detail-info { flex: 1; min-width: 0; }
.pass-detail-name { font-size: 13.5px; font-weight: 900; color: #fff; }
.pass-detail-rar {
  display: inline-block; margin-left: 6px;
  font-size: 9px; font-weight: 900; padding: 1px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.75); vertical-align: middle;
}
.pass-detail-rar.SR  { background: rgba(79,148,255,0.28); color: #9cc4ff; }
.pass-detail-rar.SSR { background: rgba(255,213,79,0.25); color: #ffd54f; }
.pass-detail-rar.UR  { background: linear-gradient(120deg,#ffd455,#ff7ac8,#7af0ff); color: #1a1a2e; }
.pass-detail-effect { font-size: 12px; font-weight: 800; color: #7af0ff; margin-top: 3px; }
.pass-detail-desc { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 2px; line-height: 1.45; }
.pass-detail-foot { margin-top: 12px; text-align: center; }
.pass-detail-state { font-size: 12.5px; font-weight: 800; color: rgba(255,255,255,0.6); }
.pass-detail-state.ok { color: #66bb6a; }
.pass-detail-claim, .pass-detail-buy {
  width: 100%;
  background: linear-gradient(120deg, #ffd455, #ffb14e);
  border: none; border-radius: 12px; padding: 11px;
  font-size: 14px; font-weight: 900; color: #241c0a; cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,212,85,0.4);
}
.pass-detail-buy span { display: block; font-size: 10px; font-weight: 700; opacity: 0.75; margin-top: 2px; }
/* 精選單格聚焦（ev-pick 黃金 CTA 導入時） */
.pass-cell--spotlight { animation: passSpotlight 1.2s ease-in-out 4; position: relative; z-index: 2; }
@keyframes passSpotlight {
  0%, 100% { box-shadow: 0 0 0 2px rgba(102,187,106,0.9), 0 0 20px rgba(102,187,106,0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(255,212,85,0.95), 0 0 30px rgba(255,212,85,0.75); }
}
.pass-detail-claim:disabled { opacity: 0.5; }

/* ── 上線公告彈窗 ── */
.pass-intro-card { width: min(400px, 100%); text-align: center; padding: 22px 16px 16px; }
.pass-intro-trophy { font-size: 44px; filter: drop-shadow(0 0 14px rgba(255,212,85,0.7)); }
.pass-intro-title {
  font-size: 20px; font-weight: 900; letter-spacing: 1px; margin-top: 6px;
  background: linear-gradient(100deg, #fff3c4, #ffd455 45%, #ff8c42);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pass-intro-sub { font-size: 12px; color: rgba(255,255,255,0.7); margin: 6px 0 14px; }
.pass-intro-highlights { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.pass-intro-highlights > div {
  flex: 1; max-width: 112px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,212,85,0.35);
  border-radius: 12px; padding: 8px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.pass-intro-highlights img { width: 56px; height: 56px; border-radius: 10px; image-rendering: pixelated; }
.pass-intro-highlights span { font-size: 10px; color: rgba(255,255,255,0.7); line-height: 1.4; }
.pass-intro-highlights b { color: #ffd455; font-size: 10.5px; }
.pass-intro-note {
  font-size: 11px; color: rgba(255,255,255,0.75);
  background: rgba(122,240,255,0.08); border: 1px dashed rgba(122,240,255,0.4);
  border-radius: 10px; padding: 7px 10px; margin-bottom: 14px;
}
.pass-intro-note b { color: #7af0ff; }
.pass-intro-cta {
  width: 100%;
  background: linear-gradient(120deg, #ffd455, #ffb14e);
  border: none; border-radius: 12px; padding: 12px;
  font-size: 15px; font-weight: 900; color: #241c0a; cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,212,85,0.45);
}
.pass-intro-later {
  margin-top: 8px; background: none; border: none;
  color: rgba(255,255,255,0.45); font-size: 12px; font-weight: 700; cursor: pointer;
}

/* ── 通行證玩家尊榮暱稱（排行榜／擂台留言／推單共用）── */
/* 直接套在暱稱文字上：.pass-gold-name */
.pass-gold-name {
  background: linear-gradient(100deg, #fff6d8 0%, #ffe27a 25%, #ffb300 50%, #ffe27a 75%, #fff6d8 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
  animation: passGoldShine 3.5s linear infinite;
}
@keyframes passGoldShine {
  0%   { background-position: 0% center; }
  100% { background-position: 220% center; }
}
/* 名字前面的小皇冠——用真的 emoji、不是 background-clip 文字，才不會被漸層吃掉顏色 */
.pass-gold-crown {
  display: inline-block;
  margin-right: 2px;
  font-size: 0.9em;
  filter: drop-shadow(0 0 3px rgba(255,179,0,0.7));
}
