* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #fff;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* ── Layout: side panels + center feed ─────────────────────── */
#app {
  display: flex;
  height: 100%;
  width: 100%;
}

.side-panel {
  flex: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 40px 20px;
  min-width: 0;
}
@media (min-width: 760px) {
  .side-panel { display: flex; }
}

.side-panel .ad-slot {
  width: 100%;
  max-width: 200px;
  height: 500px;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  background: rgba(255,255,255,0.015);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.06);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow: hidden;
}

.side-panel .branding-block {
  text-align: center;
}
.side-panel .branding-block .tagline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.08);
}
.side-panel .branding-block .accent-line {
  width: 40px;
  height: 2px;
  background: rgba(255,45,107,0.15);
  margin: 10px auto 0;
  border-radius: 1px;
}

#feed-wrapper {
  width: min(100vw, calc(100dvh * 9 / 16));
  height: 100dvh;
  flex-shrink: 0;
  position: relative;
}
@media (max-width: 759px) {
  #feed-wrapper { width: 100vw; }
}

/* ── Logo ──────────────────────────────────────────────────── */
#logo {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 2px;
  line-height: 1;
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
  cursor: pointer;
}
#logo .scroll { color: #fff; }
#logo .xxx   { color: #ff2d6b; }

/* ── Media type toggle (Videos / Photos) ──────────────────── */
#media-toggle {
  position: fixed;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 3px;
  backdrop-filter: blur(12px);
}
#media-toggle button {
  padding: 5px 16px;
  border: none;
  background: none;
  border-radius: 17px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
#media-toggle button.active {
  background: #ff2d6b;
  color: #fff;
}

/* ── Search button ─────────────────────────────────────────── */
#search-btn {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 101;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255,45,107,0.3);
  background: rgba(255,45,107,0.1);
  border-radius: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  backdrop-filter: blur(12px);
}
#search-btn:hover {
  background: rgba(255,45,107,0.2);
  border-color: rgba(255,45,107,0.5);
}
#search-btn svg {
  width: 14px;
  height: 14px;
  stroke: #ff2d6b;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
#search-btn span {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
}

/* ── Search bar (overlay) ──────────────────────────────────── */
#search-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(20px);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(-100%);
  transition: transform 0.25s ease;
}
#search-bar.open { transform: translateY(0); }

#search-bar input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
#search-bar input::placeholder { color: rgba(255,255,255,0.25); }
#search-bar input:focus { border-color: #ff2d6b; }

#search-bar .close-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#search-bar .close-btn svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
}

/* ── Active search indicator ───────────────────────────────── */
#search-tag {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(255,45,107,0.12);
  border: 1px solid rgba(255,45,107,0.25);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 5px 14px 5px 12px;
  font-size: 12px;
  color: #ff2d6b;
  display: none;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
#search-tag.active { display: flex; }
#search-tag svg {
  width: 12px;
  height: 12px;
  stroke: #ff2d6b;
  fill: none;
  stroke-width: 2;
}

/* ── Feed ──────────────────────────────────────────────────── */
#feed {
  height: 100dvh;
  width: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#feed::-webkit-scrollbar { display: none; }

.card {
  width: 100%;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card video, .card img.card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.card .title {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 14px 22px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  pointer-events: none;
}
.card .sub-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}

/* ── Category filter toggle button ────────────────────────── */
#filter-btn {
  position: fixed;
  top: 16px;
  left: 20px;
  z-index: 101;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(12px);
}
#filter-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}
#filter-btn.has-filter {
  border-color: rgba(255,45,107,0.4);
  background: rgba(255,45,107,0.12);
}
#filter-btn svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}
#filter-btn.has-filter svg { stroke: #ff2d6b; }

#discover-btn {
  position: fixed;
  top: 16px;
  left: 62px;
  z-index: 101;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  border-radius: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
#discover-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}
#discover-btn svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

#info-link {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 100;
  color: rgba(255,255,255,0.2);
  font-size: 11px;
  text-decoration: none;
  padding: 4px 8px;
  transition: color 0.2s;
}
#info-link:hover { color: rgba(255,255,255,0.5); }

/* ── Category filter panel ───────────────────────────────── */
#filter-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 300;
  width: 220px;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255,255,255,0.06);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}
#filter-panel.open { transform: translateX(0); }

#filter-panel .panel-header {
  padding: 0 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
}
#filter-panel .panel-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.7);
}
#filter-panel .panel-close {
  width: 28px; height: 28px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#filter-panel .panel-close svg {
  width: 12px; height: 12px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
}

#filter-panel .sub-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

#filter-panel .sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
#filter-panel .sub-item:hover { background: rgba(255,255,255,0.04); }

#filter-panel .sub-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
#filter-panel .sub-item.active .sub-check {
  background: #ff2d6b;
  border-color: #ff2d6b;
}
#filter-panel .sub-item.active .sub-check svg {
  display: block;
}
#filter-panel .sub-check svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
  display: none;
}

#filter-panel .sub-name {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}
#filter-panel .sub-item.active .sub-name {
  color: #fff;
}

#filter-panel .panel-footer {
  padding: 12px 18px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 8px;
}
#filter-panel .clear-btn {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: none;
  border-radius: 6px;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
#filter-panel .clear-btn:hover {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.6);
}

/* Backdrop overlay when panel is open */
#filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(0,0,0,0.5);
  display: none;
}
#filter-backdrop.open { display: block; }

/* ── Sound toggle button ───────────────────────────────────── */
.sound-btn {
  position: absolute;
  bottom: 70px;
  right: 14px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.sound-btn:hover { background: rgba(255,255,255,0.18); }
.sound-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound-btn.muted svg .sound-wave { display: none; }
.sound-btn.muted svg .mute-x { display: block; }
.sound-btn:not(.muted) svg .mute-x { display: none; }
.sound-btn.no-audio { display: none; }

/* ── Video progress bar ──────────────────────────────────── */
.video-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
  z-index: 11;
  cursor: pointer;
  transition: height 0.15s;
}
.video-progress:hover, .video-progress.dragging {
  height: 6px;
}
.video-progress .progress-filled {
  height: 100%;
  background: #e53935;
  width: 0%;
  position: relative;
  pointer-events: none;
}
.video-progress .progress-filled::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 10px;
  height: 10px;
  background: #e53935;
  border-radius: 50%;
  transition: transform 0.15s;
}
.video-progress:hover .progress-filled::after,
.video-progress.dragging .progress-filled::after {
  transform: translateY(-50%) scale(1);
}

/* ── Loading skeleton shimmer ─────────────────────────────── */
.skeleton-card {
  width: 100%;
  height: 100dvh;
  scroll-snap-align: start;
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}

/* ── Video buffering spinner ─────────────────────────────── */
.card .video-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  z-index: 5;
  transition: opacity 0.3s;
}
.card .video-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.card .video-loader::after {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}
@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

/* ── Retry button ──────────────────────────────────────────── */
.retry-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  padding: 12px 24px;
  background: rgba(255,45,107,0.2);
  border: 1px solid rgba(255,45,107,0.4);
  border-radius: 8px;
  color: #ff2d6b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.retry-btn:hover {
  background: rgba(255,45,107,0.3);
  border-color: rgba(255,45,107,0.6);
}

.skeleton-card .skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #0a0a0a 30%, #151515 50%, #0a0a0a 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-card .skeleton-title {
  position: absolute;
  bottom: 30px;
  left: 14px;
  right: 60px;
  height: 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
}
.skeleton-card .skeleton-title-2 {
  position: absolute;
  bottom: 52px;
  left: 14px;
  width: 60%;
  height: 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
}
.skeleton-card .skeleton-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 60px;
  height: 20px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
}
.skeleton-card .skeleton-btn {
  position: absolute;
  bottom: 80px;
  right: 14px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Title preview overlay (long-press) ──────────────────── */
.title-preview {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 14px 30px;
  background: rgba(0,0,0,0.92);
  color: #fff;
  font-size: 15px;
  line-height: 1.6;
  z-index: 20;
  backdrop-filter: blur(10px);
  animation: fadeUp 0.2s ease-out;
  pointer-events: none;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Mobile ad banner between cards ──────────────────────── */
.ad-card {
  width: 100%;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}
.ad-card .ad-container {
  width: 90%;
  max-width: 400px;
  min-height: 250px;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  background: rgba(255,255,255,0.015);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ad-card .ad-label {
  font-size: 10px;
  color: rgba(255,255,255,0.1);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Spinner / empty / error ───────────────────────────────── */
.spinner-wrap {
  width: 100%; height: 100dvh;
  scroll-snap-align: start;
  display: flex; align-items: center; justify-content: center;
}
.spin {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.06);
  border-top-color: #ff2d6b;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.msg-card {
  width: 100%; height: 100dvh;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; padding: 30px; text-align: center;
}
.msg-card .text { color: #444; font-size: 13px; line-height: 1.5; }

/* ── Age gate overlay ──────────────────────────────────────── */
#age-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#age-gate.hidden { display: none; }

.age-box {
  width: 90%;
  max-width: 380px;
  text-align: center;
  padding: 40px 30px;
}
.age-box .age-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 42px;
  letter-spacing: 3px;
  margin-bottom: 24px;
}
.age-box .age-logo .s { color: #fff; }
.age-box .age-logo .x { color: #ff2d6b; }
.age-box .age-warning {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-bottom: 30px;
}
.age-box .age-warning strong {
  color: #fff;
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}
.age-btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}
.age-btn {
  flex: 1;
  max-width: 150px;
  padding: 12px 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.age-btn.yes {
  background: #ff2d6b;
  color: #fff;
}
.age-btn.yes:hover { background: #e0245a; }
.age-btn.no {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}
.age-btn.no:hover { background: rgba(255,255,255,0.12); }

.age-terms-link {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  line-height: 1.5;
}
.age-terms-link a {
  color: rgba(255,45,107,0.5);
  text-decoration: none;
}
.age-terms-link a:hover { color: #ff2d6b; }

/* ── Terms modal ───────────────────────────────────────────── */
#terms-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#terms-modal.open { display: flex; }

.terms-box {
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  background: #111;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.terms-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.terms-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.8);
  font-weight: normal;
}
.terms-close {
  width: 30px; height: 30px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.terms-close svg {
  width: 14px; height: 14px;
  stroke: #fff; fill: none; stroke-width: 2;
}
.terms-body {
  padding: 22px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.4);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.terms-body h3 {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  margin: 16px 0 6px;
  font-weight: 600;
}
.terms-body h3:first-child { margin-top: 0; }
.terms-body p { margin-bottom: 10px; }

/* ── Tutorial overlay ──────────────────────────────────────── */
#tutorial {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#tutorial.show { display: flex; }

.tut-content {
  text-align: center;
  padding: 30px;
  animation: tutPulse 2s ease-in-out infinite;
}
@keyframes tutPulse {
  0%, 100% { opacity: 0.8; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}
.tut-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tut-icon svg {
  width: 22px; height: 22px;
  stroke: #ff2d6b; fill: none;
  stroke-width: 1.8; stroke-linecap: round;
}
.tut-text {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin-bottom: 6px;
}
.tut-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

/* ── Mobile-specific fixes ───────────────────────────────── */
@media (max-width: 759px) {
  #filter-btn, #search-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  #discover-btn {
    top: 48px;
    left: 16px;
    height: 28px;
    font-size: 10px;
    padding: 0 10px;
  }
  #search-btn { padding: 0 12px; }
  #search-btn span { display: none; }

  .sound-btn {
    width: 46px;
    height: 46px;
    bottom: 80px;
  }

  .video-progress {
    height: 4px;
  }
  .video-progress:hover, .video-progress.dragging {
    height: 8px;
  }

  .card .title {
    padding: 14px 14px 32px;
  }

  html, body { overscroll-behavior: none; }
  #feed { overscroll-behavior: contain; }

  #filter-panel { width: 260px; }

  .card .sub-tag {
    top: 60px;
    right: 10px;
  }

  .age-box { padding: 30px 20px; }
  .age-box .age-logo { font-size: 36px; }

  /* Mobile ad cards */
  .ad-card .ad-container {
    width: 95%;
    min-height: 200px;
  }
}

/* Prevent pull-to-refresh on mobile */
body { overscroll-behavior-y: contain; }

/* Safe area insets for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
  #logo, #search-btn, #filter-btn {
    top: calc(16px + env(safe-area-inset-top));
  }
  #media-toggle {
    top: calc(48px + env(safe-area-inset-top));
  }
  .card .title {
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
}
