:root {
  --bg: #0f1a1b;
  --panel: #152628;
  --ink: #e8f1e7;
  --muted: #b2c8bb;
  --brand: #b7e36b;
  --brand-dark: #7da840;
  --line: #2a3f42;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(12, 22, 24, 0.78), rgba(12, 22, 24, 0.85)),
    url("/static/images/backgrounds/Z%20GOAT%20Social%20Club%202.jpg") center / cover no-repeat fixed,
    radial-gradient(circle at 10% 10%, #1d2f31 0%, var(--bg) 52%),
    linear-gradient(125deg, #101a1b 0%, #172b2d 100%);
  min-height: 100vh;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 24, 26, 0.72);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  opacity: 0.95;
}

nav a:hover {
  color: var(--brand);
}

.page-wrap {
  width: min(1024px, 92vw);
  margin: 2rem auto;
  display: grid;
  gap: 1rem;
}

.hero,
.panel {
  background: rgba(21, 38, 40, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem;
}

.hidden {
  display: none !important;
}

.hero-copy h4 {
  line-height: 1.7;
  font-weight: 500;
  margin-bottom: 0;
}

.hero-carousel-panel {
  padding: 1rem;
}

.carousel-shell {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  transition: transform 480ms ease;
  will-change: transform;
}

.goat-slide {
  min-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  background: rgba(16, 30, 31, 0.95);
}

.goat-slide img {
  max-width: min(100%, 560px);
  max-height: 420px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.goat-slide h2 {
  margin-top: 0.6rem;
}

.hidden {
  display: none !important;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin: 0;
}

h1,
h2,
p {
  margin-top: 0.4rem;
}

.muted {
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  border: 1px solid var(--brand-dark);
  background: var(--brand);
  color: #102012;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.carousel-nav {
  border: 1px solid var(--line);
  background: #1b3133;
  color: var(--ink);
  border-radius: 8px;
  height: 42px;
  width: 42px;
  font-size: 1.1rem;
  cursor: pointer;
}

.goat-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  background: rgba(16, 30, 31, 0.95);
}

.goat-card-home {
  min-height: 360px;
}

.goat-card img {
  max-width: min(100%, 560px);
  max-height: 420px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.watermark::after {
  content: "GOAT and Friends";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(1.2rem, 5vw, 3rem);
  color: rgba(232, 241, 231, 0.16);
  transform: rotate(-18deg);
  pointer-events: none;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.social-links a {
  color: var(--brand);
}

.public-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
}

.public-goat-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: rgba(12, 22, 24, 0.68);
}

.public-goat-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.public-goat-card h3 {
  margin: 0.2rem 0;
}

.roster-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 1rem;
}

.roster-sidebar,
.roster-editor {
  min-width: 0;
}

.member-list {
  display: grid;
  gap: 0.75rem;
  max-height: 68vh;
  overflow: auto;
  padding-right: 0.25rem;
}

.member-card {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(12, 22, 24, 0.6);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.6rem;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.75rem;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.member-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(183, 227, 107, 0.22);
}

.member-card img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
}

.member-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.roster-editor-grid {
  grid-template-columns: 1.4fr 1fr;
}

.editor-main {
  display: grid;
  gap: 0.75rem;
}

.editor-preview {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  display: grid;
  align-content: start;
  justify-items: center;
  text-align: center;
}

.editor-preview img {
  width: min(100%, 260px);
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.admin-login-form {
  display: grid;
  gap: 0.75rem;
  max-width: 420px;
}

.admin-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

input,
textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0f1d1f;
  color: var(--ink);
  padding: 0.55rem;
}

textarea {
  font-family: "Courier New", monospace;
}

.editor-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.75rem;
}

.hint-box {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.8rem;
  color: var(--muted);
}

.server-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.server-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.summary-pill,
.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.summary-pill.online,
.status-pill.online {
  border-color: #4bb870;
  color: #8be4a4;
}

.summary-pill.degraded,
.status-pill.degraded {
  border-color: #dcb857;
  color: #efd98e;
}

.summary-pill.offline,
.status-pill.offline {
  border-color: #ca6363;
  color: #f09b9b;
}

.summary-pill.unknown,
.status-pill.unknown {
  border-color: #708ea2;
  color: #bdd1df;
}

.server-error {
  border: 1px solid #ca6363;
  border-radius: 10px;
  background: rgba(95, 25, 25, 0.35);
  color: #f4b0b0;
  padding: 0.65rem 0.8rem;
}

.server-group {
  margin: 1.2rem 0;
}

.server-group h2 {
  margin: 0 0 0.65rem;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0.8rem;
}

.server-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: rgba(12, 24, 26, 0.84);
}

.server-card.online {
  border-color: rgba(75, 184, 112, 0.9);
}

.server-card.degraded {
  border-color: rgba(220, 184, 87, 0.9);
}

.server-card.offline {
  border-color: rgba(202, 99, 99, 0.95);
}

.server-card.unknown {
  border-color: rgba(112, 142, 162, 0.95);
}

.server-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.server-card-header h3 {
  margin: 0;
}

.server-kind {
  margin: 0.35rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.server-metrics {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.server-metric {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.45rem;
}

.server-metric dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.server-metric dd {
  margin: 0;
  word-break: break-word;
}

.server-details {
  margin-top: 0.7rem;
}

.server-details summary {
  cursor: pointer;
  color: var(--brand);
}

.server-details pre {
  margin-top: 0.5rem;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1718;
  max-height: 240px;
  overflow: auto;
}

.map-editor-section {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 22, 24, 0.7);
  padding: 1rem;
}

.admin-panel-header.compact {
  margin-bottom: 0.9rem;
}

.map-editor-controls {
  margin-bottom: 0.75rem;
}

.country-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.country-chip {
  border: 1px solid var(--line);
  background: rgba(18, 32, 34, 0.9);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.country-chip:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.country-chip.selected {
  background: rgba(183, 227, 107, 0.18);
  border-color: var(--brand);
  color: var(--brand);
}

.goatfest-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.map-shell {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 23, 24, 0.92);
  padding: 1rem;
  overflow: hidden;
}

#goatfest-world {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 25%, rgba(183, 227, 107, 0.08), rgba(12, 22, 24, 0.8) 60%);
}

.continent {
  fill: rgba(255, 255, 255, 0.07);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 2;
}

.country-outline {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(232, 241, 231, 0.4);
  stroke-width: 0.9;
  cursor: pointer;
  transition: fill 150ms ease, stroke 150ms ease;
}

.country-outline.visited {
  fill: rgba(183, 227, 107, 0.8);
  stroke: rgba(122, 168, 44, 0.95);
}

.goatfest-map-pin {
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.country-marker {
  fill: rgba(232, 241, 231, 0.35);
  stroke: rgba(232, 241, 231, 0.45);
  stroke-width: 1.25;
}

.country-marker.visited {
  fill: var(--brand);
  stroke: rgba(122, 168, 44, 0.8);
}

.country-marker-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.country-marker.visited + .country-marker-label {
  fill: #dff7ae;
}

.goatfest-sidebar {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 22, 24, 0.7);
  padding: 1rem;
}

.goatfest-story {
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 22, 24, 0.6);
  padding: 1rem 1.2rem;
}

.goatfest-story p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.count-pill {
  display: inline-block;
  margin: 0.4rem 0 0.8rem;
  border: 1px solid var(--brand);
  color: var(--brand);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-weight: 700;
}

.country-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  max-height: 360px;
  overflow: auto;
}

.country-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  background: rgba(16, 30, 31, 0.72);
}

@media (max-width: 800px) {
  .two-col,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .roster-layout,
  .roster-editor-grid,
  .social-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel-header {
    flex-direction: column;
  }

  .carousel {
    grid-template-columns: 1fr;
  }

  .carousel-shell {
    grid-template-columns: 1fr;
  }

  .carousel-nav {
    width: 100%;
  }

  .server-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .goatfest-layout {
    grid-template-columns: 1fr;
  }
}
