/* Rankings oficiais (/gladiadores/): the site's layout around pages the PHP
   server still renders with their own inline <style> (issue #18).
   The Worker (src/gladiadores.js) loads this file last in <head>, adds the site
   navbar, footer and the breadcrumb, and puts class="gl-shell" on <body> of the
   pages that do not use the site layout yet. Everything that overrides those
   pages is scoped to .gl-shell; .gl-bar (breadcrumb + cross-links) is shared
   with the Liga dos Clans page, which already uses the site layout. */

/* ---------- Breadcrumb and cross-links ---------- */

.gl-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: .95rem;
  line-height: 1.4;
}

.gl-trail ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #9fb3c8;
}

.gl-trail li {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.gl-trail li + li::before {
  content: "›";
  margin: 0 .45rem;
  opacity: .6;
}

.gl-trail a {
  color: #47b5ed;
  text-decoration: none;
}

.gl-trail a:hover {
  color: #fbbf24;
}

.gl-trail [aria-current] {
  color: #e6f1f8;
}

.gl-related {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #9fb3c8;
  font-size: .85rem;
}

.gl-related a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(75, 180, 255, .22);
  background: rgba(13, 32, 48, .78);
  color: #d9effc;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}

.gl-related a:hover {
  border-color: #22a5e5;
  color: #fff;
}

.gl-related .fa-solid {
  width: auto;
  color: #fbbf24;
  font-size: .8rem;
}

/* Liga dos Clans: the breadcrumb sits above the hero title. */
.text-wrapper > .gl-bar {
  margin-bottom: 1.25rem;
}

@media (max-width: 991px) {
  .text-wrapper > .gl-bar {
    justify-content: center;
  }
  .text-wrapper > .gl-bar .gl-trail ol {
    justify-content: center;
  }
}

/* ---------- Pages with their own layout (body.gl-shell) ---------- */

/* Site typography: Jost for text, Fredoka One for page titles, VT323 for
   dates and server names (figures that read like the in-game scoreboard). */
body.gl-shell {
  font-family: var(--font-body);
  /* The navbar is fixed: reserve its height so nothing shifts under it. */
  padding-top: 80px;
}

.gl-shell h1,
.gl-shell .hero h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: .01em;
}

.gl-shell .hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.gl-shell .card h2,
.gl-shell .section-heading h2 {
  font-size: 2.1rem;
}

.gl-shell .date,
.gl-shell .server-name {
  font-family: var(--font-minecraft);
  font-weight: 400;
  letter-spacing: .02em;
}

.gl-shell .date {
  font-size: 1.6rem;
  line-height: 1.1;
}

.gl-shell .server-name {
  font-size: 2.4rem;
  line-height: 1;
}

.gl-shell .eyebrow,
.gl-shell .server-label,
.gl-shell .server-action,
.gl-shell .tab {
  font-weight: 600;
}

/* The navbar carries the logo now; the big hero logo only pushed the title down. */
.gl-shell main .hero > .logo {
  display: none;
}

.gl-shell main .hero > .logo-main {
  width: min(220px, 60vw);
  margin-bottom: 18px;
}

.gl-shell main > .gl-bar {
  max-width: 1000px;
  margin: 0 auto 26px;
}

.gl-shell main {
  padding-top: 22px;
}

@media (max-width: 760px) {
  .gl-shell main {
    padding-top: 16px;
  }
  .gl-shell main .hero > .logo-main {
  width: min(220px, 60vw);
  margin-bottom: 18px;
}

.gl-shell main > .gl-bar {
    margin-bottom: 18px;
  }
}

/* ---------- Navbar: undo the pages' own rules for .logo, .btn and * ---------- */

.gl-shell #mainNavbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  padding: 1rem 0;
}

.gl-shell #mainNavbar.navbar-scrolled {
  padding: .5rem 0;
}

.gl-shell #mainNavbar > .container-fluid {
  display: flex;
  flex-wrap: inherit;
  align-items: center;
  justify-content: space-between;
}

.gl-shell #mainNavbar .logo {
  display: inline-block;
  width: auto;
  height: 3rem;
  margin: 0;
  filter: none;
}

.gl-shell #mainNavbar.navbar-scrolled .logo {
  height: 2.5rem;
}

.gl-shell #mainNavbar .btn {
  white-space: nowrap;
  padding: .6rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  filter: none;
}

.gl-shell #mainNavbar .btn-loja {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 12px rgba(245, 158, 11, .4);
}

.gl-shell #mainNavbar .btn-loja:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 6px 16px rgba(245, 158, 11, .5);
}

.gl-shell #mainNavbar .btn-launcher {
  background: linear-gradient(135deg, #22a5e5, #1e8bc3);
  box-shadow: 0 4px 12px rgba(34, 165, 229, .3);
}

.gl-shell #mainNavbar .btn-launcher:hover {
  background: linear-gradient(135deg, #1e8bc3, #1a7aad);
  box-shadow: 0 6px 16px rgba(34, 165, 229, .4);
}

@media (max-width: 1199px) {
  .gl-shell #mainNavbar .navbar-buttons {
    padding-bottom: 1rem;
  }
}

@media (max-width: 360px) {
  body.gl-shell {
    padding-top: 67px;
  }
  .gl-shell #mainNavbar .logo {
    height: 2.2rem;
  }
}

/* ---------- Footer: undo the pages' own footer { } rule ---------- */

.gl-shell footer.footer {
  margin-top: auto;
  font-size: 1rem;
  text-align: left;
}

.gl-shell footer.footer p {
  margin: 0 0 1rem;
}

/* ---------- Phones: keep the breadcrumb bar to two short lines ---------- */

@media (max-width: 575px) {
  .gl-bar {
    gap: 8px;
    font-size: .85rem;
  }
  .gl-related > span {
    display: none;
  }
  .gl-related a {
    padding: 4px 10px;
    font-size: .8rem;
  }
}
