:root {
  --accent: #ff4500;
  --panel-bg: #7f2e1a;
  --ink: rgba(255, 255, 255, 0.5);
  --ink-dim: rgba(255, 255, 255, 0.3);
  --line: rgba(255, 255, 255, 0.08);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --vh: 100vh;
  --peek: 48px; /* sliver of home left visible so its tab can pull the panel back up */
  --ph: calc(var(--vh) - var(--peek));
  --p: 0; /* 0 = panel hidden, 1 = panel fully down */
}
@supports (height: 100dvh) {
  :root { --vh: 100dvh; }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0a0a0a; }
body { font-family: "Orbitron", sans-serif; }

/* Two full-screen slides stacked; the slider moves down to reveal the panel. */
.slider {
  transform: translateY(calc((var(--p) - 1) * var(--ph)));
  transition: transform 0.9s var(--ease);
  will-change: transform;
}
.slider.dragging { transition: none; }

.panel, .home {
  position: relative;
  overflow: hidden;
}
.panel { height: var(--ph); }
.home { height: var(--vh); }

/* ---------- Home ---------- */
.home {
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
    url("/party.jpg") center / cover no-repeat;
  background-color: var(--accent);
  background-blend-mode: normal, multiply;
}
.home h1 {
  margin: 0;
  padding: 0 1rem;
  font-weight: 900;
  font-size: clamp(2rem, 7vw, 7rem);
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--accent);
}

/* ---------- Pull tab ---------- */
.tab {
  position: absolute;
  top: 0;
  right: clamp(16px, 4vw, 48px);
  z-index: 5;
  width: 64px;
  height: 34px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: height 0.25s var(--ease), background 0.25s;
}
.tab:hover, .tab:focus-visible { height: 42px; background: rgba(255, 255, 255, 0.12); outline: none; }
.tab:active, .tab.grabbing { cursor: grabbing; }
.tab .grip { width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.tab svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.6s var(--ease);
}
.tab[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- Panel ---------- */
.panel {
  background: var(--panel-bg);
  display: grid;
  place-items: center;
}
.panel h2 {
  margin: 0;
  padding: 0 1rem;
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 7rem);
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--ink);
}

.search {
  position: absolute;
  top: 24px;
  right: 16px;
  z-index: 3;
  width: min(calc(100% - 32px), 472px);
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.3);
  cursor: text;
  transition: background 0.25s;
}
.search:focus-within { background: rgba(0, 0, 0, 0.4); }
.search svg {
  flex: none;
  width: 26px; height: 26px;
  fill: none; stroke: rgba(255, 255, 255, 0.25); stroke-width: 1.6; stroke-linecap: round;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: 400 0.95rem "Orbitron", sans-serif;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.7);
}
.search input::placeholder { color: rgba(255, 255, 255, 0.3); }

/* ---------- Results (covers the whole panel) ---------- */
.results {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 108px clamp(16px, 6vw, 96px) 48px;
  overflow-y: auto;
  background: rgba(34, 11, 6, 0.94);
  animation: fade-in 0.3s var(--ease);
}
.results[hidden] { display: none; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.results table { width: 100%; border-collapse: collapse; }
.results th, .results td { padding: 16px 14px; text-align: left; }
.results th {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line);
}
.results td {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid var(--line);
}
.results td:first-child { color: rgba(255, 255, 255, 0.8); }
.results tbody tr { transition: background 0.2s; }
.results tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
.results mark { background: none; color: var(--accent); }
.results .empty {
  margin: 48px 0 0;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}

@media (max-width: 640px) {
  .results th:nth-child(3), .results td:nth-child(3),
  .results th:nth-child(4), .results td:nth-child(4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .slider, .tab, .tab svg, .results { transition: none; animation: none; }
}
