:root {
  --bg: #0b0c0f;
  --panel: #111218;
  --panel2: #151722;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --muted2: rgba(255, 255, 255, 0.45);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 14px;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
  background: radial-gradient(
      1200px 500px at 40% -10%,
      rgba(255, 255, 255, 0.08),
      transparent 60%
    ),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(
    to bottom,
    rgba(10, 11, 15, 0.95),
    rgba(10, 11, 15, 0.75)
  );
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.topbar__row {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar__row--search {
  padding-top: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #efefef, #948b90, #000000);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.brand__name {
  font-size: 14px;
  opacity: 0.9;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}

.tabs__item {
  padding: 6px 0;
  position: relative;
}

.tabs__item--active {
  color: var(--text);
}

.tabs__item--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
}

.avatar {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.avatar__circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 13px;
}

.search {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) inset;
}

.search__icon {
  color: var(--muted2);
  font-size: 14px;
  padding-left: 2px;
}

.search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.search__input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.search__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.chip--ghost {
  background: rgba(255, 255, 255, 0.04);
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
}

.gallery__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (min-width: 860px) {
  .gallery__grid {
    grid-template-columns: repeat(12, 1fr);
  }
}

.tile {
  min-width: 0;
}

.tile__btn {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.tile__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #1b1e2a, #0f1118);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.tile__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}

.tile__shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      600px 300px at 50% 30%,
      transparent,
      rgba(0, 0, 0, 0.25)
    ),
    linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.65));
  opacity: 0.9;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.tile__btn:focus-visible .tile__media {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

.tile__btn:hover .tile__shade {
  opacity: 0.75;
}

/* Desktop-only hover preview */
@media (hover: hover) and (pointer: fine) {
  .tile__btn:hover .tile__video {
    transform: scale(1.01);
  }
}

/* Make some tiles span multiple columns on wide screens (like the screenshot) */
@media (min-width: 860px) {
  .tile[data-span="6"] {
    grid-column: span 6;
  }
  .tile[data-span="4"] {
    grid-column: span 4;
  }
  .tile[data-span="3"] {
    grid-column: span 3;
  }
}

.player {
  width: min(980px, calc(100vw - 24px));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0;
  background: rgba(15, 16, 22, 0.92);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
}

.player::backdrop {
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(8px);
}

.player__chrome {
  display: flex;
  justify-content: flex-end;
  padding: 12px 12px 0 12px;
}

.player__close {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}

.player__stage {
  padding: 12px;
}

.player__video {
  width: 100%;
  max-height: min(62vh, 620px);
  display: block;
  border-radius: 14px;
  background: #0a0b10;
}

.player__meta {
  padding: 0 12px 14px 12px;
}

.player__title {
  font-size: 14px;
  font-weight: 600;
}

.player__subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.player__description {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.player__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .tabs {
    display: none;
  }
  .brand__name {
    display: none;
  }
  .avatar {
    display: none;
  }
  .search__actions {
    display: none;
  }
  .topbar__row {
    padding: 10px 12px;
    gap: 10px;
  }
  .topbar__row--search {
    padding-top: 0;
  }
  .search {
    padding: 9px 10px;
  }
  .search__input {
    font-size: 12px;
  }
  .page {
    padding: 12px;
  }
  .gallery__grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile__media {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
  }
}

@media (max-width: 420px) {
  .gallery__grid {
    grid-template-columns: 1fr;
  }
  .tile__media {
    aspect-ratio: 16 / 10;
  }
}
