:root {
  color-scheme: dark;
  --page-bg: #030b12;
  --panel: rgba(5, 22, 34, 0.88);
  --panel-strong: #071c2b;
  --line: rgba(91, 213, 245, 0.22);
  --cyan: #5cecff;
  --blue: #287eff;
  --text: #effcff;
  --muted: #91b5c5;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--page-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.participants-background {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(3, 11, 18, 0.26), #030b12 82%),
    url("../assets/calender/backgrounds/npcordie_bg.png") center top / cover no-repeat;
  filter: saturate(0.82);
}

.participants-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 15%, rgba(72, 219, 255, 0.2), transparent 32%),
    linear-gradient(90deg, rgba(3, 11, 18, 0.76), transparent 35% 65%, rgba(3, 11, 18, 0.76));
}

.participants-grid-effect {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(88, 224, 255, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 224, 255, 0.24) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 78%, transparent);
}

.participants-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 10px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 12, 20, 0.84);
  backdrop-filter: blur(18px);
}

.participants-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.participants-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.participants-topbar nav {
  display: flex;
  gap: 10px;
}

.participants-topbar nav a {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c9eff8;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  transition: 160ms ease;
}

.participants-topbar nav a:hover,
.participants-topbar nav a:focus-visible {
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 20px rgba(92, 236, 255, 0.16);
}

.participants-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 55px 0 90px;
}

.participants-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.participants-event-logo {
  width: min(330px, 74vw);
  height: 180px;
  margin-bottom: -30px;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.5));
}

.participants-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 9px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.participants-kicker span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55ffad;
  box-shadow: 0 0 13px #55ffad;
}

.participants-hero h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.participants-hero > p:not(.participants-kicker) {
  max-width: 570px;
  margin: 15px auto 0;
  color: var(--muted);
}

.participants-count {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 22px;
  padding: 10px 18px;
  border: 1px solid rgba(92, 236, 255, 0.34);
  border-radius: 999px;
  background: rgba(7, 28, 43, 0.72);
  box-shadow: inset 0 0 18px rgba(64, 213, 255, 0.07);
}

.participants-count strong {
  color: var(--cyan);
  font-size: 1rem;
}

.participants-count span {
  color: #a8c7d4;
  font-size: 0.76rem;
  font-weight: 700;
}

.participants-list {
  margin-top: 48px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(7, 27, 42, 0.94), rgba(3, 14, 23, 0.9));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36), inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(15px);
}

.participants-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.participants-search {
  flex: 1;
}

.participants-search span {
  display: block;
  margin: 0 0 8px 3px;
  color: #b9d8e3;
  font-size: 0.74rem;
  font-weight: 800;
}

.participants-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(100, 216, 243, 0.25);
  border-radius: 13px;
  outline: none;
  background: rgba(0, 9, 16, 0.72);
  color: #fff;
}

.participants-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(92, 236, 255, 0.1);
}

#participantsRefresh {
  height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(92, 236, 255, 0.46);
  border-radius: 13px;
  background: rgba(30, 146, 186, 0.15);
  color: #dffbff;
  font-weight: 900;
  cursor: pointer;
}

#participantsRefresh:hover,
#participantsRefresh:focus-visible {
  background: rgba(48, 196, 231, 0.24);
}

.participants-status {
  min-height: 20px;
  margin: 18px 2px;
  color: #75dff3;
  font-size: 0.78rem;
}

.participants-status.is-error {
  color: #ff8da0;
}

.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.participant-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 24px 14px 17px;
  overflow: hidden;
  border: 1px solid rgba(99, 222, 249, 0.2);
  border-radius: 19px;
  background: linear-gradient(150deg, rgba(13, 48, 70, 0.8), rgba(3, 15, 24, 0.94));
  color: #fff;
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.participant-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transition: opacity 170ms ease;
}

.participant-card:hover,
.participant-card:focus-visible {
  z-index: 1;
  transform: translateY(-4px);
  border-color: rgba(92, 236, 255, 0.66);
  outline: none;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.32), 0 0 24px rgba(54, 207, 255, 0.12);
}

.participant-card:hover::before,
.participant-card:focus-visible::before {
  opacity: 1;
}

.participant-head {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(134, 236, 255, 0.32);
  border-radius: 18px;
  background: rgba(0, 8, 14, 0.7);
  box-shadow: inset 0 0 22px rgba(44, 199, 242, 0.1), 0 12px 24px rgba(0, 0, 0, 0.28);
}

.participant-head img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  image-rendering: pixelated;
}

.participant-card strong {
  max-width: 100%;
  margin-top: 15px;
  overflow: hidden;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-card small {
  min-height: 16px;
  margin-top: 5px;
  color: #7edbec;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.participants-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 45px 15px;
  text-align: center;
}

.participants-empty img {
  width: 70px;
  height: 70px;
  margin-bottom: 14px;
  object-fit: contain;
  opacity: 0.8;
}

.participants-empty span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.8rem;
}

.participant-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 18px;
  place-items: center;
}

.participant-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(0, 5, 10, 0.78);
  backdrop-filter: blur(8px);
  cursor: default;
}

.participant-modal-card {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 36px);
  padding: 26px;
  overflow: auto;
  border: 1px solid rgba(99, 225, 251, 0.42);
  border-radius: 24px;
  background: linear-gradient(145deg, #0a2b40, #04121e 70%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62), 0 0 40px rgba(47, 207, 255, 0.12);
}

.participant-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(124, 224, 247, 0.24);
  border-radius: 50%;
  background: rgba(0, 10, 17, 0.58);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.participant-modal-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 42px;
}

.participant-modal-head {
  display: grid;
  flex: 0 0 90px;
  width: 90px;
  height: 90px;
  place-items: center;
  border: 1px solid rgba(111, 228, 252, 0.4);
  border-radius: 18px;
  background: #020b12;
}

.participant-modal-head img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  image-rendering: pixelated;
}

.participant-modal-profile p {
  margin: 0 0 5px;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.participant-modal-profile h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 5vw, 2rem);
}

.participant-socials {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.participant-social-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid rgba(127, 222, 244, 0.18);
  border-radius: 14px;
  background: rgba(0, 10, 18, 0.52);
  color: #fff;
  text-decoration: none;
  transition: 160ms ease;
}

.participant-social-link:hover,
.participant-social-link:focus-visible {
  border-color: var(--social-color, var(--cyan));
  transform: translateX(3px);
  box-shadow: 0 0 22px color-mix(in srgb, var(--social-color, var(--cyan)) 20%, transparent);
}

.participant-social-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--social-color, #2a9fd5);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.participant-social-copy {
  min-width: 0;
}

.participant-social-copy strong,
.participant-social-copy span {
  display: block;
}

.participant-social-copy strong {
  font-size: 0.82rem;
}

.participant-social-copy span {
  margin-top: 3px;
  overflow: hidden;
  color: #9fc2cf;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-no-socials {
  margin: 24px 0 0;
  padding: 18px;
  border: 1px dashed rgba(126, 220, 243, 0.25);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

body.has-participant-modal {
  overflow: hidden;
}

@media (max-width: 620px) {
  .participants-topbar {
    min-height: 62px;
    padding-inline: 14px;
  }

  .participants-brand span,
  .participants-topbar nav a:first-child {
    display: none;
  }

  .participants-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 28px;
  }

  .participants-event-logo {
    height: 145px;
  }

  .participants-list {
    margin-top: 34px;
    border-radius: 20px;
  }

  .participants-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .participant-card {
    padding: 18px 8px 14px;
  }

  .participant-head {
    width: 76px;
    height: 76px;
  }

  .participant-head img {
    width: 64px;
    height: 64px;
  }

  .participants-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  #participantsRefresh {
    align-self: flex-end;
  }

  .participant-modal-card {
    padding: 22px 18px;
  }

  .participant-modal-head {
    flex-basis: 76px;
    width: 76px;
    height: 76px;
  }

  .participant-modal-head img {
    width: 64px;
    height: 64px;
  }
}

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