:root {
  color-scheme: dark;
  --bg: #0b1018;
  --bg2: #111823;
  --panel: rgba(17, 24, 35, 0.82);
  --panel2: rgba(10, 15, 22, 0.92);
  --line: rgba(151, 164, 184, 0.22);
  --line2: rgba(151, 164, 184, 0.14);
  --text: #eef4ff;
  --muted: #9aa7ba;
  --faint: #647084;
  --accent: #25d9f2;
  --ok: #35e1a1;
  --danger: #fb7185;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 84% 22%, rgba(78, 96, 122, 0.2), transparent 30rem),
    linear-gradient(135deg, #101823 0%, #090d13 52%, #111823 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  min-height: 74px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line2);
  background: rgba(8, 12, 18, 0.32);
}

.brand,
.topMeta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brandName {
  font-size: 30px;
  font-weight: 790;
  line-height: 1;
}

.brandSub {
  color: #d5dce8;
  font-size: 25px;
  font-weight: 360;
}

.onlineDot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-left: 12px;
  background: var(--ok);
  box-shadow: 0 0 18px rgba(53, 225, 161, 0.72);
}

.onlineDot.offline {
  background: var(--danger);
  box-shadow: 0 0 18px rgba(251, 113, 133, 0.68);
}

#headerStatus {
  color: var(--ok);
  font-size: 14px;
  font-weight: 720;
}

#headerStatus.online {
  color: var(--ok);
}

#headerStatus.offline {
  color: var(--danger);
}

.topMeta {
  color: #d8e0ec;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

.divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.topLink {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #d8e0ec;
  font-size: 14px;
  font-weight: 650;
}

.layout {
  width: min(1528px, 100%);
  margin: 0 auto;
  padding: 34px 28px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 26px;
}

.mainColumn {
  min-width: 0;
}

.tabs {
  display: flex;
  gap: 26px;
  margin-bottom: 6px;
}

.tabButton {
  min-width: 88px;
  min-height: 48px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
}

.tabButton.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.playerCard,
.sidePanel {
  background: linear-gradient(145deg, rgba(17, 24, 35, 0.9), rgba(10, 15, 22, 0.84));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.playerFrame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.playerFrame video,
.playerFrame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.playerFrame iframe.hidden,
.playerFrame video.hidden {
  display: none;
}

.emptyState {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 12px;
  text-align: center;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.75);
}

.emptyState.hidden,
.errorState.hidden {
  display: none;
}

.emptyState strong {
  color: var(--text);
  font-size: 18px;
}

.emptyState span {
  font-size: 14px;
}

.playIcon {
  width: 54px;
  height: 54px;
  margin: 0 auto 4px;
  border-radius: 50%;
  border: 1px solid rgba(37, 217, 242, 0.58);
  position: relative;
}

.playIcon::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 17px;
  border-left: 16px solid var(--accent);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.errorState {
  position: absolute;
  z-index: 3;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 113, 133, 0.45);
  border-radius: 8px;
  background: rgba(55, 12, 24, 0.9);
  color: #fecdd3;
  font-size: 13px;
  line-height: 1.45;
}

.playerStats {
  min-height: 68px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  background: rgba(9, 13, 20, 0.82);
  border-top: 1px solid var(--line2);
}

.playerStats div {
  min-width: 0;
  padding: 0 22px;
  border-right: 1px solid var(--line);
}

.playerStats div:last-child {
  border-right: 0;
}

.playerStats span,
.sessionBar span,
.keyBlock h2,
.urlList h2,
.serverStatus h2 {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.playerStats strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accentText {
  color: var(--accent) !important;
}

.offlineText {
  color: var(--danger) !important;
}

.sessionBar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.sessionBar div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sessionBar code,
.urlRow code,
.keyInput input,
.serverFooter strong {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.sessionBar code {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.sidePanel {
  align-self: start;
  padding: 22px 26px;
  border-color: transparent;
  box-shadow: none;
  background: rgba(15, 22, 32, 0.45);
}

.keyBlock,
.urlList,
.serverStatus {
  margin-bottom: 28px;
}

.keyBlock h2,
.urlList h2,
.serverStatus h2 {
  margin: 0 0 14px;
  letter-spacing: 0.08em;
}

.keyInput {
  display: grid;
  grid-template-columns: auto 1fr 52px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(11, 16, 24, 0.78);
  overflow: hidden;
}

.keyInput span {
  padding-left: 14px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.keyInput input {
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 720;
}

.copyIcon {
  width: 40px;
  height: 36px;
  border: 1px solid transparent;
  border-left-color: var(--line);
  background: transparent;
  color: var(--text);
  position: relative;
}

.copyIcon::before,
.copyIcon::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.copyIcon::before {
  left: 13px;
  top: 9px;
  opacity: 0.55;
}

.copyIcon::after {
  left: 17px;
  top: 13px;
  background: rgba(15, 22, 32, 0.92);
}

.keyBlock p,
.urlList p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.keyBlock code {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}

.primaryButton,
.ghostButton {
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 750;
}

.primaryButton {
  border-color: rgba(37, 217, 242, 0.65);
  background: linear-gradient(180deg, #67e8f9, #25d9f2);
  color: #061119;
}

.ghostButton {
  background: rgba(9, 13, 20, 0.78);
  color: var(--text);
}

.urlList {
  display: grid;
  gap: 10px;
}

.urlRow {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 52px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(11, 16, 24, 0.72);
}

.urlRow span {
  padding-left: 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 680;
}

.urlRow code {
  min-width: 0;
  overflow: hidden;
  color: var(--accent);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metricRow {
  min-height: 46px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line2);
  color: var(--muted);
}

.metricRow span {
  color: #c1cad8;
  font-size: 15px;
}

.metricRow strong {
  color: #d9e1ee;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.metricRow.meter {
  grid-template-columns: 1fr auto 138px;
}

.metricRow i {
  display: block;
  width: 138px;
  height: 6px;
  border-radius: 999px;
  background: rgba(151, 164, 184, 0.18);
  overflow: hidden;
}

.metricRow i b {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #6ee7f9);
}

.metricRow.disk {
  grid-template-columns: 1fr auto 138px;
  padding-bottom: 8px;
}

.metricRow small {
  grid-column: 2 / 4;
  justify-self: end;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.serverFooter {
  padding-top: 2px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.serverFooter span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.serverFooter strong {
  font-weight: 600;
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidePanel {
    border: 1px solid var(--line);
    background: var(--panel);
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .layout {
    padding: 20px 16px;
  }

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

  .playerStats div {
    min-height: 58px;
    display: grid;
    align-content: center;
  }

  .urlRow {
    grid-template-columns: 1fr 42px;
    padding-left: 0;
  }

  .urlRow span,
  .urlRow code {
    grid-column: 1 / 2;
  }

  .urlRow code {
    padding-left: 16px;
  }

  .urlRow .copyIcon {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }

  .metricRow.meter,
  .metricRow.disk {
    grid-template-columns: 1fr auto;
    padding: 10px 0;
  }

  .metricRow i,
  .metricRow small {
    grid-column: 1 / 3;
    justify-self: stretch;
    width: 100%;
  }

  .sessionBar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 16px 0;
  }
}
