:root {
  color-scheme: dark;
  --bg: #090b0e;
  --ink: #f4f0e8;
  --muted: #9da3a6;
  --panel: rgba(15, 18, 22, 0.82);
  --panel-hard: #11161b;
  --line: rgba(244, 240, 232, 0.13);
  --line-bright: rgba(244, 240, 232, 0.28);
  --red: #d83a2f;
  --amber: #d7a84f;
  --green: #69d27c;
  --blue: #6ca3c8;
  --radius: 6px;
  --page: min(1180px, calc(100% - 34px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(9, 11, 14, 0.26), #090b0e 620px),
    radial-gradient(circle at 88% 4%, rgba(216, 58, 47, 0.16), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background: url("background.jpg") center top / cover no-repeat;
  opacity: 0.36;
  filter: grayscale(0.2) contrast(1.1);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--page);
  min-height: 68px;
  margin: 12px auto 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 11, 14, 0.72);
  backdrop-filter: blur(16px);
}

.brand,
.nav,
.hero-actions,
.link-strip,
.server-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 6px;
}

.nav {
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover,
.nav a.active {
  border-color: var(--line);
  background: rgba(244, 240, 232, 0.07);
  color: var(--ink);
}

main {
  width: var(--page);
  margin: 0 auto 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: 26px;
  align-items: end;
  min-height: clamp(610px, 76vh, 780px);
  padding: clamp(70px, 12vw, 150px) 0 28px;
}

.hero-copy {
  max-width: 760px;
  animation: lift-in 700ms ease both;
}

.kicker {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(3.25rem, 11.5vw, 8.9rem);
  line-height: 0.88;
  letter-spacing: 0;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.7);
}

h2,
h3,
p {
  overflow-wrap: break-word;
}

.lead {
  max-width: 620px;
  margin: 28px 0 0;
  color: #d8d2c7;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.hero-actions {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn,
.link-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 45px;
  padding: 11px 16px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  border-color: rgba(216, 58, 47, 0.75);
  background: #b92d25;
}

.btn-copy,
.link-strip a {
  background: rgba(244, 240, 232, 0.07);
}

.btn:hover,
.link-strip a:hover {
  transform: translateY(-1px);
}

.btn.copied,
.icon-btn.copied {
  border-color: rgba(105, 210, 124, 0.82);
  color: var(--green);
}

.match-panel {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 22, 27, 0.92), rgba(12, 15, 18, 0.88));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  animation: lift-in 700ms 120ms ease both;
}

.match-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--red), var(--amber), var(--blue));
}

.match-panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-light,
.status-online::before,
.status-offline::before {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  content: "";
}

.status-light,
.status-online::before {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(105, 210, 124, 0.5);
  animation: pulse 1.9s infinite;
}

.server-offline .status-light,
.status-offline::before {
  background: var(--red);
  animation: none;
  box-shadow: none;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.match-panel dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.server-block,
.split-section {
  padding-top: 54px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5.4vw, 4.4rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.server-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 16, 20, 0.88);
}

.server-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

.servers-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.servers-table th,
.servers-table td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(244, 240, 232, 0.08);
  text-align: left;
}

.servers-table th {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.servers-table tbody tr:hover {
  background: rgba(244, 240, 232, 0.045);
}

.status-online,
.status-offline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.status-online {
  color: var(--green);
}

.status-offline {
  color: #ef6a61;
}

.empty-message {
  color: var(--muted);
  text-align: center;
}

.server-actions {
  gap: 8px;
}

.icon-btn {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: rgba(244, 240, 232, 0.06);
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.notes-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.notes-list article {
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.notes-list span {
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 900;
}

.notes-list h3 {
  margin: 20px 0 10px;
  font-size: 1.35rem;
}

.notes-list p {
  margin: 0;
  color: var(--muted);
}

.link-strip {
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 54px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(105, 210, 124, 0.48);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(105, 210, 124, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(105, 210, 124, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 880px) {
  :root {
    --page: min(100% - 20px, 720px);
  }

  .topbar,
  .hero,
  .section-title,
  .server-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    position: relative;
    top: 0;
  }

  .hero {
    display: flex;
    min-height: 690px;
    justify-content: flex-end;
    padding-top: 92px;
  }

  .match-panel {
    width: 100%;
  }

  .notes-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  :root {
    --page: min(100% - 14px, 460px);
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
  }

  h1 {
    font-size: clamp(2.7rem, 18vw, 5rem);
  }

  .btn,
  .link-strip a {
    width: 100%;
  }

  .servers-table {
    min-width: 0;
  }

  .servers-table thead {
    display: none;
  }

  .servers-table,
  .servers-table tbody,
  .servers-table tr,
  .servers-table td {
    display: block;
    width: 100%;
  }

  .servers-table tr {
    padding: 8px 0;
  }

  .servers-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 14px;
    text-align: right;
  }

  .servers-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
  }

  .empty-message {
    display: block;
  }

  .empty-message::before {
    content: "";
  }
}
