:root {
  --bg0: #fbf7ef;
  --bg1: #f7f1e6;
  --paper: rgba(255, 255, 255, 0.55);
  --ink: #202020;
  --muted: rgba(32, 32, 32, 0.68);
  --line: rgba(32, 32, 32, 0.14);
  --line2: rgba(32, 32, 32, 0.22);
  --acid: #ffffff;
  --heat: #ff4f2a;
  --shadow: 0 22px 70px rgba(17, 17, 15, 0.18);
  --shadow2: 0 10px 30px rgba(17, 17, 15, 0.14);
  --r1: 18px;
  --r2: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html {
  background:
    radial-gradient(1200px 640px at 10% -12%, rgba(255, 255, 255, 0.14), transparent 58%),
    radial-gradient(920px 520px at 92% 10%, rgba(255, 79, 42, 0.10), transparent 56%),
    radial-gradient(760px 560px at 48% 118%, rgba(255, 255, 255, 0.06), transparent 55%),
    linear-gradient(180deg, #202020 0%, #151515 100%);
  background-color: #151515;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  background: transparent;
  overflow-x: hidden;
}

/* Grain / dot texture without images */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  transform: translateZ(0);
  background-image: radial-gradient(rgba(32, 32, 32, 0.24) 0.6px, transparent 0.8px);
  background-size: 5px 5px;
  opacity: 0.065;
  mix-blend-mode: multiply;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  transform: translateZ(0);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(32, 32, 32, 0.05),
    rgba(32, 32, 32, 0.05) 1px,
    transparent 1px,
    transparent 7px
  );
  opacity: 0.18;
  mix-blend-mode: multiply;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Force white highlight (text selection) */
::selection {
  background: rgba(255, 255, 255, 0.92);
  color: #0b0b0a;
}

::-moz-selection {
  background: rgba(255, 255, 255, 0.92);
  color: #0b0b0a;
}

.skip {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 999;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--acid);
  color: #0c0c0b;
  border: 1px solid rgba(17, 17, 15, 0.24);
  box-shadow: var(--shadow2);
}

.skip:focus {
  left: 12px;
}

.shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 26px 18px 42px;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 22px;
  align-items: start;
}

.panel {
  position: sticky;
  top: 18px;
  border-radius: var(--r2);
  border: 1px solid var(--line);
  background: var(--paper);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  overflow: clip;
}

.panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--r2) + 1px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
  opacity: 0.75;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.brand__logo {
  display: block;
  width: 26px;
  height: 26px;
}

.brand__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink);
}

.hero h1 {
  margin: 10px 0 0;
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(34px, 3.5vw, 46px);
  line-height: 1.03;
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 34ch;
}

.controls {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.search {
  display: grid;
  gap: 8px;
}

.search__label {
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(32, 32, 32, 0.56);
}

input[type="search"] {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  outline: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: border-color 140ms ease, box-shadow 140ms ease,
    background 140ms ease;
}

input[type="search"]::placeholder {
  color: rgba(32, 32, 32, 0.42);
}

input[type="search"]:focus-visible {
  border-color: rgba(32, 32, 32, 0.3);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22), 0 1px 0 rgba(255, 255, 255, 0.7)
    inset;
}

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

.btn {
  position: relative;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(32, 32, 32, 0.94);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow2);
  transition: transform 140ms ease, box-shadow 140ms ease,
    background 140ms ease, border-color 140ms ease;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.36);
  color: var(--ink);
  box-shadow: none;
}

.btn__cap {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 500;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.78);
}

.btn--ghost .btn__cap {
  border-color: var(--line);
  color: rgba(17, 17, 15, 0.68);
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-1px);
    border-color: rgba(17, 17, 15, 0.22);
  }
  .btn:active {
    transform: translateY(0px);
  }
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.24), var(--shadow2);
}

.cats {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.cat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  color: var(--ink);
  transition: transform 140ms ease, background 140ms ease,
    border-color 140ms ease;
}

.cat__name {
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(17, 17, 15, 0.76);
}

.cat__count {
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 15, 0.14);
  color: rgba(17, 17, 15, 0.64);
  background: rgba(255, 255, 255, 0.42);
}

.cat[aria-current="true"] {
  border-color: rgba(17, 17, 15, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.36));
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
}

.cat[aria-current="true"] .cat__count {
  border-color: rgba(17, 17, 15, 0.2);
}

@media (hover: hover) {
  .cat:hover {
    transform: translateY(-1px);
    border-color: rgba(17, 17, 15, 0.22);
  }
  .cat:active {
    transform: translateY(0px);
  }
}

.cat:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
}

.cta-techdrop {
  display: block;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #202020;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
  box-shadow: var(--shadow2);
}

@media (hover: hover) {
  .cta-techdrop:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(17, 17, 15, 0.22);
  }
  .cta-techdrop:active {
    transform: translateY(0);
  }
}

.cta-techdrop:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.24), var(--shadow2);
}

.stage {
  border-radius: var(--r2);
  border: 1px solid rgba(17, 17, 15, 0.08);
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  padding: 16px 16px 18px;
}

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

.group {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px 8px;
  margin-top: 6px;
  border-top: 1px solid rgba(17, 17, 15, 0.12);
}

.group__name {
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(17, 17, 15, 0.74);
}

.group__name::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--acid);
  border: 1px solid rgba(17, 17, 15, 0.2);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
  vertical-align: middle;
}

.group__count {
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(17, 17, 15, 0.56);
}

.card {
  position: relative;
  padding: 0;
  border: 1px solid rgba(17, 17, 15, 0.14);
  border-radius: var(--r1);
  overflow: clip;
  background: rgba(17, 17, 15, 0.88);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  text-align: left;
  min-height: 160px;
  box-shadow: 0 10px 22px rgba(17, 17, 15, 0.14);
  transform: translateY(10px);
  opacity: 0;
  animation: rise 520ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 22ms);
}

.card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22), 0 10px 22px rgba(17, 17, 15, 0.14);
}

.card__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.06);
  transform: scale(1.02);
  transition: transform 380ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.06), rgba(10, 10, 10, 0.86));
}

.card__meta {
  position: relative;
  z-index: 1;
  padding: 14px 14px 13px;
  display: grid;
  gap: 10px;
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.26);
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.84);
}

.play {
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.86);
}

.play::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
  vertical-align: middle;
}

.card__brand {
  font-size: 16px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.48);
}

.empty {
  border-radius: var(--r1);
  border: 1px dashed rgba(17, 17, 15, 0.22);
  background: rgba(255, 255, 255, 0.35);
  padding: 20px 18px;
  color: rgba(17, 17, 15, 0.64);
  line-height: 1.5;
}

.empty strong {
  color: rgba(17, 17, 15, 0.82);
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px) rotate(-0.12deg);
    box-shadow: 0 18px 46px rgba(17, 17, 15, 0.2);
  }
  .card:hover .card__thumb {
    transform: scale(1.06);
  }
}

@keyframes rise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0px);
    opacity: 1;
  }
}

.modal {
  width: min(980px, calc(100vw - 22px));
  border: none;
  padding: 0;
  border-radius: 22px;
  background: rgba(251, 247, 239, 0.8);
  backdrop-filter: blur(14px);
  box-shadow: 0 28px 120px rgba(0, 0, 0, 0.42);
}

.modal::backdrop {
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(6px);
}

.modal__wrap {
  padding: 16px 16px 18px;
  display: grid;
  gap: 14px;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal__kicker {
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(17, 17, 15, 0.62);
}

.modal__title {
  margin: 6px 0 0;
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: 26px;
  line-height: 1.05;
}

.modal__sub {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: rgba(17, 17, 15, 0.66);
  font-size: 13px;
}

.modal__idx {
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.modal__link {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 15, 0.14);
  background: rgba(255, 255, 255, 0.52);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.modal__link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
}

.modal__nav {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.iconbtn {
  position: relative;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid rgba(17, 17, 15, 0.14);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  color: rgba(17, 17, 15, 0.88);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: transform 140ms ease, border-color 140ms ease,
    background 140ms ease;
}

.iconbtn--close {
  background: rgba(17, 17, 15, 0.92);
  color: rgba(255, 255, 255, 0.92);
}

.iconbtn__txt {
  font-weight: 600;
}

.iconbtn__cap {
  margin-left: 10px;
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 15, 0.14);
  color: rgba(17, 17, 15, 0.62);
  background: rgba(255, 255, 255, 0.52);
}

.iconbtn--close .iconbtn__cap {
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.26);
}

.iconbtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
}

@media (hover: hover) {
  .iconbtn:hover {
    transform: translateY(-1px);
    border-color: rgba(17, 17, 15, 0.22);
  }
  .iconbtn:active {
    transform: translateY(0px);
  }
}

.player {
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 15, 0.16);
  background: #0b0b0a;
  overflow: clip;
  aspect-ratio: 16 / 9;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 520px) {
  .actions {
    grid-template-columns: 1fr;
  }
  .modal__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .modal__nav {
    justify-content: flex-start;
  }
}

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