
/* =========================================================
   GHOULCRAFT LIVE SERVER STATUS
   ========================================================= */
.server-live-section {
  position: relative;
}

.server-section-head {
  align-items: center;
}

.server-status-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: .65rem;
}

.server-status-pill {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .72rem;
  border: 1px solid rgba(0,229,255,.24);
  border-radius: 999px;
  color: #b8f9ff;
  background: rgba(0,229,255,.055);
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.server-status-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--studio-cyan);
  box-shadow: 0 0 13px var(--studio-cyan);
}

.server-status-pill.is-online {
  border-color: rgba(73,227,166,.32);
  color: #96f4cd;
  background: rgba(73,227,166,.07);
}

.server-status-pill.is-online i {
  background: #49e3a6;
  box-shadow: 0 0 13px #49e3a6;
  animation: serverPulse 1.8s ease-in-out infinite;
}

.server-status-pill.is-offline {
  border-color: rgba(251,113,133,.32);
  color: #ffacb8;
  background: rgba(251,113,133,.07);
}

.server-status-pill.is-offline i {
  background: #fb7185;
  box-shadow: 0 0 13px #fb7185;
}

.server-status-pill.is-loading i {
  animation: serverPulse 1.1s ease-in-out infinite;
}

.server-refresh-button {
  min-height: 35px;
  padding: .45rem .72rem;
  border: 1px solid rgba(168,85,247,.25);
  border-radius: .68rem;
  color: #d5d3e2;
  background: rgba(168,85,247,.055);
  font: inherit;
  font-size: .67rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}

.server-refresh-button:hover {
  transform: translateY(-2px);
  border-color: rgba(0,229,255,.38);
  color: #fff;
}

.server-refresh-button:disabled {
  cursor: wait;
  opacity: .56;
  transform: none;
}

.server-live-card {
  position: relative;
  display: grid;
  grid-template-columns: 230px minmax(0,1fr) minmax(285px,.72fr);
  align-items: stretch;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid rgba(0,229,255,.19);
  border-radius: 1.45rem;
  background:
    linear-gradient(rgba(0,229,255,.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,85,247,.038) 1px, transparent 1px),
    radial-gradient(circle at 10% 16%, rgba(168,85,247,.18), transparent 30%),
    radial-gradient(circle at 92% 78%, rgba(0,229,255,.11), transparent 33%),
    linear-gradient(135deg, rgba(18,12,35,.95), rgba(5,16,25,.93));
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  box-shadow:
    0 30px 72px rgba(0,0,0,.28),
    0 0 44px rgba(0,229,255,.045);
}

.server-live-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background:
    linear-gradient(90deg, transparent, var(--studio-purple),
    var(--studio-cyan), transparent);
  opacity: .86;
}

.server-live-art {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  border-right: 1px solid rgba(255,255,255,.075);
  isolation: isolate;
}

.server-icon-orbit {
  position: absolute;
  width: 178px;
  height: 178px;
  border: 1px solid rgba(0,229,255,.22);
  border-radius: 50%;
  box-shadow:
    0 0 0 18px rgba(168,85,247,.025),
    0 0 55px rgba(0,229,255,.11),
    inset 0 0 30px rgba(168,85,247,.07);
  animation: serverOrbit 17s linear infinite;
}

.server-icon-orbit::before,
.server-icon-orbit::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.server-icon-orbit::before {
  top: 15px;
  right: 26px;
  background: var(--studio-cyan);
  box-shadow: 0 0 13px var(--studio-cyan);
}

.server-icon-orbit::after {
  left: 13px;
  bottom: 31px;
  background: #b47cff;
  box-shadow: 0 0 13px #b47cff;
}

.server-live-icon {
  position: relative;
  z-index: 2;
  width: 126px;
  height: 126px;
  image-rendering: pixelated;
  object-fit: contain;
  border: 1px solid rgba(0,229,255,.25);
  border-radius: 1.15rem;
  background: rgba(3,7,14,.88);
  box-shadow:
    0 18px 36px rgba(0,0,0,.4),
    0 0 30px rgba(0,229,255,.10);
}

.server-edition {
  position: relative;
  z-index: 2;
  padding: .32rem .55rem;
  border: 1px solid rgba(192,132,252,.23);
  border-radius: 999px;
  color: #c7b1dd;
  background: rgba(168,85,247,.055);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.server-live-copy {
  min-width: 0;
  padding: 2.1rem 2rem;
  align-self: center;
}

.server-overline {
  margin: 0 0 .7rem;
  color: var(--studio-cyan);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.server-live-copy h3 {
  margin: 0;
  font-size: clamp(2rem,3.4vw,3.4rem);
  line-height: .98;
  letter-spacing: -.052em;
}

.server-motd {
  min-height: 58px;
  margin: 1.1rem 0 1.35rem;
  color: #b9bdcc;
  font-size: .98rem;
  line-height: 1.65;
  white-space: pre-line;
}

.server-address-row {
  display: flex;
  align-items: center;
  max-width: 530px;
  overflow: hidden;
  border: 1px solid rgba(0,229,255,.19);
  border-radius: .8rem;
  background: rgba(3,7,14,.72);
}

.server-address-row code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding: .8rem .9rem;
  color: #e4fbff;
  font-family: "Cascadia Code","SFMono-Regular",Consolas,monospace;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-address-row button {
  align-self: stretch;
  border: 0;
  border-left: 1px solid rgba(0,229,255,.15);
  color: #071018;
  background: linear-gradient(105deg,#c084fc,#8179ff 45%,#00e5ff);
  padding: .75rem .9rem;
  font: inherit;
  font-size: .68rem;
  font-weight: 850;
  cursor: pointer;
}

.server-check-note {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .9rem;
  margin: .8rem 0 0;
  color: #71788a;
  font-size: .63rem;
}

.server-live-metrics {
  display: grid;
  grid-template-rows: repeat(3,1fr);
  border-left: 1px solid rgba(255,255,255,.075);
  background: rgba(2,8,15,.26);
}

.server-live-metric {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid rgba(255,255,255,.075);
}

.server-live-metric:last-child {
  border-bottom: 0;
}

.server-live-metric span {
  color: var(--studio-cyan);
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.server-live-metric strong {
  margin-top: .22rem;
  overflow-wrap: anywhere;
  font-size: 1.48rem;
  letter-spacing: -.035em;
}

.server-live-metric small {
  margin-top: .12rem;
  color: #777d90;
  font-size: .63rem;
}

@keyframes serverOrbit {
  to { transform: rotate(360deg); }
}

@keyframes serverPulse {
  50% { opacity: .35; transform: scale(.72); }
}

@media (prefers-reduced-motion: reduce) {
  .server-icon-orbit,
  .server-status-pill i {
    animation: none !important;
  }
}

@media (max-width: 1000px) {
  .server-live-card {
    grid-template-columns: 210px minmax(0,1fr);
  }

  .server-live-metrics {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3,1fr);
    grid-template-rows: auto;
    border-top: 1px solid rgba(255,255,255,.075);
    border-left: 0;
  }

  .server-live-metric {
    border-right: 1px solid rgba(255,255,255,.075);
    border-bottom: 0;
  }

  .server-live-metric:last-child {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .server-section-head {
    align-items: flex-start;
  }

  .server-status-actions {
    width: 100%;
    justify-content: space-between;
  }

  .server-live-card {
    grid-template-columns: 1fr;
  }

  .server-live-art {
    min-height: 255px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.075);
  }

  .server-live-copy {
    padding: 1.55rem 1.25rem;
  }

  .server-address-row {
    align-items: stretch;
    flex-direction: column;
  }

  .server-address-row button {
    border-top: 1px solid rgba(0,229,255,.15);
    border-left: 0;
  }

  .server-live-metrics {
    grid-template-columns: 1fr;
  }

  .server-live-metric {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.075);
  }

  .server-live-metric:last-child {
    border-bottom: 0;
  }
}


/* =========================================================
   FULL FORMATTED MINECRAFT MOTD
   ========================================================= */
.server-motd {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: .18rem;
  overflow: visible;
  color: #d7d9e5;
  line-height: 1.52;
  white-space: normal;
}

.server-motd-line {
  min-height: 1.52em;
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.server-motd-line span {
  text-shadow: 0 0 12px currentColor;
  text-shadow: 0 0 12px color-mix(in srgb, currentColor 24%, transparent);
}

.server-extra-info {
  max-width: 530px;
  margin: -.5rem 0 1.2rem;
  padding: .75rem .85rem;
  border: 1px solid rgba(192,132,252,.17);
  border-radius: .72rem;
  background: rgba(168,85,247,.045);
}

.server-extra-info > span {
  display: block;
  margin-bottom: .42rem;
  color: #bc95dd;
  font-size: .56rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.server-extra-info [data-server-extra-lines] {
  display: grid;
  gap: .18rem;
  color: #aeb2c3;
  font-size: .72rem;
  line-height: 1.48;
}

.server-extra-info .server-motd-line {
  min-height: auto;
}

@supports not (color: color-mix(in srgb, white 50%, transparent)) {
  .server-motd-line span {
    text-shadow: none;
  }
}

@media (max-width: 720px) {
  .server-motd {
    font-size: .9rem;
  }
}
