* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.categories::-webkit-scrollbar { display: none; }

.category-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease;
}
.category-chip.active {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.4);
}

.feed {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 96px 0 24px; /* top room for fixed topbar */
  background: #000;
}
.feed::-webkit-scrollbar { display: none; }

.card {
  /* 9:16 vertical phone frame, fit to viewport height */
  width: min(calc((100vh - 120px) * 9 / 16), 100vw);
  height: calc(100vh - 120px);
  aspect-ratio: 9 / 16;
  position: relative;
  scroll-snap-align: start;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
  flex: 0 0 auto;
}

.player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5) 100%);
}

.meta {
  padding: 80px 16px 100px;
  pointer-events: auto;
}

.title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.description {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 6px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.source {
  font-size: 12px;
  opacity: 0.6;
}
.source a { color: inherit; text-decoration: underline; }

.actions {
  position: absolute;
  right: 8px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  pointer-events: auto;
}

.action {
  background: rgba(0,0,0,0.35);
  border: none;
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.action .count {
  font-size: 11px;
  margin-top: 2px;
}

.empty {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}