/* =========================================================
   RANKINGS HEADER
   ========================================================= */
.topbar{
  height:58px;
  padding:0 max(16px,calc((100% - 1180px)/2));
  gap:28px;
  background:#0c121b;
  border-bottom:1px solid #172332;
  box-shadow:0 1px 0 rgba(255,255,255,.015);
}
.brand-logo{
  width:100px;
  height:36px;
  object-fit:contain;
}
.brand>span:last-child{display:none}
.topbar nav{
  display:flex;
  align-items:center;
  gap:2px;
  flex:0 0 auto;
}
.topbar nav a{
  display:inline-flex;
  align-items:center;
  gap:7px;
  height:36px;
  padding:0 12px;
  border-radius:8px;
  color:#718097;
  font-size:13px;
  font-weight:600;
  background:transparent;
}
.topbar nav a::before{
  width:17px;
  height:17px;
  display:inline-grid;
  place-items:center;
  color:#718097;
  font-size:14px;
}
.topbar nav a[href*="rankings"]::before{content:"♜"}
.topbar nav a[href*="information"]::before{content:"ⓘ"}
.topbar nav a[href="#discord"]::before{content:"◎"}
.topbar nav a[href="#docs"]::before{content:"▤"}
.topbar nav a[href*="rankings"]::before,
.topbar nav a[href="#docs"]::before,
.topbar nav a[href$="#docs"]::before{
  content:"";
  background-repeat:no-repeat;
  background-position:center;
  background-size:17px 17px;
}
.topbar nav a[href*="rankings"]::before{background-image:url("/assets/rankings-icon.svg")}
.topbar nav a.store-nav-link::before{
  content:"";
  background-image:url("/assets/store-icon.svg");
  background-repeat:no-repeat;
  background-position:center;
  background-size:17px 17px;
}
.topbar nav a[href="#docs"]::before,
.topbar nav a[href$="#docs"]::before{background-image:url("/assets/api-docs-icon.svg")}
.topbar nav a.discord-nav-link::before{
  content:"";
  width:17px;
  height:17px;
  background-image:url("/assets/discords-icon.svg?v=2");
  background-position:center;
  background-repeat:no-repeat;
  background-size:17px 17px;
  font-size:0;
}
.topbar nav a:hover,
.topbar nav a.active{
  color:#edf2f7;
  background:#151e2b;
}
.topbar nav a:hover::before,
.topbar nav a.active::before{color:#dbe4ee}

.topbar>.search-wrap{
  order:3;
  flex:1 1 320px;
  max-width:360px;
  min-width:180px;
  height:36px;
  margin-left:auto;
  padding:0 10px;
  gap:8px;
  border-radius:8px;
  background:#101721;
  border:1px solid #1d2938;
  box-shadow:none;
}
.topbar>.search-wrap:focus-within{
  border-color:#34465c;
  box-shadow:0 0 0 2px rgba(100,130,165,.08);
}
.topbar>.search-wrap>span{font-size:17px;color:#7f91a8}
.topbar>.search-wrap input{height:34px;font-size:12px}
.topbar>.search-wrap kbd{display:none}
.topbar>.search-wrap .search-results{
  top:calc(100% + 7px);
  left:0;
  right:0;
  max-height:360px;
  background:#151a22;
  border-color:#273241;
  border-radius:8px;
  box-shadow:0 18px 45px rgba(0,0,0,.4);
}

main.rankings-page{
  width:min(1180px,calc(100% - 32px));
  padding:18px 0 60px;
}

/* Info strip */
.rankings-page .info-strip{
  min-height:45px;
  margin:10px 0 11px;
  padding:0 12px 5px;
  border:1px solid #1b2736;
  border-radius:8px;
  background:#0f1722;
  display:flex;
  align-items:last baseline;
  justify-content:space-between;
}
.rankings-page .ranking-info-button,
.topbar .ranking-info-button{
  margin-right:9px;
  height:29px;
  padding:0 11px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  border:1px solid #263447;
  border-radius:7px;
  background:#172131;
  color:#e0e7ef;
  font:inherit;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
.ranking-info-wrap{position:relative}
.topbar nav .ranking-info-button{
  height:36px;
  margin:0;
  padding:0 12px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#ffffff;
  font-size:13px;
  font-weight:600;
}
.topbar nav .ranking-info-icon{width:17px;height:17px;display:block}
.topbar nav .ranking-info-wrap:hover .ranking-info-button,
.topbar nav .ranking-info-button:focus-visible{background:#151e2b;color:#ffffff}
.ranking-info-popover{
  position:absolute;
  top:100%;
  left:0;
  z-index:20;
  width:320px;
  padding:12px;
  border:1px solid #2b374b;
  border-radius:10px;
  background:#111823;
  box-shadow:0 18px 40px rgba(0,0,0,.48);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(-4px);
  transition:opacity .15s ease,visibility .15s ease,transform .15s ease;
}
.ranking-info-popover.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}
.rankings-page .ranking-info-button span{
  width:17px;
  height:17px;
  display:grid;
  place-items:center;
  border:1px solid #405066;
  border-radius:50%;
  font-size:10px;
}
.rankings-page .ranking-info-button:hover{background:#202d40;border-color:#49617e}
.ranking-info-title-list{display:grid;gap:9px}
.ranking-info-title-row{display:grid;gap:2px}
.ranking-info-title-row strong{font-size:13px}
.ranking-info-title-icon,.overall-title-icon{display:inline-block;margin-right:5px;font-weight:800}
.ranking-info-title-row > span{color:var(--muted);font-size:11px}
.rankings-page .info-strip-left{
  display:flex;
  align-items:center;
  gap:9px;
  margin-left:0;
}
.ranked-player-count{display:flex;align-items:baseline;gap:8px;white-space:nowrap;transition:opacity .18s ease}
.ranked-player-count.fading-out{opacity:0;pointer-events:none}
.ranked-player-count .info-label{font-size:10px;color:#8190a3}
.ranked-player-count strong{font-size:13px;color:#e6ebf1}
/* Server IP */
.rankings-page .server-ip{
  zoom:.8;
  display:block;
  width:fit-content;
  margin-left:auto;
  padding:6px 0;
}
.server-ip-logo{
  width:16px;
  height:16px;
  object-fit:contain;
  flex:none;
}
.server-ip-body{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
}
.server-ip-label{
  display:flex;
  align-items:center;
  gap:5px;
  margin:0;
  color:#8190a3;
  font-size:12px;
  line-height:16px;
  font-weight:700;
  letter-spacing:0;
  text-transform:uppercase;
}
.server-ip-row{
  display:flex;
  align-items:center;
  gap:4px;
}
.server-ip-copy{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:4px 6px;
  border:0;
  border-radius:6px;
  background:#1c2533;
  color:#e6ebf1;
  font:inherit;
  font-size:12px;
  line-height:16px;
  font-weight:600;
  cursor:pointer;
  transition:background .15s ease;
}
.server-ip-copy:hover{background:#222d3d}
.server-ip-copy-icon,
.server-ip-check-icon{
  flex:none;
  display:block;
  overflow:visible;
}
.server-ip-copy-icon{
  opacity:.2;
  transition:opacity .2s ease;
}
.server-ip-copy:hover .server-ip-copy-icon,
.server-ip-copy:focus-visible .server-ip-copy-icon{opacity:1}
.server-ip-check-icon{display:none;color:#4ade80}
.server-ip-copy.copied .server-ip-copy-icon{display:none}
.server-ip-copy.copied .server-ip-check-icon{display:block}
.server-ip-copy:focus-visible{outline:2px solid #91a5c4;outline-offset:2px}
.rankings-page .info-strip code{
  padding:6px 9px;
  border-radius:6px;
  background:#172131;
  color:#c3ceda;
  font-size:10px;
  letter-spacing:.1px;
}
@media(max-width:520px){
  .ranked-player-count .info-label{display:none}
  .ranked-player-count{gap:0}

}

.rankings-page>.toolbar{
  display:none;
}

.table-card:not(.overall-active) .mode-tier-column{
  overflow:visible;
}
.table-card:not(.overall-active) .mode-board-player{
  position:relative;
  z-index:0;
  border:1px solid transparent;
  border-radius:7px;
  transition:background .15s ease,box-shadow .15s ease,transform .15s ease,border-color .15s ease;
}
.table-card:not(.overall-active) .mode-board-player:hover{
  background:#34445d!important;
  border-color:#7187a8;
  box-shadow:0 0 0 1px #7187a8,0 8px 20px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.08);
  transform:translateY(-2px) scale(1.025);
  z-index:3;
}

@media(max-width:900px){
  .topbar{gap:8px}
  .topbar nav a{padding:0 8px}
  .topbar>.search-wrap{flex-basis:240px;max-width:280px}
}
@media(max-width:750px){
  body{zoom:1}
  .topbar{height:58px;padding:0 12px}
  .brand-logo{width:80px;height:33px}
  .topbar nav{display:none}
  .topbar>.search-wrap{display:flex;flex:1 1 auto;max-width:none;min-width:0;margin-left:auto}
  main.rankings-page{width:calc(100% - 20px);padding-top:12px}
  .rankings-page .info-strip{padding:0 9px}
}

.profile-hero h2{
  display:inline-block !important;
  width:max-content !important;
  max-width:none !important;
  min-width:0 !important;
  overflow:visible !important;
  white-space:nowrap !important;
  padding-inline:8px !important;
  box-sizing:content-box !important;
}

.ap-style-setting-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.ap-check-state{font-size:11px;font-weight:900;letter-spacing:.5px;min-width:62px;color:#8b96a8}

.gradient-editor{border:1px solid var(--border);border-radius:12px;padding:12px;background:#11161e;min-width:0}
.gradient-editor:disabled{opacity:.45;filter:saturate(.55)}
.gradient-track-wrap{padding:7px 12px 18px}
.gradient-track{position:relative;height:34px;border-radius:8px;border:1px solid #354052;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);touch-action:none}
.gradient-stop{position:absolute;top:50%;width:25px;height:25px;transform:translate(-50%,-50%);border-radius:50%;border:1px solid #fff;box-shadow:0 2px 7px rgba(0,0,0,.35);cursor:grab;padding:0;z-index:2}
.gradient-stop.selected{width:29px;height:29px;outline:2px solid #fff;outline-offset:1px}
.gradient-editor-row{display:flex;gap:14px;align-items:flex-end}
.gradient-editor-main{flex:1;min-width:0}
.gradient-control-grid,.gradient-bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.gradient-bottom-grid{margin-top:12px}
.gradient-editor label{display:block;font-size:12px;font-weight:700;margin-bottom:6px}
.gradient-color-input{display:flex;gap:7px;align-items:center}
.gradient-color-input input[type=color]{width:45px;height:40px;padding:3px;border:1px solid var(--border);border-radius:8px;background:#11141b}
.gradient-color-input .ap-input{min-width:0}
.gradient-position-wrap{display:flex;align-items:center;gap:7px}
.gradient-position-wrap .ap-input{min-width:0}
.gradient-position-wrap span{font-weight:700;color:#8d97a7}
.gradient-editor-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}
.gradient-editor-actions .ap-btn{min-height:40px}

.ap-elo-editor{display:flex;align-items:center;gap:8px;min-width:210px}
.ap-elo-input{width:120px}
.ap-elo-preview{min-width:58px;padding:7px 9px;border:1px solid var(--border);border-radius:8px;background:#11141b;color:var(--text);font-size:12px;font-weight:800;text-align:center}
.ap-elo-hint{display:block;margin-top:0;color:var(--muted);font-size:10px;grid-column:1 / -1}
.ap-rank-field{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 10px}

@media (max-width:700px){.gradient-editor-row{flex-direction:column;align-items:stretch}.gradient-editor-actions{justify-content:flex-start}.gradient-control-grid,.gradient-bottom-grid{grid-template-columns:1fr}}
