/* Dedicated RedWave Servers page stylesheet.
   Kept separate from styles.css so Cloudflare/browser caching cannot leave
   the Servers page half-styled. */

.servers-page .server-showcase-logo {
  width: 76px !important;
  max-width: 76px !important;
  height: auto !important;
}

.servers-page .server-showcase-main {
  width: 100%;
}

.servers-page .server-showcase-card {
  width: 100%;
}

/* ==========================================================================
   Compact RedWave Servers carousel
   ========================================================================== */

.servers-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(2, 8, 11, .62), rgba(2, 7, 9, .90)),
    url("/assets/images/redwave-home-background.webp") center / cover fixed no-repeat;
}

.server-showcase-main {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 125px 24px 70px;
}

.server-showcase {
  width: min(760px, 100%);
  text-align: center;
}

.server-showcase-heading {
  margin: 0 auto 26px;
}

.server-showcase-logo {
  display: block;
  width: 76px;
  height: auto;
  margin: 0 auto 10px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35));
}

.server-showcase-heading h1 {
  margin: 5px 0 8px;
  font-family: "Black Ops One", Impact, sans-serif;
  font-size: clamp(46px, 7vw, 72px);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.025em;
}

.server-showcase-heading > p:last-child {
  max-width: 620px;
  margin: 0 auto;
  color: #c5cfcb;
  font-size: 14px;
}

.server-carousel-shell {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 14px;
}

.server-carousel-stage {
  min-width: 0;
}

.server-carousel-arrow {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(10, 20, 23, .78);
  color: #fff;
  cursor: pointer;
  transition:
    background .18s ease,
    border-color .18s ease,
    transform .18s ease;
}

.server-carousel-arrow span {
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-2px);
}

.server-carousel-arrow:hover {
  border-color: rgba(219, 52, 52, .72);
  background: rgba(219, 52, 52, .22);
  transform: translateY(-1px);
}

.server-carousel-arrow[hidden] {
  visibility: hidden;
}

.server-showcase-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(19, 36, 40, .96), rgba(8, 17, 19, .96));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .45),
    inset 0 1px rgba(255, 255, 255, .025);
  text-align: left;
}

.server-showcase-card.slide-from-right {
  animation: serverSlideFromRight .28s ease;
}

.server-showcase-card.slide-from-left {
  animation: serverSlideFromLeft .28s ease;
}

@keyframes serverSlideFromRight {
  from {
    opacity: .35;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes serverSlideFromLeft {
  from {
    opacity: .35;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.server-showcase-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 20px;
}

.server-live-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.server-live-line strong {
  font-size: 23px;
  line-height: 1.1;
}

.server-live-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #e0a750;
  box-shadow: 0 0 14px rgba(224, 167, 80, .6);
}

.server-live-dot.is-online {
  background: #55d97b;
  box-shadow: 0 0 14px rgba(85, 217, 123, .75);
}

.server-live-dot.is-offline {
  background: #e05050;
  box-shadow: 0 0 14px rgba(224, 80, 80, .72);
}

.server-showcase-location {
  display: block;
  margin: 7px 0 0 22px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.server-showcase-players {
  flex: 0 0 auto;
  text-align: right;
}

.server-showcase-players strong,
.server-showcase-players span {
  display: block;
}

.server-showcase-players strong {
  font-size: 25px;
  line-height: 1;
}

.server-showcase-players span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.server-compact-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .07);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.server-compact-meta > div {
  min-width: 0;
  padding: 14px 18px;
  border-right: 1px solid rgba(255, 255, 255, .07);
  text-align: center;
}

.server-compact-meta > div:last-child {
  border-right: 0;
}

.server-compact-meta span,
.server-compact-meta strong {
  display: block;
}

.server-compact-meta span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.server-compact-meta strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.server-mods-area {
  padding: 20px 26px 23px;
}

.server-mods-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.server-mods-heading span,
.server-mods-heading strong {
  color: #b9c4c0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}

.server-mods-heading strong {
  color: #fff;
}

.server-mod-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 25px;
}

.server-mod-chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(5, 13, 15, .42);
  color: #e7edeb;
  font-size: 10px;
  line-height: 1.15;
}

.server-mod-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
}

.server-mod-chip-more {
  border-color: rgba(219, 52, 52, .45);
  color: #ffd0d0;
}

.server-mod-chip-more::before,
.server-mod-chip-loading::before {
  display: none;
}

.server-connect-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
  transition:
    filter .18s ease,
    transform .18s ease;
}

.server-connect-button:hover {
  filter: brightness(1.08);
}

.server-connect-icon {
  font-size: 16px;
}

.server-carousel-footer {
  display: grid;
  place-items: center;
  gap: 15px;
  margin-top: 18px;
}

.server-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.server-carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  cursor: pointer;
}

.server-carousel-dot.is-active {
  width: 24px;
  background: var(--accent);
}

.server-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 17px;
  border: 1px solid rgba(224, 167, 80, .38);
  background: rgba(4, 12, 14, .82);
}

.server-online-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e0a750;
}

.server-online-pill strong {
  color: #e0a750;
  font-size: 10px;
  letter-spacing: .14em;
}

.server-online-pill.is-online {
  border-color: rgba(85, 217, 123, .42);
}

.server-online-pill.is-online .server-online-pill-dot {
  background: #55d97b;
  box-shadow: 0 0 9px rgba(85, 217, 123, .72);
}

.server-online-pill.is-online strong {
  color: #74ed96;
}

.server-online-pill.is-offline {
  border-color: rgba(224, 80, 80, .42);
}

.server-online-pill.is-offline .server-online-pill-dot {
  background: #e05050;
}

.server-online-pill.is-offline strong {
  color: #ff7777;
}

.server-showcase-updated {
  margin-top: 11px;
  color: rgba(210, 220, 216, .55);
  font-size: 9px;
  text-align: center;
}

.servers-footer {
  position: relative;
  z-index: 2;
  background: rgba(4, 10, 12, .94);
}

@media (max-width: 760px) {
  .servers-page {
    background-attachment: scroll;
  }

  .server-showcase-main {
    padding: 112px 16px 58px;
  }

  .server-showcase-heading {
    margin-bottom: 20px;
  }

  .server-showcase-heading > p:last-child {
    font-size: 12px;
  }

  .server-carousel-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .server-carousel-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 42px;
    height: 50px;
    transform: translateY(-50%);
    background: rgba(2, 9, 11, .88);
  }

  .server-carousel-arrow:hover {
    transform: translateY(-50%);
  }

  .server-carousel-prev {
    left: -5px;
  }

  .server-carousel-next {
    right: -5px;
  }

  .server-carousel-arrow[hidden] {
    display: none;
  }

  .server-showcase-card-head {
    align-items: flex-start;
    padding: 21px 20px 18px;
  }

  .server-live-line strong {
    font-size: 19px;
  }

  .server-showcase-location {
    margin-left: 21px;
  }

  .server-showcase-players strong {
    font-size: 20px;
  }

  .server-showcase-players span {
    font-size: 8px;
  }

  .server-compact-meta > div {
    padding: 12px 8px;
  }

  .server-mods-area {
    padding: 18px 20px 20px;
  }

  .server-mod-chip {
    font-size: 9px;
  }
}

@media (max-width: 430px) {
  .server-showcase-logo {
    width: 60px;
  }

  .server-showcase-heading h1 {
    font-size: 43px;
  }

  .server-showcase-card-head {
    flex-direction: column;
    gap: 13px;
  }

  .server-showcase-players {
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-align: left;
  }

  .server-showcase-players span {
    margin-top: 0;
  }

  .server-compact-meta {
    grid-template-columns: 1fr 1fr;
  }

  .server-compact-meta > div {
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }

  .server-compact-meta > div:nth-child(2) {
    border-right: 0;
  }

  .server-compact-meta > div:nth-child(3) {
    grid-column: 1 / -1;
    border-bottom: 0;
  }
}

/* ==========================================================================
   Desktop server carousel alignment fix
   Keeps the live server card in the center grid column even when there is
   only one server and the previous/next controls are hidden.
   ========================================================================== */

@media (min-width: 761px) {
  .server-carousel-prev {
    grid-column: 1;
    grid-row: 1;
  }

  .server-carousel-stage {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }

  .server-carousel-next {
    grid-column: 3;
    grid-row: 1;
  }

  .server-carousel-arrow[hidden] {
    display: grid !important;
    visibility: hidden !important;
    pointer-events: none;
  }

  .server-showcase-card {
    width: 100%;
    min-width: 0;
  }
}

/* Clickable +X more / Show less control for server mods */
.server-mod-chip-toggle {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition:
    border-color .18s ease,
    background .18s ease,
    color .18s ease,
    transform .18s ease;
}

.server-mod-chip-toggle:hover {
  border-color: rgba(219, 52, 52, .9);
  background: rgba(219, 52, 52, .14);
  color: #fff;
  transform: translateY(-1px);
}

.server-mod-chip-toggle:focus-visible {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(219, 52, 52, .45);
}


