/* =========================================================
   有球打 · 记分牌 / 大屏
   ========================================================= */
.board-page, .display-page {
    min-height: 100vh;
    background: #08120f;
    color: #f7f2e7;
    position: relative;
    overflow-x: hidden;
}
.board-page::before, .display-page::before {
    content: "";
    position: fixed; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at 18% 20%, rgba(28,111,93,.18), transparent 34%),
        radial-gradient(circle at 84% 84%, rgba(201,72,36,.16), transparent 38%),
        repeating-linear-gradient(90deg, transparent 0 79px, rgba(255,255,255,.018) 79px 80px);
}
.board-top {
    height: 72px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.1); position: relative; z-index: 5;
    background: rgba(8,18,15,.6); backdrop-filter: blur(14px);
}
.board-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.board-brand .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
.board-brand small { display: block; color: rgba(255,255,255,.4); font-size: 8px; letter-spacing: .2em; font-weight: 600; }
.board-top-center { display: flex; align-items: center; gap: 10px; font-size: 10px; color: rgba(255,255,255,.4); letter-spacing: .08em; }
.board-top-center .badge { background: rgba(255,255,255,.1); color: #fff; }
.board-top-actions { display: flex; align-items: center; gap: 8px; }
.board-top .btn-ghost { border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.75); }
.board-top .btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }
.board-top .icon-btn { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; }

.board-main {
    position: relative; z-index: 2;
    width: min(1400px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 36px;
    display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 18px;
}
.score-stage {
    border: 1px solid rgba(255,255,255,.11); border-radius: 26px; overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    box-shadow: 0 40px 90px -50px #000;
    display: flex; flex-direction: column;
}
.stage-head {
    padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08); font-size: 10px; color: rgba(255,255,255,.5);
}
.stage-head-left { display: flex; align-items: center; gap: 10px; }
.stage-head-left .live-dot { background: var(--orange); }
.stage-timer { font-family: var(--display); letter-spacing: .06em; font-size: 12px; color: rgba(255,255,255,.72); }
.stage-timer .icon { width: 12px; height: 12px; vertical-align: -2px; margin-right: 4px; opacity: .5; }
.stage-point-badge {
    background: var(--lime); color: var(--ink); font-weight: 900; font-size: 10px;
    border-radius: 99px; padding: 4px 10px; letter-spacing: .04em;
}

.score-duel {
    display: grid; grid-template-columns: minmax(0,1fr) 112px minmax(0,1fr);
    align-items: stretch; min-height: 430px; flex: 1;
}
.duel-side {
    appearance: none; border: 0; background: transparent; color: inherit; text-align: center;
    padding: 30px 20px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    position: relative; transition: background .2s; cursor: default;
}
button.duel-side { cursor: pointer; }
button.duel-side:hover { background: rgba(255,255,255,.035); }
button.duel-side:active { background: rgba(201,72,36,.08); }
.duel-side.side-1 { border-right: 1px solid rgba(255,255,255,.06); }
.duel-side .avatar { width: 52px; height: 52px; font-size: 20px; border: 2px solid rgba(255,255,255,.18); }
.duel-name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; max-width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-sub { font-size: 9px; color: rgba(255,255,255,.38); letter-spacing: .08em; text-transform: uppercase; }
.duel-score {
    font-family: var(--display); font-size: clamp(88px, 12vw, 168px); line-height: .85;
    letter-spacing: -.075em; font-weight: 900; margin: 6px 0 4px;
    color: #fff; text-shadow: 0 20px 50px rgba(0,0,0,.4);
    font-variant-numeric: tabular-nums;
}
.duel-side.side-1 .duel-score { color: #fff; }
.duel-side.side-2 .duel-score { color: var(--lime); }
.duel-tap-hint {
    display: inline-flex; align-items: center; gap: 5px; font-size: 9px; letter-spacing: .08em;
    color: rgba(255,255,255,.28); border: 1px solid rgba(255,255,255,.13);
    border-radius: 99px; padding: 4px 9px;
}
.duel-tap-hint .icon { width: 11px; height: 11px; }
.duel-center {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    border-left: 1px solid rgba(255,255,255,.04); border-right: 1px solid rgba(255,255,255,.04);
    background: rgba(0,0,0,.14);
}
.duel-vs { font-family: var(--display); font-size: 20px; color: rgba(255,255,255,.22); font-style: italic; }
.duel-sets-won { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 22px; }
.duel-sets-won span { opacity: .9; }
.duel-sets-won em { font-style: normal; color: rgba(255,255,255,.2); font-size: 13px; }
.server-pill {
    font-size: 9px; color: var(--ink); background: var(--lime); border-radius: 99px;
    padding: 4px 9px; font-weight: 800; white-space: nowrap; max-width: 100px;
    overflow: hidden; text-overflow: ellipsis;
}
.server-pill:empty { visibility: hidden; }
.stage-bottom {
    border-top: 1px solid rgba(255,255,255,.08); padding: 15px 22px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.stage-sets { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.stage-sets-label { font-size: 9px; letter-spacing: .1em; color: rgba(255,255,255,.32); margin-right: 3px; }
.stage-sets .set-chip { background: rgba(255,255,255,.08); color: rgba(255,255,255,.72); font-size: 10px; padding: 4px 8px; min-width: 32px; }
.stage-sets .set-chip.live { background: var(--orange); color: #fff; }
.stage-sets .set-chip:first-child { margin-left: 0; }
.stage-legend { font-size: 9px; color: rgba(255,255,255,.3); display: flex; align-items: center; gap: 12px; }
.stage-legend span { display: inline-flex; align-items: center; gap: 4px; }
.stage-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); display: inline-block; }

.winner-banner {
    margin: 0 22px 18px; border-radius: 18px; padding: 14px 18px;
    background: linear-gradient(90deg, var(--orange), #ff8a3d); color: #fff;
    display: flex; align-items: center; gap: 12px;
}
.winner-banner > span { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.winner-banner strong { font-size: 18px; }
.winner-banner em { margin-left: auto; font-style: normal; font-family: var(--display); font-size: 22px; }

.board-aside { display: flex; flex-direction: column; gap: 14px; }
.aside-card {
    border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 18px;
    background: rgba(255,255,255,.035);
}
.aside-card h3 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.36); margin-bottom: 12px; font-weight: 800; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.control-btn {
    min-height: 46px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.05); color: #fff; font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: background .18s, border-color .18s, opacity .18s;
}
.control-btn:hover:not(:disabled) { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.26); }
.control-btn:disabled { opacity: .28; cursor: not-allowed; }
.control-btn .icon { width: 15px; height: 15px; }
.control-btn-primary { background: var(--orange); border-color: var(--orange); }
.control-btn-primary:hover:not(:disabled) { background: var(--orange-dark); border-color: var(--orange-dark); }
.control-btn-danger { color: #ffb3a0; }
.control-btn-wide { grid-column: span 2; }
.control-note { font-size: 9px; color: rgba(255,255,255,.32); margin-top: 10px; line-height: 1.6; }
.board-meta { display: flex; flex-direction: column; gap: 10px; }
.board-meta .info-row { border-bottom-color: rgba(255,255,255,.07); font-size: 10px; padding: 8px 0; }
.board-meta .info-row span { color: rgba(255,255,255,.36); }
.board-meta .info-row strong { color: rgba(255,255,255,.8); }
.share-line { display: flex; gap: 7px; margin-top: 10px; }
.share-line .btn { flex: 1; min-height: 34px; font-size: 10px; }
.share-line .btn-ghost { border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.7); }
.key-hint { display: flex; flex-wrap: wrap; gap: 5px; font-size: 9px; color: rgba(255,255,255,.3); margin-top: 10px; }
.key-hint kbd { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 5px; padding: 1px 5px; font-family: inherit; color: rgba(255,255,255,.55); }

/* ---------- 大屏 ---------- */
.display-page { display: flex; flex-direction: column; overflow: hidden; }
.display-screen {
    min-height: 100vh; width: 100%; padding: 3vh 4vw 2vh;
    display: flex; flex-direction: column; position: relative; z-index: 2;
}
.display-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 1.1vw; color: rgba(255,255,255,.4); }
.display-top .brand { padding: 0; }
.display-top .brand-word strong { font-size: 1.4vw; }
.display-top .brand-word small { font-size: .55vw; }
.display-status { display: flex; align-items: center; gap: 10px; font-size: 1vw; letter-spacing: .08em; }
.display-status .badge { font-size: .85vw; padding: .5vw 1vw; }
.display-round { font-size: 1vw; letter-spacing: .12em; color: rgba(255,255,255,.35); text-align: right; }
.display-main {
    flex: 1; display: grid; grid-template-columns: 1fr 13vw 1fr; align-items: center; gap: 1vw;
    padding: 3vh 0;
}
.display-team { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1vh; min-width: 0; }
.display-team .avatar { width: 6vw; height: 6vw; font-size: 2.2vw; border: .18vw solid rgba(255,255,255,.18); }
.display-name { font-size: 2.8vw; font-weight: 900; letter-spacing: -.03em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.display-meta { font-size: .95vw; color: rgba(255,255,255,.4); letter-spacing: .1em; }
.display-score {
    font-family: var(--display); font-weight: 900; font-size: 15vw; line-height: .8;
    letter-spacing: -.08em; font-variant-numeric: tabular-nums; text-shadow: 0 2vw 5vw rgba(0,0,0,.35);
}
.display-team.side-2 .display-score { color: var(--lime); }
.display-middle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4vh; }
.display-sets { font-family: var(--display); font-size: 3.2vw; letter-spacing: -.04em; display: flex; align-items: center; gap: .7vw; }
.display-sets em { font-style: normal; color: rgba(255,255,255,.22); font-size: 1.8vw; }
.display-server { font-size: .85vw; letter-spacing: .1em; color: var(--ink); background: var(--lime); border-radius: 99px; padding: .5vw 1vw; font-weight: 800; white-space: nowrap; }
.display-point { font-size: .9vw; letter-spacing: .12em; color: var(--orange); font-weight: 900; text-transform: uppercase; }
.display-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 2vw; border-top: 1px solid rgba(255,255,255,.09); padding-top: 2vh; }
.display-set-list { display: flex; align-items: center; gap: .9vw; flex-wrap: wrap; }
.display-set-list .set-chip { font-size: .95vw; padding: .45vw .8vw; min-width: 3.2vw; background: rgba(255,255,255,.06); color: rgba(255,255,255,.7); }
.display-set-list .set-chip.live { background: var(--orange); color: #fff; }
.display-footer { font-size: .8vw; color: rgba(255,255,255,.25); letter-spacing: .06em; text-align: right; }
.display-winner {
    position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(8,18,15,.92); backdrop-filter: blur(10px); text-align: center; gap: 1.4vh;
}
.display-winner span { font-size: 1vw; letter-spacing: .24em; color: var(--lime); text-transform: uppercase; }
.display-winner strong { font-size: 5vw; font-weight: 900; letter-spacing: -.04em; }
.display-winner em { font-style: normal; font-family: var(--display); font-size: 3vw; color: var(--orange); }
.display-winner small { font-size: 1vw; color: rgba(255,255,255,.4); letter-spacing: .1em; }
.display-live-dot { width: .6vw; height: .6vw; border-radius: 50%; background: var(--orange); box-shadow: 0 0 .8vw var(--orange); animation: pulse 2s infinite; }

@media (max-width: 980px) {
    .board-main { grid-template-columns: 1fr; }
    .board-aside { display: grid; grid-template-columns: 1fr 1fr; }
    .score-duel { min-height: 340px; grid-template-columns: minmax(0,1fr) 72px minmax(0,1fr); }
    .duel-name { font-size: 15px; }
    .duel-score { font-size: 84px; }
    .aside-card:last-child { grid-column: span 2; }
    .display-main { grid-template-columns: 1fr 10vw 1fr; }
}
@media (max-width: 640px) {
    .board-top { height: 60px; padding: 0 14px; }
    .board-top-center { display: none; }
    .board-brand small { display: none; }
    .board-main { width: calc(100% - 20px); padding-top: 12px; }
    .score-stage { border-radius: 20px; }
    .stage-head { padding: 12px 14px; }
    .score-duel { min-height: 300px; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); }
    .duel-side { padding: 18px 8px; }
    .duel-side .avatar { width: 40px; height: 40px; font-size: 15px; }
    .duel-name { font-size: 13px; }
    .duel-score { font-size: 70px; }
    .duel-vs { font-size: 13px; }
    .duel-sets-won { font-size: 16px; }
    .server-pill { font-size: 8px; padding: 3px 6px; max-width: 60px; }
    .board-aside { grid-template-columns: 1fr; }
    .aside-card:last-child { grid-column: span 1; }
    .stage-bottom { padding: 12px 14px; }
    .display-screen { padding: 2vh 4vw; }
    .display-team .avatar { width: 12vw; height: 12vw; font-size: 4vw; }
    .display-name { font-size: 5vw; }
    .display-score { font-size: 22vw; }
    .display-middle { gap: 1vh; }
    .display-sets { font-size: 5vw; }
    .display-server { font-size: 1.6vw; padding: .8vw 1.6vw; }
    .display-top .brand-word small, .display-round { display: none; }
    .display-footer { display: none; }
    .display-winner strong { font-size: 9vw; }
}

.display-exit {
    position: fixed; right: 2vw; bottom: 2vh; z-index: 30;
    display: inline-flex; align-items: center; gap: 5px;
    color: rgba(255,255,255,.42); font-size: .78vw; letter-spacing: .06em;
    border: 1px solid rgba(255,255,255,.12); border-radius: 99px;
    padding: .45vw .8vw; background: rgba(8,18,15,.5);
    backdrop-filter: blur(8px);
}
.display-exit:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.display-exit .icon { width: .9vw; height: .9vw; }