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

:root {
  --background: #17111f;
  --panel: rgba(35, 24, 48, 0.91);
  --ink: #f3ecfa;
  --muted: #b2a5bf;
  --line: rgba(225, 209, 239, 0.12);
  --accent: #c9a7e8;
}

* {
  box-sizing: border-box;
}

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

html {
  font-size: 140%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(97, 63, 126, 0.24), transparent 34rem),
    radial-gradient(circle at 82% 88%, rgba(72, 42, 91, 0.22), transparent 30rem),
    var(--background);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  padding: 24px 28px;
}

.site-header a {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.055em;
}

main {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 72px 84px 52px;
}

.browser {
  width: min(100%, 1292px);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 24px;
  align-items: center;
}

.panel {
  min-width: 0;
  height: min(704px, calc(100svh - 124px));
  min-height: 440px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(225, 209, 239, 0.12);
  border-radius: 22px;
  box-shadow:
    0 20px 55px rgba(7, 3, 12, 0.24),
    0 2px 8px rgba(7, 3, 12, 0.18);
  backdrop-filter: blur(12px);
}

.sets {
  min-height: 0;
}

.collection-header {
  min-width: 0;
  min-height: 78px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.set-tabs {
  min-width: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.set-tab {
  position: relative;
  flex: 0 0 auto;
  padding: 0 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
}

.set-tab::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -1px;
  left: 28px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}

.set-tab:hover {
  color: var(--ink);
}

.set-tab[aria-selected="true"] {
  color: var(--ink);
}

.set-tab[aria-selected="true"]::after {
  background: var(--accent);
}

.current-set-title {
  display: none;
}

.link-set {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(225, 209, 239, 0.22) transparent;
  padding: 22px 48px 16px;
}

.link-set[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.link-list li {
  border-bottom: 1px solid var(--line);
}

.link-list a {
  display: block;
  padding: 20px 2px;
}

.link-title,
.link-url,
.link-description {
  display: block;
}

.link-title {
  margin-bottom: 2px;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.link-url {
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--accent);
  font-size: 0.65rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-title span {
  display: inline-block;
  margin-left: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  transition: transform 150ms ease;
}

.link-description {
  max-width: 760px;
  color: var(--muted);
  font-size: 0.83rem;
}

.link-list a:hover .link-title span {
  transform: translate(2px, -2px);
}

.pagination {
  min-height: 58px;
  display: flex;
  gap: 9px;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--line);
}

.dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(225, 209, 239, 0.23);
  cursor: pointer;
  transition: width 150ms ease, border-radius 150ms ease, background 150ms ease;
}

.dot[aria-current="true"] {
  width: 18px;
  border-radius: 8px;
  background: var(--accent);
}

.arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(49, 33, 64, 0.72);
  color: var(--ink);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.arrow:hover {
  background: rgba(62, 41, 80, 0.96);
  border-color: rgba(225, 209, 239, 0.22);
}

.arrow[hidden] {
  visibility: hidden;
}

.arrow svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 680px) {
  .site-header {
    padding: 18px 20px;
  }

  main {
    padding: 58px 16px 18px;
  }

  .browser {
    position: relative;
    display: block;
    height: 100%;
  }

  .panel {
    height: calc(100svh - 76px);
    min-height: 360px;
    border-radius: 18px;
  }

  .link-set {
    padding: 18px 25px 12px;
  }

  .collection-header {
    min-height: 66px;
    align-items: center;
    padding: 0 24px;
  }

  .set-tabs {
    display: none;
  }

  .current-set-title {
    display: block;
    margin: 0;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .arrow {
    position: absolute;
    z-index: 2;
    bottom: 9px;
    width: 40px;
    height: 40px;
    background: transparent;
    border-color: transparent;
  }

  .arrow-previous {
    left: 10px;
  }

  .arrow-next {
    right: 10px;
  }
}

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