@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&display=swap");

:root {
  --bg-a: #05020c;
  --bg-b: #120523;
  --bg-c: #1b0a31;
  --section-gap: 13px;
  --card-radius: 14px;
  --card-pad: 16px;
  --card-shadow: 0 8px 16px rgba(8, 1, 15, 0.3);
  --panel: rgba(33, 12, 58, 0.78);
  --panel-border: rgba(189, 129, 255, 0.36);
  --panel-border-soft: rgba(206, 164, 255, 0.28);
  --text: #f7eeff;
  --text-muted: #c7b4e5;
  --neon: #cc84ff;
  --neon-soft: #8f44d9;
  --neon-live: #e9bbff;
  --neon-error: #ff7cc9;
  --line: rgba(212, 170, 255, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 460px at 45% -220px, #52207f 0%, transparent 64%),
    radial-gradient(900px 360px at 88% 102%, #361050 0%, transparent 74%),
    radial-gradient(780px 320px at 8% 88%, #240d40 0%, transparent 72%),
    linear-gradient(180deg, var(--bg-b) 0%, var(--bg-a) 82%);
  color: var(--text);
  font-family: Rajdhani, "Trebuchet MS", sans-serif;
  overflow-x: hidden;
}

.aurora {
  position: fixed;
  width: 48vw;
  height: 48vw;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.2;
  pointer-events: none;
  z-index: -2;
  animation: drift 22s ease-in-out infinite alternate;
}

.aurora-a {
  left: -10vw;
  top: -12vw;
  background: #9d47ff;
}

.aurora-b {
  right: -12vw;
  bottom: -14vw;
  background: #cb63ff;
  animation-duration: 28s;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.018) 0 1px,
      transparent 1px 3px
    );
  opacity: 0.16;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 24px 16px 34px;
  display: grid;
  gap: var(--section-gap);
}

.wrap > * {
  margin: 0;
}

.shell {
  position: relative;
}

.shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(transparent 0 97%, rgba(204, 132, 255, 0.1) 97% 100%);
  background-size: 100% 4px;
  opacity: 0.2;
}

.top {
  margin-bottom: 0;
}

.banner {
  background:
    linear-gradient(180deg, rgba(36, 14, 63, 0.9), rgba(22, 8, 40, 0.78));
  border: 1px solid var(--panel-border-soft);
  border-radius: var(--card-radius);
  padding: 16px 18px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    var(--card-shadow),
    0 0 10px rgba(151, 71, 224, 0.16);
  position: relative;
}

.banner::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(280px, 42%);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(224, 178, 255, 0.7) 50%,
    transparent 100%
  );
  box-shadow: 0 0 8px rgba(210, 141, 255, 0.27);
  pointer-events: none;
}

h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.015em;
  text-shadow: 0 0 16px rgba(219, 168, 255, 0.25);
}

.brand-title {
  display: grid;
  gap: 2px;
  margin-bottom: 2px;
  text-align: center;
  justify-items: center;
}

.brand-line {
  color: #f0dcff;
  font-size: 2.34rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 0 0 18px rgba(215, 149, 255, 0.36);
}

.brand-presents {
  color: #ceb2ed;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-title h1 {
  font-size: 2.02rem;
}

h2 {
  margin: 0 0 9px;
  font-size: 1.24rem;
  color: #e6cfff;
  letter-spacing: 0.012em;
}

.meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.03rem;
}

.meta-footer {
  margin-top: 0;
  padding-top: 12px;
  padding-bottom: 12px;
}

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

.footer-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(198, 143, 255, 0.52);
  background: rgba(44, 14, 74, 0.54);
  color: #eddcff;
  padding: 3px 10px;
  line-height: 1;
  font-size: 0.88rem;
  white-space: nowrap;
}

.footer-chip-live {
  border-color: rgba(233, 187, 255, 0.8);
  color: #fff2ff;
  box-shadow: 0 0 10px rgba(203, 132, 255, 0.28);
}

.footer-chip-idle {
  border-color: rgba(179, 131, 232, 0.46);
  color: #dfcfff;
}

.footer-chip-error {
  border-color: rgba(255, 124, 201, 0.72);
  color: #ffd8ef;
  box-shadow: 0 0 10px rgba(255, 124, 201, 0.2);
}

.footer-chip-sync {
  border-color: rgba(175, 145, 220, 0.56);
  color: #e5d6f8;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--section-gap);
}

.card {
  border-radius: var(--card-radius);
  padding: var(--card-pad);
}

.panel {
  background:
    linear-gradient(180deg, rgba(40, 15, 67, 0.78), rgba(28, 9, 50, 0.74));
  border: 1px solid var(--panel-border);
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.014),
    var(--card-shadow);
}

.panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 100%;
  background: var(--line);
  opacity: 0.56;
}

.kills {
  margin-top: 0;
}

.bottom-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--section-gap);
  align-items: stretch;
}

.lb-controls {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tab-btn {
  border: 1px solid rgba(193, 146, 245, 0.46);
  background: rgba(44, 14, 74, 0.48);
  color: #ecd9ff;
  border-radius: 999px;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.tab-btn:hover {
  border-color: rgba(224, 181, 255, 0.72);
  background: rgba(61, 22, 98, 0.54);
  box-shadow: 0 0 11px rgba(188, 121, 255, 0.28);
}

.tab-btn.is-active {
  border-color: rgba(242, 206, 255, 0.95);
  background: rgba(147, 68, 220, 0.66);
  color: #fff5ff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 13px rgba(203, 132, 255, 0.38);
}

.tab-btn:focus-visible,
.cta-link:focus-visible {
  outline: 2px solid rgba(244, 219, 255, 0.92);
  outline-offset: 1px;
}

.lb-table-wrap {
  overflow-x: hidden;
  border: 1px solid rgba(203, 159, 255, 0.2);
  border-radius: 10px;
  background: rgba(18, 7, 34, 0.35);
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

.lb-table thead th {
  text-align: left;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d9b9ff;
  padding: 9px 10px;
  background: rgba(69, 28, 107, 0.39);
  border-bottom: 1px solid rgba(213, 175, 255, 0.24);
}

.lb-table thead th + th,
.lb-table tbody td + td {
  border-left: 1px solid rgba(195, 145, 244, 0.2);
}

.lb-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(188, 139, 244, 0.16);
  color: #efdfff;
  font-size: 0.98rem;
  line-height: 1.24;
  height: 34px;
}

.lb-table tbody tr:nth-child(even) td {
  background: rgba(58, 21, 91, 0.2);
}

.lb-table tbody tr:hover td {
  background: rgba(142, 83, 213, 0.2);
}

.lb-name,
.lb-handle {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.lb-table th:nth-child(1),
.lb-table td:nth-child(1) {
  width: 9%;
}

.lb-table th:nth-child(2),
.lb-table td:nth-child(2) {
  width: 36%;
}

.lb-table th:nth-child(3),
.lb-table td:nth-child(3) {
  width: 33%;
}

.lb-table th:nth-child(4),
.lb-table td:nth-child(4) {
  width: 22%;
}

.lb-stat {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #ffd8ff;
  font-weight: 700;
  white-space: nowrap;
}

.lb-rank {
  text-align: center;
  color: #c9abe8;
  font-variant-numeric: tabular-nums;
}

.lb-row-empty td {
  color: rgba(215, 193, 241, 0.62);
}

.lb-row-empty td:nth-child(1) {
  color: rgba(200, 177, 228, 0.54);
}

.lb-row-empty td:nth-child(4) {
  color: rgba(223, 203, 247, 0.62);
}

.cta-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  height: 100%;
}

.discord-widget-wrap {
  border: 1px solid rgba(203, 159, 255, 0.24);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(18, 7, 34, 0.4);
  flex: 1;
  min-height: 0;
}

.discord-widget {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
}

.cta-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(225, 183, 255, 0.76);
  color: #fff5ff;
  background: rgba(120, 46, 186, 0.46);
  padding: 7px 14px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  box-shadow: 0 0 14px rgba(202, 131, 255, 0.28);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.cta-link:hover {
  transform: translateY(-1px);
  border-color: rgba(236, 200, 255, 0.92);
  box-shadow: 0 0 16px rgba(216, 157, 255, 0.34);
}

.kill-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(203, 159, 255, 0.2);
  border-radius: 10px;
  background: rgba(18, 7, 34, 0.35);
}

.kill-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
  table-layout: auto;
}

.kill-table th:nth-child(1),
.kill-table td:nth-child(1) {
  width: 168px;
  min-width: 168px;
}

.kill-table th:nth-child(2),
.kill-table td:nth-child(2) {
  width: auto;
}

.kill-table th:nth-child(3),
.kill-table td:nth-child(3) {
  width: auto;
}

.kill-table th:nth-child(4),
.kill-table td:nth-child(4) {
  width: 240px;
  min-width: 220px;
}

.kill-table thead th {
  text-align: left;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d9b9ff;
  padding: 9px 11px;
  background: rgba(69, 28, 107, 0.39);
  border-bottom: 1px solid rgba(213, 175, 255, 0.24);
}

.kill-table thead th + th,
.kill-table tbody td + td {
  border-left: 1px solid rgba(195, 145, 244, 0.2);
}

.kill-table tbody td {
  padding: 7px 11px;
  border-bottom: 1px solid rgba(188, 139, 244, 0.16);
  color: #efdfff;
  font-size: 0.98rem;
  line-height: 1.22;
  vertical-align: top;
}

.kill-table tbody tr:nth-child(odd) td {
  background: rgba(35, 13, 63, 0.18);
}

.kill-table tbody tr:nth-child(even) td {
  background: rgba(58, 21, 91, 0.28);
}

.kill-table tbody tr:hover td {
  background: rgba(142, 83, 213, 0.2);
}

.kill-time {
  white-space: nowrap;
  color: #d4b7f8;
  font-variant-numeric: tabular-nums;
}

.kill-name,
.kill-damage {
  word-break: break-word;
}

.kill-damage {
  font-variant-numeric: tabular-nums;
  color: #ffd8ff;
  font-weight: 600;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 0.6rem;
  width: 100%;
}

.kill-damage-name {
  color: #efdfff;
}

.kill-damage-value {
  color: #ffd8ff;
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
}

.kill-row-empty td {
  color: var(--text-muted) !important;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.list li {
  margin: 0;
  position: relative;
  padding-left: 16px;
  font-size: 1.02rem;
  line-height: 1.28;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d7a8ff;
  box-shadow: 0 0 10px rgba(211, 147, 255, 0.45);
}

.muted {
  color: var(--text-muted);
  padding-left: 0 !important;
}

.muted::before {
  display: none;
}

.flash .banner {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 24px rgba(209, 132, 255, 0.34);
}

@media (max-width: 980px) {
  .wrap {
    padding: 20px 12px 28px;
  }

  .brand-line {
    font-size: 2.05rem;
  }

  .brand-title h1 {
    font-size: 1.82rem;
  }

  .discord-widget {
    min-height: 390px;
  }
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(2vw, -1vw, 0) scale(1.06);
  }
}

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

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

  h1 {
    font-size: 1.38rem;
  }

  .brand-line {
    font-size: 1.7rem;
  }

  .brand-presents {
    font-size: 0.7rem;
  }

  .brand-title h1 {
    font-size: 1.48rem;
  }

  .card {
    padding: 14px;
  }

  .aurora {
    width: 72vw;
    height: 72vw;
    filter: blur(48px);
  }

  .kill-table-wrap {
    overflow-x: hidden;
    border: 0;
    background: transparent;
  }

  .kill-table {
    min-width: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 8px;
  }

  .kill-table thead {
    display: none;
  }

  .kill-table tbody tr {
    display: block;
    border: 1px solid rgba(195, 145, 244, 0.24);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(35, 13, 63, 0.24);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  }

  .kill-table tbody td {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: start;
    gap: 8px;
    width: 100% !important;
    min-width: 0 !important;
    border: 0 !important;
    border-top: 1px solid rgba(188, 139, 244, 0.14) !important;
    padding: 6px 9px;
    font-size: 0.94rem;
    line-height: 1.2;
  }

  .kill-table tbody td:first-child {
    border-top: 0 !important;
  }

  .kill-table tbody td::before {
    content: attr(data-label);
    color: #d5b5f6;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.72rem;
    line-height: 1.2;
    opacity: 0.9;
  }

  .kill-time {
    white-space: normal;
  }

  .kill-row-empty {
    border: 1px solid rgba(195, 145, 244, 0.24);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(35, 13, 63, 0.24);
  }

  .kill-row-empty td {
    display: block !important;
    border-top: 0 !important;
  }

  .kill-row-empty td::before {
    display: none;
  }

  .lb-table thead th,
  .lb-table tbody td {
    padding: 7px 8px;
    font-size: 0.92rem;
  }

  .meta-row {
    gap: 8px;
    flex-wrap: wrap;
  }

  .footer-chip {
    font-size: 0.84rem;
  }

  .discord-widget {
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
