/* Brawl AI Arena: what the arena adds on top of the shared site styles (bsdraft.css, vote.css).
   Header, footer, panels, buttons and the draft display come from those shared files. */

.arena-page { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.arena-message { text-align: center; color: rgba(255, 255, 255, 0.8); padding: 40px 10px; }
.arena-message h3 { color: #fff; font-size: 1.6rem; margin-bottom: 10px; }
.arena-message .btn { margin-top: 20px; }

/* ---------- Home: leaderboard ---------- */
.arena-panel-title { text-align: center; color: #f1c40f; font-size: 2rem; margin-bottom: 6px; }
.arena-panel-help { text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; margin-bottom: 18px; }

.lb-table { display: flex; flex-direction: column; gap: 10px; }
.lb-columns, .lb-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) 170px 90px 100px 50px; align-items: center; gap: 12px; padding: 0 18px; }
.lb-columns { color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.lb-columns .num, .lb-row .num { text-align: right; }
.lb-row {
    width: 100%; min-height: 68px; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 15px;
    color: #fff; font: inherit; text-align: left; cursor: pointer; transition: all 0.2s ease;
}
.lb-row:hover { background: rgba(0, 0, 0, 0.32); border-color: rgba(255, 255, 255, 0.3); }
.lb-row:focus-visible, .arena-filter button:focus-visible, .arena-option:focus-visible { outline: 3px solid #f1c40f; outline-offset: 2px; }
.lb-item.open .lb-row { border-color: #f1c40f; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.lb-rank { font-size: 1.5rem; color: rgba(255, 255, 255, 0.6); text-align: center; }
.lb-item.top-1 .lb-rank { color: #f1c40f; }
.lb-item.top-2 .lb-rank { color: #d5dbe3; }
.lb-item.top-3 .lb-rank { color: #d99a5b; }
.lb-bot { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-bot img { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; flex: none; }
.lb-bot-text { min-width: 0; }
.lb-bot-name { display: block; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-bot-author { display: block; color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-rating { font-size: 1.5rem; }
.lb-ci { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; margin-left: 5px; }
.lb-tier { width: 42px; height: 42px; object-fit: contain; }
.lb-tag { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; background: rgba(241, 196, 15, 0.18); color: #f1c40f; vertical-align: middle; margin-left: 8px; }
.lb-details { display: none; padding: 18px 20px; background: rgba(0, 0, 0, 0.28); border: 1px solid #f1c40f; border-top: 0; border-radius: 0 0 15px 15px; color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; line-height: 1.5; }
.lb-item.open .lb-details { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: start; }
.lb-details img { width: 110px; border-radius: 15px; }
.lb-details p { margin-bottom: 10px; }
.lb-details a { color: #f1c40f; }
.lb-details dl { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0; }
.lb-details dt { display: inline; color: #f39c12; }
.lb-details dd { display: inline; margin: 0 0 0 5px; }
.lb-note { text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; margin-top: 16px; }

/* ---------- Home: head-to-head ---------- */
.h2h-wrap { overflow-x: auto; }
.h2h { border-collapse: separate; border-spacing: 5px; width: 100%; min-width: 560px; }
.h2h th { font-weight: 400; color: rgba(255, 255, 255, 0.7); text-align: center; padding: 6px; font-size: 0.85rem; }
.h2h th[scope="row"] { text-align: left; color: #fff; white-space: nowrap; font-size: 0.95rem; }
.h2h td { text-align: center; padding: 9px 6px; border-radius: 10px; background: rgba(0, 0, 0, 0.2); color: rgba(255, 255, 255, 0.6); }
.h2h td.self { background: transparent; }
.h2h td.lead { color: #f1c40f; }
.h2h td small { display: block; color: rgba(255, 255, 255, 0.5); font-size: 0.7rem; }

/* ---------- Home: method (same cards as the site's home page) ---------- */
.arena-method { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 0 auto 30px; }
.arena-method-card { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border-radius: 20px; padding: 30px; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); }
.arena-method-card h3 { color: #f39c12; font-size: 1.6rem; margin-bottom: 15px; border-bottom: 2px solid rgba(243, 156, 18, 0.5); padding-bottom: 8px; }
.arena-method-card p { line-height: 1.6; color: rgba(255, 255, 255, 0.9); }


/* ---------- Home: same reading width as the site's home page ---------- */
.arena-home { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.arena-home .explanation-cta-container { max-width: none; }

/* ---------- Home: leaderboard filters ---------- */
.arena-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.arena-filter { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; }
.arena-filter-label { color: #f39c12; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.arena-filter-options { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1); }
.arena-filter button {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 12px; cursor: pointer;
    background: transparent; border: 0; color: rgba(255, 255, 255, 0.75);
    font-family: "Lilita One", cursive; font-size: 0.95rem; transition: all 0.2s ease;
}
.arena-filter button img { width: 20px; height: 20px; object-fit: contain; }
.arena-filter button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.arena-filter button.active { background: linear-gradient(45deg, #7363da, #4a3db3); color: #fff; }
.lb-count { text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; margin-bottom: 12px; }

/* Where a rating sits between the bottom of Mythic 1 and the top of Masters 2, with its 95% interval. */
.lb-ladder { display: block; position: relative; height: 6px; margin-top: 8px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); }
.lb-ladder-range { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: rgba(241, 196, 15, 0.35); }
.lb-ladder-mark { position: absolute; top: -3px; width: 4px; height: 12px; margin-left: -2px; border-radius: 2px; background: #f1c40f; }
.lb-item.baseline .lb-row { border-style: dashed; border-color: rgba(255, 255, 255, 0.35); }
.lb-tag.human { background: rgba(52, 152, 219, 0.2); color: #6cb8f0; }

/* ---------- Vote page ---------- */
.vote-top-row { display: flex; align-items: center; gap: 16px; margin: 0 auto 20px; }
.vote-back-link a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 25px; color: #fff; text-decoration: none; white-space: nowrap; }
.vote-back-link a:hover { background: rgba(255, 255, 255, 0.18); }
.vote-progress { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.vote-progress-track { flex: 1; height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; }
.vote-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #7363da, #f1c40f); border-radius: 4px; transition: width 0.5s ease; }
#voteProgressText { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; white-space: nowrap; margin: 0; }

.arena-vote { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.arena-vote .draft-interface-grid { grid-template-columns: minmax(150px, 1fr) minmax(0, 1.6fr) minmax(150px, 1fr); }
.arena-vote .draft-map-panel { min-width: 0; }
.arena-vote .team-header { font-size: clamp(0.95rem, 1.35vw, 1.4rem); letter-spacing: 1px; white-space: nowrap; }
.arena-vote .draft-team-panel .pick-wrapper { flex-direction: row; }
.arena-vote .brawler-grid .brawler-slot { width: clamp(40px, 3vw, 50px); height: auto; }
.arena-vote .brawler-grid { min-height: 50px; flex-wrap: nowrap; }
.arena-vote-map { width: 100%; max-height: 430px; object-fit: contain; border-radius: 15px; border: 2px solid rgba(255, 255, 255, 0.2); background-color: rgba(0, 0, 0, 0.2); }
.vote-map-name img { width: 26px; height: 26px; vertical-align: middle; margin-right: 8px; }
.vote-first-pick { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }
.vote-turn { margin-top: 4px; font-size: 1.05rem; }
.vote-turn.blue { color: #3498db; }
.vote-turn.red { color: #e74c3c; }
.pick-wrapper .brawler-slot.arena-preview { border: 4px solid #fff; background: transparent; }

.arena-vote-panel { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border-radius: 20px; padding: 20px; border: 1px solid rgba(255, 255, 255, 0.2); }
.arena-vote-panel h2 { font-size: 1.4rem; color: #f1c40f; text-align: center; margin-bottom: 4px; }
.arena-vote-help { text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; margin-bottom: 16px; }
.arena-vote-status { text-align: center; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: rgba(241, 196, 15, 0.12); border: 1px solid rgba(241, 196, 15, 0.5); color: #f1c40f; font-size: 1.05rem; }
.arena-vote-status.good { background: rgba(46, 204, 113, 0.12); border-color: rgba(46, 204, 113, 0.6); color: #2ecc71; }
.arena-vote-status.bad { background: rgba(231, 76, 60, 0.12); border-color: rgba(231, 76, 60, 0.6); color: #ff7b6e; }
.arena-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.arena-option {
    display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; padding: 18px 12px;
    background: rgba(0, 0, 0, 0.2); border: 2px solid rgba(255, 255, 255, 0.15); border-radius: 15px;
    color: #fff; font: inherit; text-align: center; transition: all 0.2s ease;
}
button.arena-option { cursor: pointer; }
button.arena-option:hover:not(:disabled) { border-color: #fff; background: rgba(0, 0, 0, 0.3); transform: translateY(-3px); }
.arena-option-label { color: #f39c12; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.arena-option-brawlers { display: flex; justify-content: center; gap: 10px; }
.arena-option-brawlers img { width: clamp(64px, 6vw, 92px); aspect-ratio: 1 / 1; object-fit: cover; border-radius: 15px; display: block; }
.arena-option-names { font-size: 1.05rem; }
.arena-option-cta { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
.arena-option.won { border-color: #f1c40f; background: rgba(241, 196, 15, 0.1); }
.arena-option.lost { opacity: 0.7; }
.arena-option.tie-good { border-color: #2ecc71; }
.arena-option.tie-bad { border-color: #e74c3c; }
.arena-option-result { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; }
.arena-option.won .arena-option-result { color: #f1c40f; }
.arena-option.tie-good .arena-option-result { color: #2ecc71; }
.arena-option.tie-bad .arena-option-result { color: #ff7b6e; }

.vote-engines { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; }
.vote-engines-caption { color: rgba(255, 255, 255, 0.6); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }
.vote-engine { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; column-gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); text-align: left; }
.vote-engine img { grid-row: span 2; width: 24px; height: 24px; border-radius: 6px; object-fit: contain; }
.vote-engine b { grid-column: 2; font-weight: 400; overflow-wrap: anywhere; }
.vote-engine small { grid-column: 2; color: rgba(255, 255, 255, 0.6); }

.arena-vote-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px; }
.arena-vote-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; padding: 13px 10px;
    border-radius: 25px; border: 2px solid transparent; cursor: pointer; color: #fff;
    font-family: "Lilita One", cursive; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); transition: all 0.2s ease;
}
.arena-vote-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.12); }
.arena-vote-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.arena-vote-btn.good { background: linear-gradient(45deg, #27ae60, #1e8449); }
.arena-vote-btn.bad { background: linear-gradient(45deg, #e74c3c, #b03a2e); }
.arena-vote-btn.skip { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); }
.arena-vote-btn.next { background: linear-gradient(45deg, #7363da, #4a3db3); width: 100%; margin-top: 16px; padding: 15px; font-size: 1.1rem; }
.vote-others { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.vote-others h3 { color: #f39c12; font-size: 1.05rem; margin-bottom: 10px; }
.vote-other-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px 0; }
.vote-other-picks { display: flex; gap: 6px; }
.vote-other-picks img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.vote-other-engines { display: flex; flex-wrap: wrap; gap: 6px; }
.vote-error { color: #ff7b6e; text-align: center; margin-top: 12px; }

@media (max-width: 1100px) {
    .arena-vote { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .arena-method { grid-template-columns: 1fr; gap: 20px; }
    .arena-filter { grid-template-columns: 1fr; gap: 4px; }
    .lb-columns { display: none; }
    .lb-row { grid-template-columns: 30px minmax(0, 1fr) auto; padding: 8px 12px; }
    .lb-row .col-votes, .lb-row .col-win, .lb-row .col-tier { display: none; }
    .lb-item.open .lb-details { grid-template-columns: 1fr; }
    .lb-details img { display: none; }
    .arena-home { padding: 0 8px; }
}
@media (max-width: 700px) {
    .arena-vote .draft-interface-grid { grid-template-columns: 1fr 1fr; }
    .arena-vote .draft-map-panel { grid-column: 1 / -1; order: -1; }
    .arena-vote .picks-container { flex-direction: row; justify-content: center; }
    .arena-vote .pick-wrapper { width: auto; }
    .arena-vote-map { max-height: 260px; }
    .arena-vote-actions { grid-template-columns: 1fr 1fr; }
    .arena-vote-btn.skip { grid-column: 1 / -1; }
    .vote-top-row { flex-direction: column; align-items: stretch; }
}

/* Tournament positions: tournament line, real team names (can be long), player names under the picks made,
   up to 6 bans per team (Matcherino's match bans plus the in-game ones). */
.vote-context { color: rgba(255, 255, 255, 0.75); font-size: 0.85rem; margin-bottom: 6px; }
.vote-context a { color: #f39c12; text-decoration: none; }
.vote-context a:hover { text-decoration: underline; }
.arena-vote .team-header { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.arena-vote .brawler-grid { flex-wrap: wrap; }
.arena-vote .pick-wrapper .vote-player { align-self: center; margin-left: 8px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.85); max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* After the vote: the same position opened in the draft tool. */
.arena-vote-btn.open-tool { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 12px; text-decoration: none; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2); }
.arena-vote-btn.open-tool:hover { background: rgba(255, 255, 255, 0.16); }
