/* public/css/season.css —— 賽季通行證面板 + 主題化徽帶 + 星章顯示。
   黑金奢華,沿用 style.css 的 --gold/--panel/--line 變數;無外部圖檔、無 emoji。
   --season-main/--season-sub 由 season.js applyTheme() 依本季主題色動態覆寫,
   此處先給金色系預設值,主題資料抵達前(或載入失敗)仍是完整黑金外觀。 */
:root {
  --season-main: var(--gold, #d4af37);
  --season-sub: var(--gold-bright, #f0d67a);
}

/* ---------- 賽季通行證面板(大廳側欄卡,沿用 .panel 底,只補內部排版)---------- */
.season-pass { display: flex; flex-direction: column; gap: 10px; }

.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-title { font-weight: 800; letter-spacing: .05em; color: var(--gold-bright); font-size: .98rem; }
#sp-level {
  font-weight: 800; font-size: .82rem; letter-spacing: .04em; color: #14100a;
  padding: 3px 11px; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(158deg, var(--season-sub), var(--season-main));
  box-shadow: 0 0 8px color-mix(in srgb, var(--season-main) 55%, transparent);
}

.sp-bar {
  position: relative; height: 10px; border-radius: 999px; overflow: hidden;
  background: #100d09; border: 1px solid var(--line);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .55);
}
.sp-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--season-main), var(--season-sub));
  box-shadow: 0 0 10px color-mix(in srgb, var(--season-main) 65%, transparent);
  transition: width .5s ease;
}

/* 10 級節點:窄螢幕自動換行,絕不橫向捲動 */
.sp-nodes { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-node {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line-soft);
  transition: color .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.sp-node.lit {
  color: #14100a; border-color: transparent;
  background: linear-gradient(158deg, var(--season-sub), var(--season-main));
  box-shadow: 0 0 6px color-mix(in srgb, var(--season-main) 60%, transparent);
}

.sp-next { font-size: .8rem; color: var(--muted); letter-spacing: .02em; }

/* ---------- 賽季徽帶追加:主題名 / 事件小標 / 星章(沿用 .season-band 既有排版,gap 已含間距) ---------- */
.season-theme-name {
  font-weight: 700; font-size: .84rem; letter-spacing: .03em;
  padding: 2px 10px; border-radius: 999px; color: #14100a;
  background: linear-gradient(158deg, var(--season-sub), var(--season-main));
}
.season-event {
  font-size: .8rem; color: var(--muted); letter-spacing: .02em;
  padding-left: 10px; border-left: 1px solid var(--line);
}
.season-stars {
  margin-left: auto; font-size: .92rem; letter-spacing: .04em;
  color: var(--gold-bright);
  text-shadow: 0 0 8px rgba(240, 214, 122, .45);
  cursor: default;
}
/* 資料未到位(空字串)時不留空 pill / 分隔線孤影 */
.season-theme-name:empty, .season-event:empty, .season-stars:empty { display: none; }

@media (max-width: 480px) {
  .sp-node { width: 21px; height: 21px; font-size: .68rem; }
  .season-event { padding-left: 8px; }
}

/* ---------- 換季頒獎儀式(全站廣播,全螢幕置中 overlay,~6s 自動收)---------- */
.season-ceremony {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 40%, rgba(40, 32, 16, .78), rgba(4, 3, 2, .93));
  backdrop-filter: blur(3px);
  animation: cer-fade .35s ease-out;
}
.season-ceremony.hidden { display: none; }

.cer-inner {
  width: min(480px, 100%); text-align: center;
  padding: 30px 26px 26px; border-radius: 20px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--gold-deep);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .7), var(--glow-gold);
  animation: cer-pop .5s cubic-bezier(.2, 1.4, .4, 1);
}
.cer-head {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  letter-spacing: .1em; color: var(--gold-bright);
  text-shadow: 0 0 14px rgba(240, 214, 122, .5);
  margin-bottom: 22px;
}
.cer-podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; }

.podium {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px 16px; border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .22));
  border: 1px solid var(--line);
}
.podium .medal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  font-size: 1rem; font-weight: 800; color: #241a06;
  background: var(--grad-gold); box-shadow: 0 0 10px color-mix(in srgb, var(--gold) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.podium .pname {
  font-weight: 700; font-size: .92rem; color: var(--ink);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.podium .ptot { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 順位高低差:金牌最高、銀次之、銅最矮,呈現真正的頒獎台階梯感(純高度差,無桌面透視傾斜) */
.podium.p1 { order: 2; padding-top: 6px; }
.podium.p1 .medal { width: 42px; height: 42px; font-size: 1.15rem; }
.podium.p2 { order: 1; margin-top: 20px; }
.podium.p3 { order: 3; margin-top: 32px; }

.cer-next {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: .92rem; color: var(--muted); letter-spacing: .03em;
}
.cer-next b { color: var(--season-sub, var(--gold-bright)); font-size: 1.02rem; }

@keyframes cer-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cer-pop {
  0% { opacity: 0; transform: scale(.82) translateY(14px); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 480px) {
  .cer-inner { padding: 24px 16px 20px; border-radius: 16px; }
  .cer-head { font-size: 1.08rem; margin-bottom: 16px; }
  .cer-podium { gap: 8px; }
  .podium { padding: 10px 4px 12px; }
  .podium .medal { width: 28px; height: 28px; font-size: .86rem; }
  .podium.p1 .medal { width: 34px; height: 34px; font-size: .98rem; }
  .podium .pname { font-size: .8rem; }
  .podium .ptot { font-size: .7rem; }
  .podium.p2 { margin-top: 14px; }
  .podium.p3 { margin-top: 22px; }
}

/* ---------- 個人賽季回顧卡(season:recap,私密推送,手動關閉)---------- */
.season-recap {
  position: fixed; inset: 0; z-index: 490;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
  background: rgba(4, 3, 2, .74);
  backdrop-filter: blur(2px);
  animation: cer-fade .3s ease-out;
}
.season-recap.hidden { display: none; }

.recap-card {
  width: min(400px, 100%); box-sizing: border-box;
  padding: 26px 24px 22px; border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--gold-deep);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .65), var(--glow-gold);
  animation: cer-pop .4s cubic-bezier(.2, 1.4, .4, 1);
}
.recap-title {
  font-family: var(--font-display); font-size: 1.12rem; font-weight: 700;
  letter-spacing: .06em; color: var(--gold-bright); margin-bottom: 10px;
}
.recap-rank {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 1.02rem; font-weight: 700; color: var(--ink);
  padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line);
}
.recap-tier {
  font-size: .76rem; font-weight: 800; letter-spacing: .04em; color: #14100a;
  padding: 2px 10px; border-radius: 999px;
  background: linear-gradient(158deg, var(--season-sub), var(--season-main));
}
.recap-stats { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.recap-stats li {
  font-size: .88rem; color: var(--muted); letter-spacing: .01em;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.recap-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }

.recap-close {
  display: block; width: 100%; padding: 11px; border-radius: 10px; border: 1px solid var(--gold-deep);
  background: var(--grad-gold); color: #33270a; font-weight: 800; font-size: .94rem; letter-spacing: .04em;
  cursor: pointer; box-shadow: 0 4px 14px rgba(212, 175, 55, .35);
}
.recap-close:hover { filter: brightness(1.06); }
.recap-close:active { transform: translateY(1px); }

@media (max-width: 480px) {
  .recap-card { padding: 20px 16px 18px; border-radius: 14px; }
  .recap-title { font-size: 1rem; }
  .recap-rank { font-size: .94rem; }
  .recap-stats li { font-size: .82rem; }
}
