/* Character profile modal shared by leaderboard and homepage. */
.player-profile-modal[hidden] { display: none !important; }
.player-profile-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; }
.player-profile-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); animation: player-profile-fade .16s ease-out; }
.player-profile-dialog { position: relative; width: min(100%, 540px); max-height: min(90vh, 720px); overflow: auto; padding: 32px; color: #f7f7f7; background: linear-gradient(145deg, rgba(24, 24, 24, .99), rgba(8, 8, 8, .99)); border: 1px solid rgba(255, 35, 35, .32); border-radius: 22px; box-shadow: 0 25px 100px rgba(0,0,0,.65), 0 0 50px rgba(255,0,0,.09); animation: player-profile-rise .2s ease-out; outline: none; }
.player-profile-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; display: grid; place-items: center; color: #eee; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 11px; cursor: pointer; }
.player-profile-close:hover { color: #fff; background: #b91018; border-color: #e22b32; }
.player-profile-header { display: flex; align-items: center; gap: 20px; padding: 8px 40px 24px 0; border-bottom: 1px solid rgba(255,255,255,.09); }
.player-profile-rank { width: 82px; height: 82px; flex: 0 0 82px; object-fit: contain; filter: drop-shadow(0 0 18px rgba(255,36,36,.25)); }
.player-profile-title-group { min-width: 0; }
.player-profile-eyebrow { display: block; margin-bottom: 6px; color: #ff5a5f; font-size: 10px; font-weight: 800; letter-spacing: 2.1px; }
.player-profile-title-group h2 { margin: 0 0 8px; color: #fff; font-size: clamp(21px, 4vw, 28px); line-height: 1.2; overflow-wrap: anywhere; }
.player-profile-id { color: #888; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.player-profile-status { min-height: 24px; padding: 20px 0 12px; color: #aaa; font-size: 13px; }
.player-profile-status.is-error { color: #ff777c; }
.player-profile-stats[hidden] { display: none !important; }
.player-profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.player-profile-stat { min-width: 0; padding: 16px 13px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; }
.player-profile-stat span { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; color: #aaa; font-size: 11px; }
.player-profile-stat span i { color: #ff4148; }
.player-profile-stat strong { display: block; color: #fff; font-size: clamp(16px, 2.6vw, 21px); overflow-wrap: anywhere; }
.player-profile-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); }
.player-profile-footer span { color: #777; font-size: 11px; }
.player-profile-footer span i { color: #e32a31; margin-right: 5px; }
.player-profile-footer button { padding: 9px 17px; color: #fff; font-weight: 700; background: #a90e16; border: 1px solid #e12b32; border-radius: 9px; cursor: pointer; }
.player-profile-footer button:hover { background: #d21c25; }
body.player-profile-open { overflow: hidden; }
.player-name-link { display: inline-flex; align-items: center; gap: 9px; padding: 0; color: #fff; background: transparent; border: 0; font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.player-name-link i { color: #ff4a50; font-size: 10px; opacity: .62; transition: transform .16s, opacity .16s; }
.player-name-link:hover { color: #ff6469; }
.player-name-link:hover i { opacity: 1; transform: translate(2px,-2px); }
.player-id { display: block; margin-top: 4px; color: #666; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.player-ranking-table .player-column { text-align: left; min-width: 190px; }
.player-ranking-table .rank-img { width: 44px; height: 44px; }
.player-ranking-table tbody tr.top-1 .rank-number { color: #ffd765; }
.player-ranking-table tbody tr.top-2 .rank-number { color: #d6dce5; }
.player-ranking-table tbody tr.top-3 .rank-number { color: #d99b6a; }
.leaderboard-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.leaderboard-heading h2 { margin: 0; color: #f5f5f5; font-size: 19px; font-weight: 800; letter-spacing: .4px; }
.leaderboard-heading h2 i { margin-right: 9px; color: #ff343a; }
.leaderboard-caption { color: #777; font-size: 11px; }
@keyframes player-profile-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes player-profile-rise { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 560px) { .player-profile-dialog { padding: 24px 18px 18px; } .player-profile-header { gap: 13px; } .player-profile-rank { width: 64px; height: 64px; flex-basis: 64px; } .player-profile-stats { grid-template-columns: 1fr; gap: 8px; } .player-profile-stat { padding: 12px; } .player-profile-stat span { margin-bottom: 6px; } .player-profile-footer { align-items: flex-start; } .player-profile-footer span { max-width: 65%; line-height: 1.5; } }

/* The current-character modal trigger is a button styled like the existing navigation links. */
nav button.nav-btn { border: 0; font-family: 'Be Vietnam Pro', sans-serif; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: all .3s ease; }
nav button.nav-btn:focus-visible, .player-name-link:focus-visible, .player-profile-close:focus-visible, .player-profile-footer button:focus-visible { outline: 2px solid #ff6469; outline-offset: 3px; }
@media (max-width: 768px) { nav button.nav-btn { width: 100%; padding: 10px 16px; text-align: center; } }
