/* Street Feed — TikTok-style vertical snap feed (mobile-first) */
:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --fg: #e8eaed;
  --muted: #9aa0a6;
  --accent: #c9a227;
  --neon: #2ecfff;
  --label-bg: rgba(0, 0, 0, 0.55);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, sans-serif;
}

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
}

.feed-root {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.feed-brand {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(to bottom, rgba(10, 11, 13, 0.92), transparent);
  pointer-events: none;
}

.feed-brand a {
  pointer-events: auto;
  color: var(--muted);
  text-decoration: none;
}

.feed-brand a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.feed-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.feed-container:focus {
  outline: none;
}

.feed-container:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: -2px;
}

/* Hide scrollbars where supported */
.feed-container {
  scrollbar-width: none;
}
.feed-container::-webkit-scrollbar {
  display: none;
}

.feed-slide {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  vertical-align: middle;
  background: #000;
}

.feed-sound-toggle {
  position: absolute;
  right: 0.75rem;
  bottom: 1.25rem;
  z-index: 3;
  min-height: 44px;
  min-width: 5.5rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--label-bg);
  border: 1px solid rgba(232, 234, 237, 0.2);
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.feed-sound-toggle:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
}

.feed-label {
  position: absolute;
  left: 0.75rem;
  bottom: 1.25rem;
  z-index: 2;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  color: var(--fg);
  background: var(--label-bg);
  border-radius: 6px;
  max-width: calc(100% - 1.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.75);
}

.video-fallback[hidden] {
  display: none;
}

.feed-ad {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #12151c 0%, #0a0b0d 100%);
}

.feed-ad--slot {
  padding: 0.75rem 1rem;
  box-sizing: border-box;
}

.feed-ad--slot .ad-shell {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 40vh;
}

.feed-ad--slot ins.adsbygoogle {
  max-width: 100%;
}

.feed-ad--slot .ad-fallback-msg {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 1rem;
  border: 1px dashed rgba(154, 160, 166, 0.28);
  border-radius: 10px;
}

.feed-ad .ad-placeholder {
  padding: 1.25rem 2rem;
  border: 1px dashed rgba(154, 160, 166, 0.35);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

/* House (first-party) image ads — slide stays full height; image fits within width, letterboxed */
.feed-slide--house-ad .feed-ad--house {
  width: 100%;
  height: 100%;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #0a0b0d;
}

.feed-slide--house-ad .feed-ad-house-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.75rem 1rem;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.feed-slide--house-ad .ad-placeholder-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.feed-slide--house-ad .house-ad-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: linear-gradient(160deg, #12151c 0%, #0a0b0d 100%);
}

.feed-slide--house-ad .house-ad-fallback[hidden] {
  display: none;
}

.feed-status {
  position: fixed;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  font-size: 0.75rem;
  color: var(--muted);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.feed-status.is-visible {
  opacity: 1;
}

.feed-error-banner {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  max-width: min(90vw, 24rem);
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  color: #f28b82;
  background: rgba(26, 29, 35, 0.95);
  border: 1px solid rgba(242, 139, 130, 0.35);
  border-radius: 8px;
  display: none;
}

.feed-error-banner.is-visible {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .feed-container {
    scroll-behavior: auto;
  }
}
