* { 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;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(rgba(0,0,0,.6), transparent);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
.icon-btn {
  background: rgba(0,0,0,.4);
  border: 0; color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 18px; cursor: pointer;
}
.icon-btn:focus-visible, .brand:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Vertical snap feed */
.feed {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
  outline: none;
}
.feed::-webkit-scrollbar { display: none; }

.reel {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  justify-content: center;
  background: #000;
}

.reel video {
  height: 100%;
  width: 100%;
  max-width: 480px;
  object-fit: cover;
  background: #111;
  cursor: pointer;
}

@media (min-width: 600px) {
  .reel video { border-radius: 12px; height: calc(100% - 24px); margin-top: 12px; }
}

.overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  padding: 48px 16px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  pointer-events: none;
}
.overlay .user { font-weight: 700; margin-bottom: 6px; }
.overlay .caption {
  font-size: 14px; line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.overlay a {
  pointer-events: auto;
  display: inline-block; margin-top: 8px;
  color: #fff; font-size: 13px; opacity: .85;
}

.pause-indicator {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px; opacity: 0;
  transition: opacity .2s; pointer-events: none;
}
.reel.paused .pause-indicator { opacity: .85; }

.status {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px;
  pointer-events: none; z-index: 5;
}
.status.hidden { display: none; }
.status.loading-more {
  inset: auto 0 16px 0; justify-content: center;
}
