/* ============================================================
   【随机匹配】匹配对局入口按钮 + 匹配/投票页样式
   （独立文件，避免污染 style.css 的现有层级）
   ============================================================ */

:root { --match-yellow: #e8b93f; --match-yellow-dim: #b98f22; }

/* ---- 多人模式页：匹配对局按钮（左侧竖条为黄色） ---- */
.mode-btn.match { border-left-color: var(--match-yellow); }
.mode-btn.match:hover {
    border-color: var(--match-yellow-dim);
    background: var(--surface-raised);
    transform: translateX(4px);
    box-shadow: 0 8px 26px rgba(232,185,63,0.18);
}
.mode-btn.match:hover .arrow { color: var(--match-yellow); transform: translateX(5px); }
.mode-btn.match .arrow { color: var(--ink-text-mute); transition: transform .2s var(--ease), color .2s; }

/* ---- 匹配页容器 ---- */
#page-match { align-items: center; justify-content: center; }
.match-shell { width: 100%; max-width: 560px; margin: 0 auto; }
.match-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 26px 24px 22px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    text-align: center;
}
.match-card h2 {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 700; letter-spacing: 2px;
    color: var(--ink-text); margin: 0 0 8px;
}
.match-sub { font-size: 13px; color: var(--ink-text-mute); margin: 0 0 18px; line-height: 1.6; }
.match-tip { font-size: 12.5px; color: var(--ink-text-mute); margin: 14px 0 0; min-height: 18px; }

/* ---- 匹配中：人数环 + 已等待时长 ---- */
.match-ring {
    display: inline-flex; align-items: baseline; gap: 4px;
    font-family: var(--font-display); color: var(--match-yellow);
    margin: 4px 0 6px;
}
.match-ring #match-count { font-size: 46px; font-weight: 700; line-height: 1; }
.match-ring .match-ring-need { font-size: 18px; color: var(--ink-text-mute); }
.match-elapsed { font-size: 13px; color: var(--ink-text); margin: 0 0 14px; }
/* 已等待时长：字号比正文大 50%（13px → 19.5px） */
.match-elapsed #match-elapsed { font-size: 19.5px; color: var(--match-yellow); font-weight: 600; font-family: var(--font-body); }

.match-players { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 6px; min-height: 26px; }
.match-chip {
    font-size: 12.5px; color: var(--ink-text-mute);
    background: rgba(255,255,255,0.04); border: 1px solid var(--border-soft);
    padding: 4px 12px; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 6px;
}
.match-chip.done { color: var(--match-yellow); border-color: rgba(232,185,63,0.4); }
.match-chip i { font-style: normal; font-size: 11px; opacity: .8; }

/* ---- 进度条 ---- */
.match-progress {
    width: 100%; height: 6px; border-radius: 999px; overflow: hidden;
    background: rgba(255,255,255,0.07); margin: 4px 0 8px;
}
.match-progress-bar {
    height: 100%; width: 100%;
    background: linear-gradient(90deg, var(--match-yellow), #f6d97a);
    transition: width .25s linear;
}
.match-meta { font-size: 12.5px; color: var(--ink-text-mute); margin: 0 0 16px; }
.match-meta span { color: var(--match-yellow); font-weight: 600; }

/* ---- 投票选项 ---- */
.match-options { display: flex; flex-direction: column; gap: 10px; }
.match-option {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 13px 16px; text-align: left; cursor: pointer;
    background: var(--surface-raised); color: var(--ink-text);
    border: 1px solid var(--border); border-radius: 5px;
    font-family: inherit; transition: all .18s var(--ease);
}
.match-option:hover { border-color: var(--match-yellow-dim); transform: translateX(3px); }
.match-option.picked { border-color: var(--match-yellow); box-shadow: 0 0 0 1px var(--match-yellow) inset; }
.match-option-label { font-size: 16px; font-weight: 600; font-family: var(--font-display); }
.match-option-sub { font-size: 12px; color: var(--ink-text-mute); }
.match-option-count {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    font-size: 12.5px; color: var(--match-yellow); font-weight: 600;
}
.match-option-bar {
    position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
    background: transparent;
}
.match-option-bar i {
    display: block; height: 100%; width: 0;
    background: rgba(232,185,63,0.55); transition: width .3s var(--ease);
}

/* ---- 结果 ---- */
.match-result-choice {
    font-family: var(--font-display); font-size: 26px; font-weight: 700;
    color: var(--match-yellow); margin: 6px 0 10px; letter-spacing: 1px;
}

/* ---- 主持人报名 ---- */
.match-actions { display: flex; gap: 12px; justify-content: center; margin-top: 4px; }
.btn-match-yes, .btn-match-no {
    padding: 11px 26px; border-radius: 6px; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all .18s var(--ease);
    border: 1px solid var(--border); background: var(--surface-raised); color: var(--ink-text);
}
.btn-match-yes { border-color: var(--match-yellow-dim); }
.btn-match-yes:hover, .btn-match-yes.active { border-color: var(--match-yellow); color: var(--match-yellow); box-shadow: 0 0 0 1px var(--match-yellow) inset; }
.btn-match-no:hover, .btn-match-no.active { border-color: var(--ink-text-mute); color: var(--ink-text-mute); }
.btn-match-yes:disabled, .btn-match-no:disabled { opacity: .5; cursor: default; }

/* ---- 取消按钮 ---- */
.btn-match-cancel {
    margin-top: 14px; padding: 9px 26px; border-radius: 8px;
    border: 1px solid var(--border); background: transparent;
    color: var(--ink-text-mute); font-size: 14px; font-weight: 500;
    cursor: pointer; font-family: inherit; transition: all .2s var(--ease);
}
.btn-match-cancel:hover:not(:disabled) { background: var(--surface-raised); border-color: var(--cancel-red, #d94545); color: #e0736a; }
.btn-match-cancel:disabled { opacity: .55; cursor: default; }

/* ---- 开局中动画 ---- */
.match-spinner {
    width: 34px; height: 34px; margin: 10px auto 0;
    border: 3px solid rgba(232,185,63,0.2); border-top-color: var(--match-yellow);
    border-radius: 50%; animation: match-spin 0.9s linear infinite;
}
@keyframes match-spin { to { transform: rotate(360deg); } }

/* 移动端 */
@media (max-width: 560px) {
    .match-card { padding: 20px 16px 18px; }
    .match-ring #match-count { font-size: 38px; }
    .match-option-label { font-size: 15px; }
    .match-result-choice { font-size: 22px; }
}
