/* ============================================================
   XREELS FRONTEND STYLESHEET (CONSOLIDATED)
   Strict Color Palette & Zero-Inline-CSS System
   ============================================================ */

:root {
  --text: #ffffff;
  --text2: #aaaaaa;
  --text3: #9ab2d0;
  --bg: #17202e;
  --bg2: #111827;
  --bg3: #000000;
  --hover: #ff5f2c;
  --active: #ff4000;
  --btn: #293348;
  --link: #00b4ff;
  --link2: #3085ff;
  --border: #374151;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --app-max-width: 500px;
  --nav-height: 56px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --transition: 0.2s ease;
}

/* Base Reset */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--btn) transparent;
}

html {
  font-family: var(--font-family);
  background-color: var(--bg3);
  color: var(--text);
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg3);
  color: var(--text);
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.svg-sprite-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* App Shell (Mobile-First Desktop Centering) */

.app-container {
  width: 100%;
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background-color: var(--bg2);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.page-content {
  flex: 1;
  padding: 10px 10px calc(var(--nav-height) + var(--safe-bottom) + 24px) 10px;
  overflow-y: auto;
}

/* Top Sticky Header */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 52px;
  background-color: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.brand-badge {
  color: var(--hover);
}

.profile-nav-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.icon-btn:hover {
  background-color: var(--btn);
  color: var(--hover);
  border-color: var(--hover);
}

.icon-btn-icon {
  width: 20px;
  height: 20px;
}

/* Bottom Sticky Navigation */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background-color: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text2);
  transition: color var(--transition);
  position: relative;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: calc(var(--safe-bottom) + 4px);
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background-color: var(--hover);
}

.nav-icon {
  width: 24px;
  height: 24px;
}

.nav-avatar-wrap {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition);
}

.nav-item.active .nav-avatar-wrap,
.nav-item:hover .nav-avatar-wrap {
  border-color: var(--hover);
}

.nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #ff1100 0%, #ff0057 100%);
  color: var(--text);
  box-shadow: 0 2px 12px rgba(255, 95, 44, 0.35);
  transition: transform var(--transition);
}

.nav-upload-btn:hover {
  background: var(--bg3);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.nav-upload-icon {
  width: 18px;
  height: 18px;
  stroke: var(--text);
}

/* Horizontal Topic Bar (Pure Text Tags, No Icons) */

.topic-pills-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
}

.topic-pills-bar::-webkit-scrollbar {
  display: none;
}

.topic-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
  transition: all var(--transition);
}

.topic-pill:hover,
.topic-pill.active {
  color: var(--text);
  border-color: var(--hover);
}

/* 3-Column Discovery Video Grid */

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.grid-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background-color: var(--bg);
  border: 1px solid var(--border);
  display: block;
  transition: transform var(--transition), border-color var(--transition);
}

.grid-card:hover {
  transform: translateY(-2px);
}

.grid-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--bg3);
}

.grid-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
}

.grid-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grid-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text3);
}

.meta-icon {
  width: 14px;
  height: 14px;
}

/* ============================================================
   FULL SCREEN SHORTS SCROLLER (TikTok / Reels Experience)
   ============================================================ */

.shorts-viewport {
  position: relative;
  width: 100%;
  max-width: var(--app-max-width);
  margin: 0 auto;
  height: calc(100vh - var(--nav-height) - var(--safe-bottom));
  height: calc(100dvh - var(--nav-height) - var(--safe-bottom));
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background-color: var(--bg3);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.shorts-viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.short-card {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-height) - var(--safe-bottom));
  height: calc(100dvh - var(--nav-height) - var(--safe-bottom));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background-color: var(--bg3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shorts-viewport:fullscreen,
.shorts-viewport:fullscreen .short-card,
.shorts-viewport:-webkit-full-screen,
.shorts-viewport:-webkit-full-screen .short-card {
  height: 100vh;
  height: 100dvh;
}

.short-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  background-color: var(--bg3);
}

.short-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease-in;
}

.short-video.is-ready {
  opacity: 1;
}

/* Adaptive Aspect-Ratio Playback (Non-9:16 Videos: True Ratio + GPU-Blurred Ambient Poster) */

.short-card.fit-contain .short-poster {
  object-fit: cover;
  filter: blur(28px) brightness(0.45);
  transform: scale(1.16);
}

.short-card.fit-contain .short-video {
  object-fit: contain;
}

.short-touch-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Unified Big Center Unmute Button (Shown only on first unmuted arrival) */

.center-unmute-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-radius: var(--radius-sm);
  background-color: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid var(--hover);
  box-shadow: 0 0 30px rgba(255, 95, 44, 0.4);
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: pulseCenter 2s infinite;
}

.center-unmute-btn.dismissed {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  pointer-events: none;
}

.center-unmute-circle {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  background-color: var(--hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  box-shadow: 0 4px 16px rgba(255, 95, 44, 0.5);
}

.center-unmute-icon {
  width: 28px;
  height: 28px;
}

.center-unmute-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
}

@keyframes pulseCenter {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 95, 44, 0.5);
  }

  50% {
    box-shadow: 0 0 0 14px rgba(255, 95, 44, 0);
  }
}

/* Play/Pause Pop */

.play-pause-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background-color: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 5;
}

.play-pause-indicator.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.play-pause-icon {
  width: 32px;
  height: 32px;
}

/* Double-Tap Heart Pop */

.floating-heart {
  position: absolute;
  width: 90px;
  height: 90px;
  color: var(--active);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 15;
  animation: heartPopAnim 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes heartPopAnim {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(-15deg);
  }

  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.35) rotate(0deg);
  }

  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateY(-10px);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) translateY(-40px);
  }
}

/* Mobile-First Legal Report & Takedown Bottom Sheet */

.report-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background-color: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.report-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.report-sheet {
  width: 100%;
  max-width: var(--app-max-width);
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 12px 16px calc(var(--safe-bottom) + 20px) 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.report-sheet-backdrop.open .report-sheet {
  transform: translateY(0);
}

.report-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: var(--radius-full);
  background-color: var(--border);
  margin: 0 auto 4px auto;
}

.report-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-sheet-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hover);
}

.report-sheet-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.report-sheet-video-name {
  font-size: 0.82rem;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-sheet-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Right-Side Action Bar */

.short-action-bar {
  position: absolute;
  right: 12px;
  bottom: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 20;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.action-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: rgb(0 0 0 / 9%);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: transform var(--transition), color var(--transition);
}

.action-btn:hover {
  color: var(--hover);
  background-color: rgb(255 255 255 / 27%);
}

.action-btn:active {
  transform: scale(0.85);
}

.action-btn.is-active {
  color: var(--active);
}

.action-icon {
  width: 24px;
  height: 24px;
}

.action-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}

.creator-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 2px solid var(--hover);
  overflow: hidden;
  background-color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.creator-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Bottom Creator Info & Title Overlay (Dark Gradient Backdrop - Zero Text Shadow) */

.short-info-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 72px 76px 30px 14px;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.92) 0%,
      rgba(0, 0, 0, 0.62) 55%,
      rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.short-creator-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  pointer-events: auto;
}

.short-creator-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background-color: var(--bg);
  flex-shrink: 0;
}

.short-creator-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
}

.short-creator-avatar-icon {
  width: 16px;
  height: 16px;
}

.short-creator-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.short-title {
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
  font-weight: 500;
}

.short-title.expanded {
  -webkit-line-clamp: unset;
  display: block;
}

.short-topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: auto;
}

.short-topic-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text3);
  text-decoration: underline;
}

.short-topic-tag:hover {
  color: var(--link);
}

/* Mobile-Safe Draggable Video Timeline */

.video-progress-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 24px;
  padding: 10px 14px;
  z-index: 30;
  cursor: pointer;
  touch-action: none;
  display: flex;
  align-items: center;
}

.video-progress-track {
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  transition: height 0.15s ease;
}

.video-progress-container:hover .video-progress-track,
.video-progress-container.is-scrubbing .video-progress-track {
  height: 6px;
}

.video-progress-fill {
  position: relative;
  height: 100%;
  width: 0%;
  background-color: var(--hover);
  border-radius: var(--radius-full);
}

.video-progress-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background-color: var(--text);
  border: 2px solid var(--hover);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.video-progress-container:hover .video-progress-thumb,
.video-progress-container.is-scrubbing .video-progress-thumb {
  transform: translateY(-50%) scale(1);
}

/* Floating Scrub Time Indicator Pill */

.scrub-time-pill {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  z-index: 35;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: rgba(17, 24, 39, 0.88);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.scrub-time-pill.visible {
  opacity: 1;
}

/* Clean / Immersion Mode (Tap & Hold 1s to Hide All Video Overlays) */

.short-action-bar,
.short-info-overlay,
.sound-toggle-btn,
.video-progress-container {
  transition: opacity 0.25s ease;
}

.shorts-viewport.clean-mode .short-action-bar,
.shorts-viewport.clean-mode .short-info-overlay,
.shorts-viewport.clean-mode .sound-toggle-btn {
  opacity: 0;
  pointer-events: none;
}

.shorts-viewport.clean-mode .short-info-overlay * {
  pointer-events: none;
}

.shorts-viewport.clean-mode .video-progress-container {
  opacity: 0;
}

.shorts-viewport.clean-mode .video-progress-container.is-scrubbing {
  opacity: 1;
}

/* ============================================================
   FACEBOOK-LIKE PROFILE SECTION (EDGE-TO-EDGE COVER)
   ============================================================ */

.profile-page-main {
  flex: 1;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 32px);
  overflow-y: auto;
}

.fb-cover-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  max-height: 190px;
  background-color: var(--bg);
  overflow: hidden;
  transition: outline var(--transition);
}

.fb-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-cover-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg) 0%, var(--btn) 50%, var(--bg2) 100%);
}

.fb-cover-edit-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 20;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--hover);
  border: 1px solid var(--hover);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--transition);
}

.fb-cover-edit-btn:hover {
  background-color: var(--active);
  border-color: var(--active);
}

.profile-page-main.is-editing .fb-cover-edit-btn {
  display: inline-flex;
}

.hidden-file-input {
  display: none;
}

.fb-avatar-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: -50px;
  z-index: 10;
  pointer-events: none;
}

.fb-edit-icon-btn {
  position: absolute;
  right: 16px;
  bottom: 6px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--btn);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: all var(--transition);
}

.fb-edit-icon-btn:hover {
  border-color: var(--hover);
  color: var(--hover);
}

.profile-page-main.is-editing .fb-edit-icon-btn {
  background-color: var(--hover);
  border-color: var(--hover);
  color: var(--text);
}

.fb-edit-icon-svg {
  width: 18px;
  height: 18px;
}

.fb-avatar-circle {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background-color: var(--bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: all var(--transition);
}

.fb-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 100%;
}

.fb-avatar-placeholder-icon {
  width: 50px;
  height: 50px;
  color: var(--text2);
}

.fb-avatar-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--hover);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition);
}

.fb-avatar-badge:hover {
  background-color: var(--active);
  transform: scale(1.08);
}

.profile-page-main.is-editing .fb-avatar-badge {
  display: flex;
  box-shadow: 0 0 8px var(--hover);
}

.fb-identity-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.fb-name-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.fb-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}

.fb-name-input {
  display: none;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  background-color: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  width: 100%;
  max-width: 320px;
  transition: border-color var(--transition), background-color var(--transition);
}

.fb-name-input:focus {
  border-color: var(--hover);
  background-color: var(--bg2);
}

.profile-page-main.is-editing .fb-name {
  display: none;
}

.profile-page-main.is-editing .fb-name-input {
  display: block;
}

.fb-username {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text3);
  font-weight: 600;
}

.fb-username-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text2);
  background-color: var(--btn);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-icon-xs {
  width: 12px;
  height: 12px;
}

.fb-bio-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.fb-bio {
  font-size: 0.88rem;
  color: var(--text2);
  max-width: 340px;
  line-height: 1.4;
}

.fb-bio-textarea {
  display: none;
  font-size: 0.88rem;
  color: var(--text);
  text-align: center;
  background-color: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  width: 100%;
  max-width: 340px;
  resize: none;
  min-height: 64px;
  line-height: 1.4;
  transition: border-color var(--transition), background-color var(--transition);
}

.fb-bio-textarea:focus {
  border-color: var(--hover);
  background-color: var(--bg2);
}

.profile-page-main.is-editing .fb-bio {
  display: none;
}

.profile-page-main.is-editing .fb-bio-textarea {
  display: block;
}

.fb-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.fb-edit-btn {
  padding: 8px 18px;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.profile-page-main.is-editing .fb-edit-btn {
  background-color: var(--btn);
  border-color: var(--hover);
  color: var(--hover);
}

.fb-stats-strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  padding: 10px 0;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.fb-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fb-stat-icon {
  width: 15px;
  height: 15px;
  color: var(--hover);
  flex-shrink: 0;
}

.fb-stat-number {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.fb-stat-label {
  font-size: 0.72rem;
  color: var(--text2);
}

.fb-reels-title {
  font-size: 1.1rem;
  padding: 0 16px;
}

.fb-reels-grid {
  padding: 0 5px;
}

.fb-reels-empty {
  padding: 0 16px;
}

/* Floating Overlay Save Bar (Zero Modals, Mobile-First) */

.profile-save-overlay {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 14px);
  z-index: 85;
  width: calc(100% - 32px);
  max-width: 440px;
  background-color: rgba(23, 32, 46, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease, visibility 0.28s ease;
}

.profile-save-overlay.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.save-overlay-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.save-overlay-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--hover);
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(0.85);
  }
}

.save-overlay-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.save-overlay-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   FORMS, TOPIC AUTO-SUGGESTION & UPLOAD
   ============================================================ */

.form-card {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.form-subtitle {
  font-size: 0.85rem;
  color: var(--text2);
}

h2.form-subtitle.mt-sm {
  padding-bottom: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text2);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--hover);
}

/* In-house Custom Dropdown (Select) */

select,
.form-select,
select.form-input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 11px 34px 11px 12px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ab2d0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px 13px;
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

select:hover,
.form-select:hover,
select.form-input:hover {
  border-color: var(--hover);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ff5f2c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

select:focus,
.form-select:focus,
select.form-input:focus {
  border-color: var(--hover);
  box-shadow: 0 0 0 2px var(--btn);
  background-color: var(--bg);
}

select:disabled,
.form-select:disabled,
select.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

select option,
.form-select option,
select.form-input option {
  background-color: var(--bg);
  color: var(--text);
  padding: 8px 12px;
}

/* In-house Custom Checkbox */

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 17px;
  height: 17px;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  position: relative;
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
  outline: none;
  margin: 0;
}

input[type="checkbox"]:hover {
  border-color: var(--hover);
  background-color: var(--bg3);
}

input[type="checkbox"]:focus-visible {
  border-color: var(--hover);
  box-shadow: 0 0 0 2px var(--btn);
}

input[type="checkbox"]:checked {
  background-color: var(--hover);
  border-color: var(--hover);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-position: center;
  background-size: 11px 11px;
  background-repeat: no-repeat;
}

input[type="checkbox"]:indeterminate {
  background-color: var(--hover);
  border-color: var(--hover);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
  background-position: center;
  background-size: 11px 11px;
  background-repeat: no-repeat;
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

/* Topic Auto-Suggestions */

.topic-autocomplete-wrap {
  position: relative;
}

.topic-suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  max-height: 180px;
  overflow-y: auto;
  display: none;
}

.topic-suggestions-list.open {
  display: block;
}

.topic-suggestion-item {
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid rgba(55, 65, 81, 0.4);
  transition: background-color var(--transition);
}

.topic-suggestion-item:hover {
  background-color: var(--btn);
  color: var(--hover);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-xs);
  font-size: 0.92rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-primary {
  background-color: var(--hover);
  color: var(--text);
}

.btn-primary:hover {
  background-color: var(--active);
}

.btn-secondary {
  background-color: var(--btn);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--bg2);
  border-color: var(--text3);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* Edge-to-Edge Upload Page (Mobile-First) */

.upload-page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  overflow-y: auto;
}

.upload-form-edge {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.upload-dropzone-edge {
  position: relative;
  width: 100%;
  min-height: 220px;
  border-bottom: 2px dashed var(--border);
  padding: 32px 16px;
  text-align: center;
  background-color: var(--bg);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.upload-dropzone-edge:hover,
.upload-dropzone-edge.drag-over {
  border-color: var(--hover);
  background-color: var(--btn);
}

.upload-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background-color: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hover);
}

.upload-icon-large {
  width: 28px;
  height: 28px;
}

.upload-prompt-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.upload-hint-text {
  font-size: 0.75rem;
  color: var(--text2);
}

.upload-preview-edge {
  display: none;
  position: relative;
  width: 100%;
  background-color: var(--bg3);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

.upload-preview-edge.active {
  display: flex;
}

.upload-preview-player {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background-color: var(--bg3);
  aspect-ratio: 16 / 9;
}

.upload-change-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  transition: background-color var(--transition), border-color var(--transition);
}

.upload-change-btn:hover {
  background-color: var(--hover);
  border-color: var(--hover);
}

.upload-fields-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

.upload-submit-footer {
  margin-top: auto;
  padding-top: 12px;
}

/* Post-Upload Success Screen */

.upload-success-view {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
  gap: 10px;
}

.upload-success-view.visible {
  display: flex;
}

.upload-success-thumb-wrap {
  position: relative;
  width: 150px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 2px solid var(--hover);
  background-color: var(--bg);
}

.upload-success-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-success-check {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--hover);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-success-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.upload-success-subtitle {
  font-size: 0.9rem;
  color: var(--text2);
  max-width: 340px;
}

.upload-success-link-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  border: 1px solid var(--border);
}

.upload-success-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--link);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-align: left;
}

.upload-success-link:hover {
  color: var(--link2);
  text-decoration: underline;
}

.upload-success-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.progress-wrap {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--btn);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background-color: var(--hover);
  transition: width 0.2s ease;
}

.progress-status-text {
  font-size: 0.75rem;
  color: var(--text2);
  display: flex;
  justify-content: space-between;
}

/* Empty State */

.empty-state-card {
  margin-top: 32px;
  text-align: center;
  align-items: center;
}

.empty-state-btn {
  margin-top: 12px;
}

/* Search input */

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text2);
  pointer-events: none;
}

.search-input {
  padding-left: 42px;
}

/* Topic Header & Tag Badge */

.topic-header-card {
  margin-bottom: 10px;
}

.topic-header-flex {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topic-title {
  font-size: 1.1rem;
}

.topic-desc-text {
  margin-top: 8px;
}

/* Auth Pages */

.auth-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-switch-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.auth-switch-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--hover);
}

.auth-switch-link:hover {
  text-decoration: underline;
}

.static-toast {
  position: static;
  transform: none;
  width: 100%;
  animation: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-published {
  background-color: rgba(0, 180, 255, 0.15);
  color: var(--link);
  border: 1px solid var(--link);
}

.mt-sm {
  margin-top: 12px;
}

.mt-md {
  margin-top: 24px;
}

/* Toast Notifications */

.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  background-color: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.88rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  animation: slideDownToast 0.3s ease;
  pointer-events: auto;
}

.toast-success {
  border-color: var(--link);
}

.toast-error {
  border-color: var(--active);
}

@keyframes slideDownToast {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   EXPANDABLE BOTTOM MEGA MENU OVERLAY
   ============================================================ */

.mega-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.mega-menu-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.mega-menu-panel {
  width: 100%;
  max-width: var(--app-max-width);
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(24px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.mega-menu-backdrop.open .mega-menu-panel {
  transform: translateY(0);
}

.mega-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mega-menu-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mega-menu-heading {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.3px;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.mega-menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: var(--radius-xs);
  background-color: var(--btn);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.mega-menu-card:hover,
.mega-menu-card.active {
  border-color: var(--hover);
  background-color: var(--bg2);
}

.mega-menu-card:active {
  transform: scale(0.97);
}

.mega-menu-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hover);
  overflow: hidden;
}

.mega-menu-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mega-menu-card-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.mega-menu-legal {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mega-menu-legal-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mega-menu-legal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mega-menu-legal-link {
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  background-color: var(--bg2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  transition: color var(--transition), border-color var(--transition);
}

.mega-menu-legal-link:hover,
.mega-menu-legal-link.active {
  color: var(--text);
  border-color: var(--hover);
}

/* ============================================================
   ALL TOPICS, ALL USERS & LEGAL PAGES
   ============================================================ */

.all-topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.topic-directory-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius-xs);
  background-color: var(--bg);
  transition: border-color var(--transition), background-color var(--transition);
}

.topic-directory-pill:hover {
  border-color: var(--hover);
  background-color: var(--btn);
}

.topic-directory-name {
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--text);
}

.topic-directory-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text3);
  background-color: var(--bg2);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.users-directory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-directory-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  background-color: var(--bg);
  border: 1px solid var(--border);
  transition: border-color var(--transition), background-color var(--transition);
}

.user-directory-card:hover {
  border-color: var(--hover);
  background-color: var(--btn);
}

.user-directory-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: var(--bg2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text2);
  flex-shrink: 0;
}

.user-directory-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.user-directory-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-directory-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text2);
}

.legal-doc-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-doc-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

.legal-doc-subtitle {
  font-size: 0.88rem;
  color: var(--text3);
  margin-top: -8px;
}

.legal-doc-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-doc-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.legal-doc-body {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text2);
}

.legal-doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Profile Website / Social Link & Follow Button */

.fb-website-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.fb-website-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--link);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fb-website-link:hover {
  color: var(--link2);
  text-decoration: underline;
}

.fb-website-empty {
  display: none;
}

.fb-website-input {
  display: none;
  font-size: 0.84rem;
  color: var(--text);
  text-align: center;
  background-color: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  width: 100%;
  max-width: 340px;
  transition: border-color var(--transition), background-color var(--transition);
}

.fb-website-input:focus {
  border-color: var(--hover);
  background-color: var(--bg2);
}

.profile-page-main.is-editing .fb-website-link {
  display: none;
}

.profile-page-main.is-editing .fb-website-input {
  display: block;
}

.fb-follow-wrap {
  margin-top: 10px;
}

.follow-btn {
  flex-shrink: 0;
  min-width: 84px;
}

/* Users Directory Inline Search & Load More */

.users-search-form {
  margin-bottom: 14px;
}

.user-directory-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.users-load-more-wrap {
  margin-top: 16px;
}

.users-load-more-wrap.hidden {
  display: none;
}

.topic-pill-all {
  border-color: var(--link);
  color: var(--link);
}

.topic-pill-all:hover {
  background-color: var(--btn);
  border-color: var(--link2);
  color: var(--text);
}

/* Suspended Profile Badge & 7-Day Legal Removal Notice Card */

.fb-name-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-suspended-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background-color: var(--bg2);
  color: var(--hover);
  border: 1px solid var(--hover);
}

/* Public Profile & Directory User Role Badges */
.user-directory-name-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.25;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background-color: var(--bg2);
  color: var(--text2);
}

.role-badge-creator {
  border-color: var(--link);
  color: var(--link);
  background-color: var(--bg2);
}

.role-badge-admin {
  border-color: var(--active);
  color: var(--text);
  background-color: var(--active);
}

/* Public Upload Guidelines & Live Hints */
.upload-rules-card {
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  background-color: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-rules-lead {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text2);
}

.upload-rules-lead.is-success {
  color: var(--link);
  font-weight: 600;
}

.upload-rules-lead.is-warn {
  color: var(--hover);
}

.upload-rules-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.upload-rules-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--link);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.upload-rules-title-warn {
  color: var(--hover);
}

.upload-rules-list {
  margin: 0;
  padding-left: 15px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.76rem;
  line-height: 1.38;
  color: var(--text2);
}

.upload-rules-checklist {
  list-style: none;
  padding-left: 0;
}

.upload-rule-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.upload-rule-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--text3);
  flex-shrink: 0;
}

.upload-rule-item.is-pass {
  color: var(--text);
}

.upload-rule-item.is-pass .upload-rule-mark {
  color: var(--link);
}

.upload-rule-item.is-fail .upload-rule-mark {
  color: var(--hover);
}

/* Public Upload Existing-Topics Chip Picker */
.upload-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.upload-topic-chips:empty {
  display: none;
}

.upload-topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background-color: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.upload-topic-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background-color: transparent;
  color: var(--text2);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.upload-topic-chip-remove:hover {
  color: var(--hover);
  background-color: var(--bg3);
}

.topic-suggestion-empty {
  padding: 10px 12px;
  font-size: 0.8rem;
  color: var(--text3);
  cursor: default;
}

@media (max-width: 480px) {
  .upload-rules-cols {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.upload-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.upload-field-hint {
  margin: 0;
  font-size: 0.76rem;
  color: var(--hover);
  line-height: 1.35;
}

.upload-field-hint.hidden {
  display: none;
}

.profile-suspended-notice {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background-color: var(--bg2);
  border: 1px solid var(--hover);
  color: var(--text2);
  font-size: 0.8rem;
  font-weight: 600;
}

.legal-removed-card {
  align-items: center;
  text-align: center;
  padding: 32px 20px;
}

.legal-removed-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background-color: var(--btn);
  border: 1px solid var(--hover);
  color: var(--hover);
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal-removed-icon {
  width: 26px;
  height: 26px;
}

.legal-removed-message {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.legal-removed-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* Rich HTML Formatting Inside Legal Pages */

.legal-doc-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-doc-body ul,
.legal-doc-body ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-doc-body li {
  line-height: 1.55;
  color: var(--text2);
}

.legal-doc-body strong {
  color: var(--text);
  font-weight: 700;
}

.legal-doc-body code {
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background-color: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text3);
  font-size: 0.82em;
}

/* In-Feed VAST Video Ad Card */

.short-ad-card {
  background-color: var(--bg3);
}

.ad-top-bar {
  position: absolute;
  top: calc(var(--safe-top) + 14px);
  left: 14px;
  right: 14px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ad-badge {
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background-color: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border);
  color: var(--text3);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.ad-skip-btn {
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  background-color: rgba(17, 24, 39, 0.88);
  border: 1px solid var(--hover);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  transition: background-color var(--transition), opacity var(--transition);
}

.ad-skip-btn:disabled {
  border-color: var(--border);
  color: var(--text2);
  cursor: default;
}

.ad-skip-btn:not(:disabled):hover {
  background-color: var(--hover);
}

.ad-info-overlay {
  pointer-events: auto;
  align-items: flex-start;
  gap: 10px;
}

.ad-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.ad-cta-btn {
  pointer-events: auto;
}

/* ==========================================================================
   Google OAuth 2.0 Button, Confirmation Step & Live Username Checker
   ========================================================================== */

.btn-google-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background-color: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}

.btn-google-oauth:hover {
  background-color: var(--bg3);
  border-color: var(--hover);
  color: var(--text);
}

.google-oauth-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text3);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--border);
}

.google-verified-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.84rem;
  color: var(--text2);
  word-break: break-word;
}

.google-verified-badge strong {
  color: var(--text);
}

.google-avatar-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.google-avatar-preview-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--bg3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.google-avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.google-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text2);
}

.google-avatar-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.google-avatar-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.google-avatar-upload-btn {
  cursor: pointer;
}

.google-avatar-hint {
  font-size: 0.76rem;
  color: var(--text3);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.username-check-status {
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--text3);
  min-height: 18px;
}

.username-check-status.is-checking {
  color: var(--text2);
}

.username-check-status.is-available {
  color: var(--link);
  font-weight: 600;
}

.username-check-status.is-taken {
  color: var(--hover);
  font-weight: 600;
}

.username-permanent-note {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--text3);
}

/* Semantic Homepage H1 Logo Wrapper */

.brand-logo-h1 {
  margin: 0;
  font-size: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   Minimal Animated 404 Page
   ========================================================================== */

.error-404-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 140px);
}

.error-404-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  padding: 32px 24px;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.error-404-art {
  margin: 0 auto 14px;
  max-width: 260px;
}

.error-404-svg {
  width: 100%;
  height: auto;
  display: block;
  color: var(--text);
}

.svg-404-digit {
  color: var(--text);
}

.svg-404-reel {
  color: var(--hover);
  transform-origin: 160px 70px;
  animation: xreels-reel-spin 9s linear infinite;
}

.svg-404-pulse {
  color: var(--text3);
  transform-origin: 160px 70px;
  animation: xreels-reel-pulse 2.6s ease-in-out infinite;
}

@keyframes xreels-reel-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes xreels-reel-pulse {

  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.96);
  }

  50% {
    opacity: 0.75;
    transform: scale(1.04);
  }
}

.error-404-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}

.error-404-desc {
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: var(--text2);
}

.error-404-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   18+ Age Verification Gate Modal
   ========================================================================== */

.age-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.age-gate-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.age-gate-card {
  width: 100%;
  max-width: 390px;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 28px 24px;
  text-align: center;
}

.age-gate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background-color: var(--bg3);
  border: 2px solid var(--hover);
  color: var(--hover);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.age-gate-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.age-gate-desc {
  margin: 0 0 22px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text2);
}

.age-gate-desc strong {
  color: var(--text);
}

.age-gate-link {
  color: var(--link);
  text-decoration: underline;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Grid Card Top-Right Duration Badge */

.grid-card-duration {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background-color: #0000005e;
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 0.72rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0.82;
}

/* Upload Selected Video Specs (Size & Resolution) */

.upload-video-specs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.upload-video-specs.hidden {
  display: none;
}

.upload-spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  background-color: var(--bg2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text2);
}

.upload-spec-pill strong {
  color: var(--text);
  font-weight: 700;
}

/* All Topics Client-Side Quick Search & Sort Bar */

.topics-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.topics-search-input {
  flex: 1;
  min-width: 0;
}

.topics-sort-select {
  width: auto !important;
  min-width: 148px !important;
  flex-shrink: 0 !important;
  cursor: pointer;
}

.topic-directory-pill.hidden,
.empty-state-card.hidden {
  display: none;
}

/* Global Utility: Hidden */

.hidden {
  display: none !important;
}

/* ============================================================
   Profile 3-Dot Account Menu & Security Modals
   ============================================================ */

.profile-menu-wrap {
  position: absolute;
  right: 16px;
  bottom: 6px;
  pointer-events: auto;
  z-index: 30;
}

.profile-menu-wrap .fb-edit-icon-btn {
  position: relative;
  right: auto;
  bottom: auto;
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 196px;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
}

.profile-dropdown-menu.open {
  display: flex;
}

.profile-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.profile-dropdown-item:hover {
  background-color: var(--btn);
  color: var(--hover);
}

.profile-dropdown-divider {
  height: 1px;
  background-color: var(--border);
  margin: 4px 6px;
}

.profile-dropdown-danger {
  color: var(--hover);
}

.profile-dropdown-danger:hover {
  background-color: var(--active);
  color: var(--text);
}

/* Profile Security Modals (Password & Delete Account) */

.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background-color: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.profile-modal-backdrop.open {
  display: flex;
}

.profile-modal-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65);
}

.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-modal-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.profile-modal-title-danger {
  color: var(--hover);
}

.profile-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: var(--btn);
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.profile-modal-close:hover {
  border-color: var(--hover);
  color: var(--text);
}

.profile-modal-desc {
  margin: 0 0 14px;
  font-size: 0.86rem;
  line-height: 1.48;
  color: var(--text2);
}

.profile-modal-desc strong {
  color: var(--text);
}

.profile-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.profile-delete-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.profile-delete-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--active);
  cursor: pointer;
}

.profile-delete-hint {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background-color: var(--bg);
  border-left: 3px solid var(--hover);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text2);
}

.profile-delete-hint strong {
  color: var(--text);
}

.profile-btn-danger {
  background-color: var(--active);
  border-color: var(--active);
  color: var(--text);
}

.profile-btn-danger:hover {
  background-color: var(--hover);
  border-color: var(--hover);
}

/* Auth Agreement Checkbox (Sign Up) & Automatic Disclaimer (Sign In) */

.auth-agree-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 6px;
  font-size: 0.83rem;
  line-height: 1.45;
  color: var(--text2);
  cursor: pointer;
}

.auth-agree-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--active);
  cursor: pointer;
}

.auth-agree-check a,
.auth-legal-disclaimer a {
  color: var(--link);
  text-decoration: underline;
}

.auth-agree-check a:hover,
.auth-legal-disclaimer a:hover {
  color: var(--link2);
}

.auth-legal-disclaimer {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--text2);
}

/* ============================================================
   Profile Inline Metrics, 3-Tab Bar & Owner Reel Controls
   ============================================================ */

.fb-inline-metrics {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--text2);
}

.fb-inline-metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fb-inline-metric strong {
  color: var(--text);
  font-weight: 700;
}

.fb-inline-metric .meta-icon {
  color: var(--text3);
}

.fb-inline-metric-sep {
  color: var(--border);
}

.profile-tabs-bar {
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  margin: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.profile-tab-link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text2);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition), background-color var(--transition);
}

.profile-tab-link:hover {
  color: var(--text);
  background-color: var(--bg2);
}

.profile-tab-link.active {
  color: var(--text);
  border-bottom-color: var(--hover);
}

.profile-tab-link.active .meta-icon {
  color: var(--hover);
}

.profile-tab-count {
  font-size: 0.78rem;
  color: var(--text3);
  font-weight: 600;
}

.profile-tab-link.active .profile-tab-count {
  color: var(--text2);
}

.fb-followers-list {
  padding: 0 12px;
}

.reel-card-wrap {
  position: relative;
  display: block;
}

.reel-card-wrap .grid-card {
  width: 100%;
  height: 100%;
}

.reel-card-wrap .grid-card-duration {
  right: 38px;
}

.reel-status-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  pointer-events: none;
}

.reel-status-live {
  background-color: var(--bg2);
  border: 1px solid var(--link);
  color: var(--link);
}

.reel-status-review {
  background-color: var(--bg2);
  border: 1px solid var(--hover);
  color: var(--hover);
}

.reel-card-more-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: var(--bg2);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.reel-card-more-btn:hover {
  border-color: var(--hover);
  color: var(--hover);
}

.reel-card-menu {
  position: absolute;
  top: 38px;
  right: 6px;
  z-index: 25;
  min-width: 128px;
  padding: 4px;
  border-radius: var(--radius-sm);
  background-color: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  display: none;
  flex-direction: column;
}

.reel-card-menu.open {
  display: flex;
}

.reel-card-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.reel-card-menu-danger {
  color: var(--hover);
}

.reel-card-menu-danger:hover {
  background-color: var(--active);
  color: var(--text);
}

/* ============================================================
   Guest In-Feed Sign-Up Prompt Reel Card
   ============================================================ */

.short-signup-card {
  background: radial-gradient(circle at 50% 25%, var(--bg) 0%, var(--bg2) 60%, var(--bg3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.signup-reel-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(var(--nav-height) + 28px);
}

.signup-reel-card {
  width: 100%;
  max-width: 360px;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.signup-reel-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: var(--radius-full);
  background-color: var(--bg);
  border: 1px solid var(--hover);
  color: var(--hover);
  display: flex;
  align-items: center;
  justify-content: center;
}

.signup-reel-icon {
  width: 28px;
  height: 28px;
}

.signup-reel-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

.signup-reel-message {
  margin: 0 0 20px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text2);
}

.signup-reel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signup-reel-skip-hint {
  margin: 16px 0 0;
  font-size: 0.76rem;
  color: var(--text3);
  letter-spacing: 0.02em;
}

/* In-Player Creator Bar & Compact Follow Pill */

.short-creator-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-bottom: 6px;
}

.short-creator-bar .short-creator-row {
  margin-bottom: 0;
  min-width: 0;
}

.short-follow-btn {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--hover);
  background-color: var(--active);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.short-follow-btn:hover {
  background-color: var(--hover);
  border-color: var(--hover);
}

.short-follow-btn.is-following {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text2);
}

.short-follow-btn.is-following:hover {
  border-color: var(--text2);
  color: var(--text);
}

/* Related Topics Pill Strip on /topic/{slug} */

.topic-related-strip {
  margin: 0 0 14px;
  gap: 10px;
  display: flex;
  overflow: auto;
  scrollbar-width: none;
}

/* All Users Directory: Isolated Search Bar + Popular Creators Filter Row */

.users-toolbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.users-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.users-search-wrap .search-input {
  width: 100%;
}

.users-sort-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background-color: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
}

.users-sort-select:focus {
  outline: none;
  border-color: var(--link);
}

/* ==========================================================================
   Responsive Media Queries (Consolidated at Bottom for Proper Cascade)
   ========================================================================== */

@media (max-width: 520px) {
  .users-toolbar-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media only screen and (max-width: 480px) {
  .topics-sort-select {
    min-width: 126px;
  }
}

@media only screen and (max-width: 425px) {
  .fb-stat-item {
    flex-direction: column;
  }
}

/* Multi-Image Gallery Grid Badge & Instagram-Style Horizontal Carousel */
.grid-card-gallery-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.grid-gallery-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.short-gallery-card {
  background-color: var(--bg);
}

.gallery-carousel-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
}

.gallery-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.gallery-carousel-track::-webkit-scrollbar {
  display: none;
}

.gallery-carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.gallery-carousel-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 50%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1;
  pointer-events: none;
}

.gallery-slide-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-counter-pill {
  position: absolute;
  top: 16px;
  right: 14px;
  z-index: 6;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background-color: rgb(0 0 0 / 9%);
  backdrop-filter: blur(3px);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  pointer-events: none;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
}

.gallery-nav-btn:active {
  transform: translateY(-50%) scale(0.85);
}

.gallery-prev {
  left: 12px;
}

.gallery-next {
  right: 12px;
}

.gallery-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  pointer-events: none;
}

.gallery-dot {
  width: 10px;
  height: 6px;
  border-radius: var(--radius-full);
  background: #ffffff69;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.gallery-dot.active {
  background: var(--text);
  transform: scale(1.25);
  width: 15px;
}

/* =========================================================================
   FACEBOOK / YOUTUBE-STYLE 2-LEVEL COMMENTS MODAL
   ========================================================================= */
body.comments-modal-open {
  overflow: hidden;
}

body.comments-modal-open .shorts-viewport,
body.comments-modal-open .gallery-carousel-track {
  overflow: hidden;
  pointer-events: none;
}

.comments-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.comments-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.comments-modal {
  width: 100%;
  max-width: 500px;
  height: 76dvh;
  max-height: 76dvh;
  background-color: rgb(18 24 38 / 45%);
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(24px);
  transition: transform 0.22s ease;
}

.comments-modal-backdrop.is-open .comments-modal {
  transform: translateY(0);
}

.comments-modal-handle {
  width: 38px;
  height: 4px;
  border-radius: var(--radius-full);
  background-color: var(--border);
  margin: 10px auto 2px;
  flex-shrink: 0;
}

.comments-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.comments-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.comments-modal-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}

.comments-modal-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background-color: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 0.74rem;
  font-weight: 600;
}

.comments-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  scrollbar-width: thin;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comments-status-msg {
  text-align: center;
  padding: 28px 12px;
  font-size: 0.85rem;
  color: var(--text3);
}

.comments-status-sm {
  padding: 8px 4px;
  text-align: left;
  font-size: 0.78rem;
}

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.comment-item-child {
  gap: 8px;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background-color: var(--bg3);
  border: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  text-decoration: none;
}

.comment-item-child .comment-avatar {
  width: 26px;
  height: 26px;
}

.comment-avatar img,
.comments-composer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comments-avatar-fallback-icon {
  width: 16px;
  height: 16px;
  color: var(--text3);
}

.comment-body {
  flex: 1 1 auto;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 3px;
}

.comment-author {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.comment-author:hover {
  text-decoration: underline;
}

.comment-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background-color: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.comment-role-admin {
  border-color: var(--btn);
  color: var(--btn);
}

.comment-time {
  font-size: 0.72rem;
  color: var(--text3);
}

.comment-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.42;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 5px;
}

.comment-action-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--text3);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.comment-action-link:hover {
  color: var(--text);
}

.comment-delete-link:hover {
  color: var(--btn);
}

.comment-replies-block {
  margin-top: 8px;
}

.comment-replies-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 2px 0;
  color: var(--link);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.comment-replies-toggle:hover {
  color: var(--link2);
}

.comment-replies-line {
  display: inline-block;
  width: 22px;
  height: 1px;
  background-color: var(--border);
}

.comment-replies-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.comment-replies-more {
  margin-top: 8px;
  margin-left: 12px;
  background: none;
  border: none;
  padding: 2px 0;
  color: var(--text2);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.comment-replies-more:hover {
  color: var(--text);
}

.comments-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.comments-load-more-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: var(--bg3);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.comments-load-more-btn:hover {
  background-color: var(--hover);
}

.comments-load-more-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.comments-modal-footer {
  position: relative;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background-color: var(--bg2);
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
}

.comments-mention-popup {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(100% + 6px);
  z-index: 20;
  background-color: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.comments-mention-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: background-color 0.12s ease;
}

.comments-mention-item:last-child {
  border-bottom: none;
}

.comments-mention-item:hover,
.comments-mention-item.is-active {
  background-color: var(--hover);
}

.comments-mention-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background-color: var(--bg3);
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comments-mention-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comments-mention-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.comments-mention-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comments-mention-handle {
  font-size: 0.72rem;
  color: var(--text3);
}

.comment-mention-link {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}

.comment-mention-link:hover {
  color: var(--link2);
  text-decoration: underline;
}

.comments-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: var(--radius-xs);
  background-color: var(--bg3);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text2);
}

.comments-reply-cancel {
  background: none;
  border: none;
  padding: 2px;
  color: var(--text3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.comments-reply-cancel:hover {
  color: var(--text);
}

.comments-error-msg {
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: var(--radius-xs);
  background-color: var(--bg3);
  border: 1px solid var(--btn);
  color: var(--btn);
  font-size: 0.78rem;
  font-weight: 600;
}

.comments-ban-bar {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background-color: var(--bg3);
  border: 1px solid var(--btn);
  color: var(--btn);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.comments-ban-bar {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background-color: var(--bg3);
  border: 1px solid var(--btn);
  color: var(--btn);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.comments-ban-bar {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background-color: var(--bg3);
  border: 1px solid var(--btn);
  color: var(--btn);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.comments-composer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-composer-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--bg3);
  border: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comments-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: var(--bg3);
  color: var(--text);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.comments-input::placeholder {
  color: var(--text3);
}

.comments-input:focus {
  border-color: var(--text3);
}

.comments-send-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: none;
  background-color: var(--btn);
  color: var(--text);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.comments-send-btn:hover {
  opacity: 0.9;
}

.comments-send-btn:active {
  transform: scale(0.92);
}

.comments-send-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.comments-send-icon {
  width: 17px;
  height: 17px;
}

.comments-login-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.comments-login-text {
  font-size: 0.84rem;
  color: var(--text2);
}

/* =========================================================================
   UNIVERSAL GAUSSIAN-BLURRED AUTH MODAL + FLOATING-LABEL INPUTS
   ========================================================================= */
body.auth-modal-open {
  overflow: hidden;
}

body.auth-modal-open .shorts-viewport,
body.auth-modal-open .gallery-carousel-track {
  overflow: hidden;
  pointer-events: none;
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 980;
  padding: 20px;
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.auth-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.auth-modal-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 42px 20px 20px;
  border-radius: var(--radius-sm);
  background-color: rgb(0 0 0 / 9%);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.auth-modal-backdrop.is-open .auth-modal-card {
  transform: translateY(0) scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
}

.auth-modal-error {
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background-color: var(--bg3);
  border: 1px solid var(--btn);
  color: var(--btn);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Outlined Border-Edge Floating Label Input */
.float-field {
  position: relative;
  width: 100%;
}

.float-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.16s ease;
}

.float-input-password {
  padding-right: 42px;
}

.float-input:focus {
  border-color: var(--text2);
}

.float-label {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 6px;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
  transition: top 0.16s ease, font-size 0.16s ease, color 0.16s ease;
}

.float-input:focus+.float-label,
.float-input:not(:placeholder-shown)+.float-label {
  top: 0px;
  font-weight: 600;
  color: var(--text2);
}

.float-input:focus+.float-label {
  color: var(--text);
}

.float-eye-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease;
}

.float-eye-btn:hover {
  color: var(--text);
}

.float-eye-icon {
  width: 17px;
  height: 17px;
}

/* 2-Column Action Buttons: Log in | Google */
.auth-modal-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.auth-modal-btn-row-single {
  grid-template-columns: 1fr;
}

.auth-modal-btn,
.auth-modal-google-btn {
  height: 42px;
  margin: 0;
  padding: 0 14px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-modal-create-btn {
  height: 40px;
  border-radius: var(--radius-xs);
  font-size: 0.84rem;
  font-weight: 600;
}


/* ============================================================
   Animated Step-by-Step Reel Gesture Walkthrough (Thumb-Reach)
   ============================================================ */
.gesture-guide-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 100px;
  z-index: 1200;
  display: flex;
  justify-content: center;
  padding: 0 14px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.gesture-guide-overlay.is-open {
  opacity: 1;
  transform: translateY(0);
}

.gesture-guide-sheet {
  width: 100%;
  max-width: 340px;
  pointer-events: auto;
  background: rgb(15 23 35 / 30%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-sm);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.gesture-guide-visual {
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gg-anim {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 1. Hold 1s Animation (concentric growing rings + press dot) */
.gg-anim-hold {
  width: 56px;
  height: 56px;
}

.gg-touch-dot {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background-color: var(--link);
  position: relative;
  z-index: 2;
}

.gg-ring {
  position: absolute;
  inset: 6px;
  border-radius: var(--radius-full);
  border: 2px solid var(--link);
  opacity: 0;
  animation: ggHoldRing 1.8s ease-out infinite;
}

.gg-ring-2 {
  animation-delay: 0.6s;
}

@keyframes ggHoldRing {
  0% {
    transform: scale(0.45);
    opacity: 0.9;
  }

  80% {
    transform: scale(1.25);
    opacity: 0.15;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* 2. Double Tap Heart Pop Animation */
.gg-anim-heart {
  width: 56px;
  height: 56px;
}

.gg-heart-svg {
  width: 30px;
  height: 30px;
  color: var(--active);
  position: relative;
  z-index: 2;
  animation: ggHeartPop 1.4s ease-in-out infinite;
}

.gg-heart-ripple {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 2px solid var(--active);
  opacity: 0;
  animation: ggHoldRing 1.4s ease-out infinite;
}

@keyframes ggHeartPop {

  0%,
  100% {
    transform: scale(0.92);
  }

  25% {
    transform: scale(1.22);
  }

  45% {
    transform: scale(0.96);
  }

  65% {
    transform: scale(1.18);
  }
}

/* 3. Horizontal Swipe / Scrub Animation */
.gg-anim-scrub {
  gap: 10px;
  width: 150px;
}

.gg-scrub-arrow {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text3);
  line-height: 1;
}

.gg-scrub-track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: var(--radius-full);
  background-color: var(--bg3);
}

.gg-scrub-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background-color: var(--link);
  transform: translate(-50%, -50%);
  animation: ggScrubSlide 1.8s ease-in-out infinite;
}

@keyframes ggScrubSlide {

  0%,
  100% {
    left: 18%;
  }

  50% {
    left: 82%;
  }
}

/* 4. Single Tap Animation */
.gg-anim-tap {
  width: 56px;
  height: 56px;
}

.gg-tap-ripple {
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 2px solid var(--link);
  animation: ggTapPulse 1.3s ease-out infinite;
}

@keyframes ggTapPulse {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.gesture-guide-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background-color: var(--bg3);
  border: 1px solid var(--border);
  color: var(--link);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.gesture-guide-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}

.gesture-guide-desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text2);
}

.gesture-guide-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px 0;
}

.gg-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--bg3);
  transition: width 0.18s ease, background-color 0.18s ease;
}

.gg-dot.active {
  width: 18px;
  background-color: var(--link);
}

.gesture-guide-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.gesture-guide-skip,
.gesture-guide-next {
  height: 38px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
}