/* =========================================================
   高校电竞社 · 选手参赛端（H5）样式
   赛事详情 / 组队大厅 / 我的赛程 / 上传赛果
   移动优先，桌面端自适应
   ========================================================= */

/* 选手端顶部栏 + 底部导航占位（避免固定栏遮挡内容） */
body.player-mode { padding-bottom: 90px; padding-top: calc(54px + env(safe-area-inset-top, 0px)); }  /* 兜底：不支持 env 的旧浏览器也保留足够留白 */
:root { --pn-h: 64px; }
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  :root { --pn-h: calc(64px + env(safe-area-inset-bottom, 0px)); }
  body.player-mode { padding-bottom: calc(var(--pn-h) + 24px); }
}

/* 通用 flex 辅助 */
.flex.between { justify-content: space-between; }
.gap { gap: 10px; }

/* 选手端 H5：隐藏全局网站页脚，避免与固定底栏重复、视觉冗余 */
body.player-mode .site-footer{ display:none; }

/* ===== 底部选手导航 ===== */
.player-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: stretch;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(15,27,45,.08);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0));
}
.pn-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 2px; color: var(--muted); text-decoration: none;
  font-size: 11px; font-weight: 600; transition: color .15s;
}
.pn-tab .pn-ico { font-size: 20px; line-height: 1; filter: grayscale(.4); transition: transform .15s; }
.pn-tab.active { color: var(--blue); }
.pn-tab.active .pn-ico { filter: none; transform: translateY(-1px) scale(1.08); }
.pn-lbl { white-space: nowrap; }

/* ===== 容器微调 ===== */
.player-container { padding-top: 18px; padding-bottom: 18px; }

/* ===== 组队大厅 ===== */
.lobby-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media(min-width: 720px){ .lobby-list { grid-template-columns: 1fr 1fr; } }

.lobby-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; box-shadow: 0 2px 10px rgba(15,27,45,.04);
  transition: transform .15s, box-shadow .15s;
}
.lobby-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,27,45,.10); }
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-name { font-size: 17px; font-weight: 800; color: var(--ink); }
.lc-status { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.lc-status.recruiting { background: #E6F4FF; color: var(--blue); }
.lc-status.closed { background: var(--bg-2); color: var(--muted); }
.lc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.lc-intro { font-size: 13px; color: var(--ink-3); line-height: 1.6; margin-bottom: 10px; }
.lc-members { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip-cap { background: #FFF7E6; border-color: #FFE0A3; color: var(--gold); font-weight: 700; }
.lc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lc-size { font-size: 13px; color: var(--ink-3); }

/* 队长自管理面板 */
.cap-panel {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.cap-head { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cap-head b { color: var(--blue); letter-spacing: .5px; }
.cap-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ===== 我的赛程 ===== */
.ms-event {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin-bottom: 14px; box-shadow: 0 2px 10px rgba(15,27,45,.04);
}
.ms-event-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ms-event-head b { font-size: 16px; font-weight: 800; color: var(--ink); }
.ms-teams { display: flex; flex-direction: column; gap: 10px; }
.ms-team { background: var(--bg-2); border-radius: 12px; padding: 12px; }
.ms-team-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ms-team-top b { font-size: 14px; color: var(--ink); }
.ms-team-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ms-reqs { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 8px; }
.ms-req { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ===== 上传赛果 ===== */
.rs-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.rs-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.rs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rs-row b { font-size: 15px; color: var(--ink); }
.rs-meta { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.rs-shots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rs-shot { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; transition: transform .15s; }
.rs-shot:hover { transform: scale(1.05); }
.warn-card { background: #FFF7E6; border: 1px solid #FFE0A3; color: #8a5a00; border-radius: 14px; padding: 16px; font-size: 14px; line-height: 1.7; }

/* tag 变体（选手端语义） */
.tag.tag-cap { background: #FFF7E6; color: var(--gold); border-color: #FFE0A3; font-weight: 700; }
.tag.tag-ok { background: #E8FFED; color: var(--green); border-color: #B7EB8F; }
.tag.tag-warn { background: #FFF4E6; color: var(--orange); border-color: #FFD591; }

/* ===== 模态内：成员管理 ===== */
.mm-sec { margin-bottom: 16px; }
.mm-title { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-bottom: 8px; }
.mm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); }

/* ===== 表单控件（选手端） ===== */
.btn-xs { height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.btn-xs:hover { border-color: var(--blue); color: var(--blue); }
.btn-xs.btn-ok { background: var(--green); border-color: transparent; color: #fff; }
.btn-xs.btn-ok:hover { filter: brightness(1.05); color: #fff; }
.btn-xs.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-xs.btn-ghost:hover { background: var(--bg-2); color: var(--red); border-color: transparent; }
.form-control {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; color: var(--ink); background: #fff; box-sizing: border-box;
}
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,102,255,.12); }
textarea.form-control { height: auto; padding: 10px 12px; resize: vertical; min-height: 70px; line-height: 1.6; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; padding: 6px 0; }
.radio { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.radio input { width: 16px; height: 16px; accent-color: var(--blue); }

/* 组队大厅按钮放大更适合触屏 */
.lobby-card .btn-sm { height: 34px; padding: 0 14px; border-radius: 9px; }

/* ===== 组队大厅 · 按邀请码加入 ===== */
.join-code-card { margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: 0 2px 10px rgba(15,27,45,.04); }
.jc-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.jc-row { display: flex; gap: 10px; }
.jc-row .form-control { flex: 1; letter-spacing: 1px; text-transform: uppercase; }
.jc-row .btn { white-space: nowrap; }
.jc-result { margin-top: 12px; }
.jc-msg { font-size: 13px; padding: 8px 0; }
.jc-msg.err { color: var(--red); }
.jc-msg.muted { color: var(--muted); }
.jc-found { background: var(--bg-2); border-radius: 12px; padding: 12px; }
.jc-found-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jc-found-head b { font-size: 15px; color: var(--ink); }
.jc-found-sub { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.jc-found-intro { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-top: 8px; }
.jc-found-actions { margin-top: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* =========================================================
   选手端 · 顶级体验升级（2026-08-04）
   顶部返回栏 / 底部导航高亮 / 微交互 / 安全区 / 降级
   ========================================================= */

/* ===== 顶部返回栏（原生 App 质感） ===== */
.player-topbar{
  position: fixed; left: 0; right: 0; top: 0; z-index: 70;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15,27,45,.04), 0 6px 18px rgba(15,27,45,.05);
}
.ptb-inner{
  position: relative; height: 52px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 12px;
}
.ptb-back{
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .16s var(--ease), color .16s, border-color .16s, box-shadow .16s;
}
.ptb-back:hover{ color: var(--blue); border-color: var(--line-b); box-shadow: 0 6px 18px rgba(0,102,255,.16); }
.ptb-back:active{ transform: translateY(-50%) scale(.9); }
.ptb-back svg{ display: block; }
.ptb-titles{ max-width: 62%; text-align: center; line-height: 1.18; min-width: 0; }
.ptb-title{ font-size: 16px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptb-sub{ font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* ===== 底部导航 · 高亮与微交互 ===== */
.player-nav .pn-tab{ position: relative; transition: color .18s var(--ease); }
.player-nav .pn-tab::before{
  content: ""; position: absolute; top: 2px; left: 50%; transform: translateX(-50%) scaleX(0);
  width: 24px; height: 3px; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: transform .22s var(--ease);
}
.player-nav .pn-tab.active{ color: var(--blue); background: rgba(0,102,255,.07); border-radius: 12px; }
.player-nav .pn-tab.active::before{ transform: translateX(-50%) scaleX(1); }
.player-nav .pn-tab.active .pn-ico{ filter: none; transform: translateY(-2px) scale(1.14); }
.player-nav .pn-tab:active{ transform: scale(.94); }

/* ===== 通用微交互（选手端） ===== */
.player-mode .btn{ transition: transform .12s var(--ease), box-shadow .16s, background .16s, color .16s, border-color .16s; }
.player-mode .btn:active{ transform: scale(.97); }
.player-mode .btn-block:active{ transform: scale(.99); }
.player-mode .card{ transition: transform .16s var(--ease), box-shadow .16s; }
.player-mode .lobby-card:active{ transform: translateY(-1px) scale(.995); }
.player-mode .rs-item{ transition: transform .16s var(--ease), box-shadow .16s; }

/* ===== 详情页 hero（仅选手端赛事详情，不影响社团详情） ===== */
.player-detail .detail-cover{ height: 168px; border-radius: 16px; }
.player-detail .detail-title{ font-size: 26px; }
.player-detail .detail-body{ padding-bottom: 14px; }

/* ===== 大屏适配（桌面端居中收窄，弱化固定栏存在感） ===== */
@media (min-width: 900px){
  .player-nav{ max-width: 520px; left: 50%; right: auto; transform: translateX(-50%); border-radius: 18px 18px 0 0; bottom: 8px; box-shadow: 0 -8px 30px rgba(15,27,45,.12); }
  .player-topbar{ max-width: 720px; left: 50%; right: auto; transform: translateX(-50%); border-radius: 0 0 16px 16px; }
}

/* ===== 动效降级 ===== */
@media (prefers-reduced-motion: reduce){
  .player-nav .pn-tab::before,
  .player-nav .pn-tab .pn-ico,
  .player-nav .pn-tab.active .pn-ico{ transition: none; }
  .player-mode .btn:active,
  .player-nav .pn-tab:active{ transform: none; }
  .ptb-back:active{ transform: translateY(-50%); }
}


/* ===== H5 赛事详情（与拖拽编辑器第一页一致） ===== */
.h5-detail{ padding:0 14px; }
.h5-hero{ padding:16px 14px 8px; background:linear-gradient(160deg,#0b1437,#0a1b4a); color:#fff; border-radius:0 0 20px 20px; margin:0 -14px; }
.h5-hero-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.h5-title{ font-size:22px; font-weight:800; line-height:1.3; margin:0; }
.h5-meta{ display:flex; flex-wrap:wrap; gap:6px 10px; margin-top:10px; }
.h5-meta span{ font-size:12px; background:rgba(255,255,255,.12); color:#dfe8ff; padding:3px 9px; border-radius:20px; }
.h5-fav{ color:#fff; border-color:rgba(255,255,255,.5); }
.h5-page{ background:transparent !important; color:var(--ink,#1f2d4d); padding:0 !important; min-height:auto !important; font-size:14px; border-radius:0; }
.h5-page .pbp-banner{ background:linear-gradient(120deg,#0066FF,#00D4FF); color:#fff; border-radius:14px; padding:20px 16px; margin:14px 0; }
.h5-page .pbp-banner-t{ font-size:17px; }
.h5-page .pbp-banner-s{ font-size:12px; }
.h5-page .pbp-sec{ background:#f5f8ff; border:1px solid var(--line,#e3e8f0); color:var(--ink,#1f2d4d); border-radius:12px; padding:14px; margin-bottom:12px; }
.h5-page .pbp-h{ color:var(--blue,#0066FF); font-size:15px; }
.h5-page .pbp-row,.h5-page .pbp-txt{ opacity:1; color:#41506b; font-size:13px; }
.h5-signup-bar{ position:sticky; bottom:calc(var(--pn-h,64px) + 28px); z-index:30; padding:12px 14px 0; margin-top:16px; }
.h5-signup-bar .btn{ box-shadow:0 10px 28px rgba(255,45,120,.30); border-radius:14px; }

/* ===== 报名页 ===== */
.signup-page{ padding:0 14px 14px; }
.signup-hero{ padding:16px 14px 10px; background:linear-gradient(160deg,#0b1437,#0a1b4a); color:#fff; border-radius:0 0 20px 20px; margin:0 -14px 14px; }
.signup-hero .h5-title{ margin-bottom:4px; }
.signup-hero .muted{ color:#cdd8f5; }

/* ===== H5 头图：以「页面配置·板块一」赛事 banner 为底图 =====
   底图按 banner 尺寸（1920×1080，16:9）cover 拉伸铺满头图区，
   叠加深色渐变遮罩保证标题/标签可读；无 banner 时回退原深蓝渐变。 */
.h5-hero--banner,
.signup-hero.h5-hero--banner{
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 172px;
  position: relative;
  overflow: hidden;
}
.h5-hero--banner::before,
.signup-hero.h5-hero--banner::before{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background: linear-gradient(180deg, rgba(8,16,40,.30) 0%, rgba(8,16,40,.58) 55%, rgba(8,16,40,.78) 100%);
}
.h5-hero--banner > *,
.signup-hero.h5-hero--banner > *{ position:relative; z-index:1; }
.h5-hero--banner .h5-fav{ background:rgba(8,16,40,.32); backdrop-filter:blur(2px); }
.signup-form .card{ margin-bottom:14px; }
.signup-form .card h3{ font-size:15px; margin:0 0 12px; }
.opt-check{ display:flex; align-items:center; gap:8px; font-size:13px; color:#41506b; cursor:pointer; }
.opt-check input{ width:18px; height:18px; }

/* ===== 我的通知 ===== */
.notif-page{ padding:0 14px 14px; }
.notif-head{ font-size:15px; font-weight:800; padding:16px 4px 10px; }
.notif-list{ display:flex; flex-direction:column; gap:10px; }
.notif-item{ display:flex; gap:10px; align-items:flex-start; background:#fff; border:1px solid var(--line,#e3e8f0); border-radius:14px; padding:14px; position:relative; cursor:pointer; box-shadow:0 4px 14px rgba(15,27,45,.05); }
.notif-item.unread{ border-color:rgba(0,102,255,.4); background:#f5f9ff; }
.notif-bell{ font-size:20px; line-height:1; }
.notif-body{ flex:1; min-width:0; }
.notif-title{ font-weight:700; font-size:14px; color:var(--ink,#1f2d4d); }
.notif-content{ font-size:13px; color:#55617a; margin-top:3px; line-height:1.5; }
.notif-time{ font-size:11px; color:#97a1b5; margin-top:6px; }
.notif-dot{ width:9px; height:9px; border-radius:50%; background:var(--blue,#0066FF); position:absolute; top:14px; right:14px; }
.fav-steps div{ color:#41506b; }
