:root {
  color-scheme: dark;
  --ink: #f6f7fb;
  --muted: #a6adbd;
  --soft: rgba(255, 255, 255, 0.08);
  --glass: rgba(19, 24, 39, 0.58);
  --glass-strong: rgba(16, 20, 34, 0.78);
  --line: rgba(255, 255, 255, 0.14);
  --orange: #ff6542;
  --orange-light: #ff9b7c;
  --green: #8ee0b1;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 12%, rgba(106, 127, 255, 0.26), transparent 30rem),
    radial-gradient(circle at 84% 20%, rgba(255, 121, 73, 0.15), transparent 26rem),
    linear-gradient(135deg, #131829 0%, #202743 48%, #121725 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background:
    linear-gradient(124deg, transparent 18%, rgba(255,255,255,0.06) 18.1%, transparent 18.5%),
    linear-gradient(302deg, transparent 62%, rgba(255,255,255,0.045) 62.1%, transparent 62.5%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.11;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.48'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
  pointer-events: none;
}

.ambient-one { top: 28%; left: -10rem; background: #5878ff; }
.ambient-two { right: -8rem; bottom: 2%; background: #ff6542; }

.topbar,
.page-shell,
.footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-faceit {
  position: relative;
  font-size: 1.46rem;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.brand-faceit::after {
  position: absolute;
  top: -7px;
  right: -5px;
  width: 0;
  height: 0;
  content: "";
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 14px solid var(--orange);
  transform: rotate(-28deg);
}

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

.brand-name {
  color: var(--orange-light);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.hero-section { max-width: 780px; padding: 92px 0 112px; }

.eyebrow {
  margin-bottom: 16px;
  color: var(--orange-light);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.2em;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  font-weight: 740;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

h1 span { color: #9facff; }

.hero-copy {
  max-width: 550px;
  margin-bottom: 38px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.search-card {
  max-width: 700px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,0.13), rgba(255,255,255,0.045));
  box-shadow: 0 30px 90px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.13);
  backdrop-filter: blur(26px) saturate(125%);
}

.search-row { display: grid; grid-template-columns: 1fr 170px; gap: 10px; }

.input-shell,
.period-control,
.period-trigger {
  display: flex;
  align-items: center;
  min-height: 68px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  background: rgba(8, 12, 24, 0.48);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.input-shell:focus-within,
.period-control:focus-within,
.period-control.is-open {
  border-color: rgba(159,172,255,0.8);
  background: rgba(8, 12, 24, 0.7);
  box-shadow: 0 0 0 4px rgba(159,172,255,0.1);
}

.search-icon {
  position: relative;
  width: 19px;
  height: 19px;
  margin: 0 15px 0 21px;
  border: 2px solid #c5cbe0;
  border-radius: 50%;
  opacity: 0.9;
}

.search-icon::after {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  content: "";
  border-radius: 2px;
  background: #c5cbe0;
  transform: rotate(45deg);
}

input,
select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  font: inherit;
  background: transparent;
}

input { font-size: 1.1rem; }
input::placeholder { color: #7f879b; }

.period-control {
  position: relative;
  display: block;
  min-height: 68px;
  border: 0;
  background: transparent;
}

.period-trigger {
  justify-content: space-between;
  width: 100%;
  min-height: 68px;
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  background: rgba(8, 12, 24, 0.48);
}

.period-label { display: block; margin-bottom: 5px; color: #8089a2; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.14em; }
.period-trigger strong { font-size: 0.86rem; font-weight: 700; }
.chevron { color: #b9c0d4; font-size: 1.15rem; line-height: 1; transition: transform 180ms ease; }
.period-control.is-open .chevron { transform: rotate(180deg); }

.period-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 5;
  width: 280px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  background: rgba(21, 27, 46, 0.94);
  box-shadow: 0 24px 50px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.11);
  backdrop-filter: blur(24px) saturate(140%);
}

.popover-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; color: var(--muted); font-size: 0.72rem; }
.popover-heading output { color: var(--ink); font-weight: 750; }

input[type="range"] {
  width: 100%;
  height: 5px;
  padding: 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.range-labels { display: flex; justify-content: space-between; margin-top: 9px; color: #8992aa; font-size: 0.68rem; }

.search-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 62px;
  margin-top: 10px;
  padding: 0 21px 0 24px;
  border: 0;
  border-radius: 17px;
  color: #161b2b;
  cursor: pointer;
  font: inherit;
  font-weight: 760;
  background: linear-gradient(110deg, #c5ceff, #9facff 55%, #ffad96);
  box-shadow: 0 14px 28px rgba(126, 144, 255, 0.24), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.search-button:hover { filter: brightness(1.06); box-shadow: 0 18px 35px rgba(126, 144, 255, 0.32); transform: translateY(-2px); }
.search-button:active { transform: translateY(0); }
.search-button:disabled { cursor: wait; opacity: 0.7; transform: none; }
.button-arrow { font-size: 1.35rem; }
.form-hint { margin: 12px 5px 0; color: #79839d; font-size: 0.73rem; }

.status-message { min-height: 24px; margin-top: 17px; color: var(--muted); font-size: 0.88rem; }
.status-message.error { color: #ffadac; }
.status-message.success { color: var(--green); }

.loading-section {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 760px;
  margin: 0 0 24px;
  padding: 28px 30px;
  border: 1px solid rgba(159,172,255,0.2);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(159,172,255,0.11), rgba(255,255,255,0.035));
  box-shadow: 0 24px 70px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.1);
  backdrop-filter: blur(24px) saturate(125%);
}

.loading-section h2 { margin-bottom: 8px; }
.loading-section p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.loading-dots { display: inline-block; width: 1.5em; color: var(--orange-light); animation: loading-dots 1.2s steps(4, end) infinite; }

.loading-orbit {
  position: relative;
  flex: 0 0 94px;
  width: 94px;
  height: 94px;
}

.orbit,
.orbit-core {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.orbit-one { inset: 8px; border: 1px solid rgba(159,172,255,0.65); animation: orbit-spin 2.8s linear infinite; }
.orbit-one::before { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; content: ""; border-radius: 50%; background: var(--orange); box-shadow: 0 0 18px var(--orange); transform: translateX(-50%); }
.orbit-two { inset: 20px; border: 1px dashed rgba(255,155,124,0.7); animation: orbit-spin-reverse 2s linear infinite; }
.orbit-two::after { position: absolute; right: -3px; bottom: 8px; width: 6px; height: 6px; content: ""; border-radius: 50%; background: #b7c1ff; box-shadow: 0 0 14px #b7c1ff; }
.orbit-core { inset: 36px; background: linear-gradient(135deg, #ff8060, #a8b3ff); box-shadow: 0 0 28px rgba(255,128,96,0.6); animation: core-pulse 1.5s ease-in-out infinite; }

@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes orbit-spin-reverse { to { transform: rotate(-360deg); } }
@keyframes core-pulse { 50% { transform: scale(0.7); opacity: 0.7; } }
@keyframes loading-dots { 0%, 20% { opacity: 0; } 40% { opacity: 0.4; } 60% { opacity: 0.7; } 80%, 100% { opacity: 1; } }

.results-section { padding: 55px 0 100px; border-top: 1px solid rgba(255,255,255,0.09); }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
h2 { margin-bottom: 0; font-size: clamp(1.7rem, 4vw, 2.7rem); letter-spacing: -0.05em; }
.result-count { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.78rem; }
.result-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.empty-state { display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: center; gap: 28px; padding: 28px; border: 1px solid rgba(142,224,177,0.2); border-radius: 24px; background: linear-gradient(145deg, rgba(142,224,177,0.09), rgba(255,255,255,0.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); }
.empty-copy h3 { margin: 0 0 10px; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -0.04em; }
.empty-copy p { max-width: 560px; margin: 0; color: var(--muted); line-height: 1.6; }
.cat-video { display: block; width: 100%; max-height: 180px; border-radius: 20px; object-fit: cover; background: rgba(8,12,24,0.45); box-shadow: 0 18px 35px rgba(0,0,0,0.22); }
.player-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 15px; align-items: start; padding: 18px; border: 1px solid rgba(255,255,255,0.13); border-radius: 22px; background: var(--glass); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); backdrop-filter: blur(18px); }
.player-avatar { width: 58px; height: 58px; border-radius: 17px; object-fit: cover; background: linear-gradient(135deg, #ff7655, #636dca); }
.player-meta { min-width: 0; }
.player-name { overflow: hidden; margin: 0 0 4px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.player-id { overflow: hidden; margin: 0; color: var(--muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.ban-badge { margin-left: auto; padding: 6px 8px; border-radius: 8px; color: #ffc1b2; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em; background: rgba(255,101,66,0.14); }
.ban-details { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 1px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.09); }
.ban-detail { min-width: 0; }
.ban-detail-label { display: block; margin-bottom: 4px; color: #7f89a3; font-size: 0.62rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.ban-detail-value { display: block; overflow: hidden; color: #e4e8f6; font-size: 0.78rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.footer { display: flex; justify-content: space-between; padding: 22px 0 30px; border-top: 1px solid rgba(255,255,255,0.08); color: #778198; font-size: 0.72rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 680px) {
  .topbar, .page-shell, .footer { width: min(100% - 30px, 1120px); }
  .topbar { padding-top: 22px; }
  .brand-name, .status-pill { display: none; }
  .hero-section { padding: 68px 0 78px; }
  h1 { font-size: clamp(2.7rem, 15vw, 4.5rem); }
  .hero-copy { font-size: 0.95rem; }
  .search-row { grid-template-columns: 1fr; }
  .period-control, .period-trigger { min-height: 60px; }
  .period-popover { right: auto; left: 0; width: min(280px, calc(100vw - 62px)); }
  .loading-section { align-items: flex-start; gap: 20px; padding: 22px; }
  .loading-orbit { flex-basis: 70px; width: 70px; height: 70px; }
  .orbit-one { inset: 5px; }
  .orbit-two { inset: 15px; }
  .orbit-core { inset: 27px; }
  .empty-state { grid-template-columns: 1fr; }
  .cat-video { max-width: 280px; }
  .player-card { grid-template-columns: auto minmax(0, 1fr); }
  .ban-badge { grid-column: 2; grid-row: 1; justify-self: start; margin-left: 0; }
  .ban-details { grid-column: 1 / -1; }
  .footer { display: block; line-height: 1.8; }
  .footer span { display: block; }
}
