/* ============================================================
 * TIKTOK-STYLE CLONE — Complete Redesign
 * Full-screen vertical video/post feed, dark-first, immersive
 * ============================================================ */

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

:root {
  /* TikTok brand colors */
  --tt-pink: #fe2c55;
  --tt-cyan: #25f4ee;
  --tt-black: #000;
  --tt-white: #fff;

  /* Surfaces */
  --bg-primary: #000;
  --bg-secondary: #121212;
  --bg-tertiary: #1a1a1a;
  --bg-elevated: #1e1e1e;
  --bg-overlay: rgba(0,0,0,0.6);

  /* Text */
  --text-primary: #fff;
  --text-secondary: rgba(255,255,255,0.75);
  --text-tertiary: rgba(255,255,255,0.5);
  --text-muted: rgba(255,255,255,0.4);

  /* Borders */
  --border: rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.2);

  /* Actions */
  --primary: var(--tt-pink);
  --primary-hover: #e62748;
  --danger: #ff3b30;
  --success: #25f4ee;

  /* Sizing */
  --sidebar-width: 240px;
  --bottom-nav-height: 56px;
  --topbar-height: 56px;

  /* Radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Transitions */
  --transition: 0.2s ease;

  /* Shadows */
  --shadow: 0 4px 16px rgba(0,0,0,0.5);
}

html, body {
  height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font-family: inherit; cursor: pointer; }
img, video { display: block; max-width: 100%; }
input, textarea { font-family: inherit; color: inherit; background: transparent; border: 0; outline: 0; }

/* =================================================================
   APP LAYOUT
   ================================================================= */
.app-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
}

/* =================================================================
   DESKTOP SIDEBAR (left nav) — simplified TikTok style
   ================================================================= */
.sidebar {
  background: var(--bg-primary);
  border-inline-end: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 8px;
  overflow-y: auto;
  gap: 4px;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 6px 14px 18px;
  color: var(--tt-pink);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.sidebar-logo svg {
  width: 30px; height: 30px;
  fill: var(--tt-pink);
}
.sidebar-logo::after {
  content: "TikTak";
  color: var(--text-primary);
  font-weight: 900;
  font-size: 22px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
  position: relative;
  transition: background var(--transition), color var(--transition);
}
.nav-item i { font-size: 22px; width: 26px; text-align: center; }
.nav-item:hover { background: var(--bg-tertiary); }
.nav-item.active { color: var(--tt-pink); background: rgba(254,44,85,0.08); }
.nav-item.active i { color: var(--tt-pink); }

.badge-count {
  position: absolute;
  inset-inline-end: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--tt-pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg-secondary);
  margin-top: auto;
  transition: background var(--transition);
}
.sidebar-user:hover { background: var(--bg-tertiary); }
.sidebar-user img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.sidebar-user .info h4 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.sidebar-user .info span { font-size: 12px; color: var(--text-tertiary); }

/* =================================================================
   MAIN FEED
   ================================================================= */
.main-feed {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: #000;
}
.main-feed::-webkit-scrollbar { display: none; }

/* =================================================================
   TIKTOK-STYLE FULL-SCREEN POST CARD
   One post = one screen (snapped)
   ================================================================= */
.tt-post {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

/* Centered 9:16 video stage — desktop keeps aspect, mobile fills */
.tt-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: min(calc(100dvh * 9 / 16), 460px);
  margin: 0 auto;
  background: #111;
  overflow: hidden;
}
@media (min-width: 900px) {
  .tt-stage { border-radius: 12px; }
  .tt-post { padding: 12px 0; }
}
@media (max-width: 899px) {
  .tt-stage { max-width: none; border-radius: 0; }
}

/* Media layers */
.tt-video,
.tt-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Background blur behind 9:16 media when screen is wider */
.tt-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(40px) brightness(0.6);
  transform: scale(1.2);
  z-index: 0;
  pointer-events: none;
}

/* Gradient overlays for readability */
.tt-gradient-top,
.tt-gradient-bottom {
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  z-index: 2;
}
.tt-gradient-top {
  top: 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
}
.tt-gradient-bottom {
  bottom: 0;
  height: 260px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
}

/* Tap zone for play/pause & double-tap like */
.tt-tap {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* Play indicator center */
.tt-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.tt-play i {
  font-size: 60px;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.tt-post.paused .tt-play { opacity: 1; }

/* Buffering */
.tt-buffer {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 60px; height: 60px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4;
}
.tt-post.buffering .tt-buffer { display: flex; }
.tt-buffer .spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =================================================================
   RIGHT ACTIONS BAR (like/comment/share/bookmark)
   ================================================================= */
/* =================================================================
   RIGHT ACTIONS BAR — TikTok-style, SVG icons, functional
   ================================================================= */
.tt-actions {
  position: absolute;
  inset-inline-end: 10px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  z-index: 5;
  pointer-events: auto;
}

.tt-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.tt-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  border-radius: 50%;
}
.tt-action-icon::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform: scale(0.6);
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.tt-action:active .tt-action-icon::before {
  opacity: 1;
  transform: scale(1);
  transition: transform 0.08s ease, opacity 0.08s ease;
}

/* SVG explicit sizing + default white fill */
.tt-action-icon svg {
  width: 38px;
  height: 38px;
  display: block;
  color: #fff;
  fill: #fff;
}
.tt-action-more .tt-action-icon svg {
  width: 28px;
  height: 28px;
}

/* Heart & bookmark: start filled white, paint via currentColor when active */
.tt-action-like .tt-action-icon svg path,
.tt-action-bookmark .tt-action-icon svg path {
  fill: #fff;
  stroke: rgba(255, 255, 255, 0.0);
  transition: fill 0.2s ease;
}

/* LIKED state — vivid pink */
.tt-action.liked .tt-action-icon svg path {
  fill: #fe2c55 !important;
}
.tt-action.liked .tt-action-icon {
  animation: tt-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* BOOKMARKED state — gold */
.tt-action.bookmarked .tt-action-icon svg path {
  fill: #ffd60a !important;
}
.tt-action.bookmarked .tt-action-icon {
  animation: tt-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tt-pop {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.8); }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* Hover/active scales */
.tt-action:hover .tt-action-icon { transform: scale(1.08); }
.tt-action:active { transform: scale(0.92); }

/* Count label under each icon */
.tt-action-count {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
  letter-spacing: 0.3px;
  min-width: 20px;
  text-align: center;
}

/* ====================================
   AVATAR + FOLLOW PLUS BUTTON
   ==================================== */
.tt-author-avatar {
  position: relative;
  margin-bottom: 12px;
}
.tt-author-avatar a {
  display: block;
  border-radius: 50%;
  overflow: hidden;
}
.tt-author-avatar img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  display: block;
  background: #222;
}

.tt-follow-plus {
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tt-pink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, opacity 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.tt-follow-plus svg {
  width: 14px;
  height: 14px;
  color: #fff;
}
.tt-follow-plus:active { transform: translateX(-50%) scale(0.82); }

/* Done state — check mark fades out after moment */
.tt-follow-plus.done {
  background: var(--tt-pink);
  animation: tt-follow-done 2.5s ease forwards;
}
@keyframes tt-follow-done {
  0%   { transform: translateX(-50%) scale(1); opacity: 1; }
  40%  { transform: translateX(-50%) scale(1.2); opacity: 1; }
  70%  { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(0.5); opacity: 0; pointer-events: none; }
}

/* ====================================
   ROTATING MUSIC DISC
   ==================================== */
.tt-disc {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #0a0a0a 22%, #000 24%, #1a1a1a 50%, #000 54%, #222 100%);
  padding: 4px;
  animation: tt-spin 8s linear infinite;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
}
.tt-disc::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.03) 4px,
    rgba(255, 255, 255, 0.03) 5px
  );
  pointer-events: none;
}
.tt-disc img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  position: relative;
}
.tt-disc::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
  z-index: 2;
}
@keyframes tt-spin { to { transform: rotate(360deg); } }
.tt-post.paused .tt-disc { animation-play-state: paused; }

.tt-follow-plus .tt-spin { animation: tt-spin 0.8s linear infinite; }

/* Mobile: slightly tighter spacing */
@media (max-width: 480px) {
  .tt-actions {
    inset-inline-end: 6px;
    bottom: 84px;
    gap: 16px;
  }
  .tt-action-icon { width: 40px; height: 40px; }
  .tt-action-icon svg { width: 32px; height: 32px; }
  .tt-action-more .tt-action-icon svg { width: 22px; height: 22px; }
  .tt-action-count { font-size: 12px; }
  .tt-author-avatar img { width: 48px; height: 48px; }
  .tt-disc { width: 44px; height: 44px; }
}
@media (max-width: 360px) {
  .tt-actions { gap: 14px; bottom: 78px; }
}

/* ====================================
   FLOATING MUSIC NOTES (rise from disc)
   ==================================== */
.tt-disc .note {
  position: absolute;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  animation: tt-note-float 3s ease-in-out infinite;
  pointer-events: none;
}
.tt-disc .note:nth-child(1) { top: -6px; inset-inline-start: -8px; animation-delay: 0s; }
.tt-disc .note:nth-child(2) { top: -12px; inset-inline-start: 12px; animation-delay: 1s; }
.tt-disc .note:nth-child(3) { top: -4px; inset-inline-start: 28px; animation-delay: 2s; }

@keyframes tt-note-float {
  0%   { transform: translateY(0) rotate(0); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translateY(-36px) rotate(20deg); opacity: 0; }
}

/* =================================================================
   BOTTOM INFO (username, caption, music)
   ================================================================= */
.tt-info {
  position: absolute;
  inset-inline-start: 16px;
  inset-inline-end: 80px;
  bottom: 80px;
  z-index: 5;
  color: #fff;
  pointer-events: none;
}
.tt-info > * { pointer-events: auto; }

.tt-user {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.tt-username {
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.tt-caption {
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  max-height: 4.5em;
  overflow: hidden;
  word-break: break-word;
  margin-bottom: 10px;
}
.tt-caption.expanded { max-height: none; }
.tt-caption-more {
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  font-size: 13px;
  margin-inline-start: 4px;
}
.tt-caption a { color: #fff; font-weight: 700; }
.tt-caption .mention, .tt-caption .hashtag { color: #fff; font-weight: 700; }

.tt-music {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  overflow: hidden;
  white-space: nowrap;
}

/* Repost indicator (small badge above info) */
.tt-repost-badge {
  position: absolute;
  top: 70px;
  inset-inline-start: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.tt-repost-badge i { color: var(--success); }

/* Mute button */
.tt-mute {
  position: absolute;
  top: 70px;
  inset-inline-end: 16px;
  z-index: 5;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Progress bar */
.tt-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
  z-index: 6;
}
.tt-progress-fill {
  height: 100%;
  width: 0;
  background: #fff;
  transition: width 0.1s linear;
}

/* Double-tap heart burst */
.tt-heart-burst {
  position: absolute;
  transform: translate(-50%, -50%) scale(0);
  width: 120px;
  height: 120px;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}
.tt-heart-burst svg { width: 100%; height: 100%; display: block; }
.tt-heart-burst.show {
  animation: heart-burst 0.9s ease forwards;
}
@keyframes heart-burst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(-15deg); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.3) rotate(5deg); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-5deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6) rotate(0); }
}

/* =================================================================
   POLL inside TikTok card
   ================================================================= */
.tt-poll {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  padding: 10px;
  margin-top: 8px;
  max-width: 100%;
}
.tt-poll .poll-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.2);
  width: 100%;
  position: relative;
  overflow: hidden;
  text-align: start;
}
.tt-poll .poll-option.voted { cursor: default; }
.tt-poll .poll-bar {
  position: absolute;
  inset: 0;
  background: rgba(254,44,85,0.4);
  z-index: 0;
}
.tt-poll .poll-option > * { position: relative; z-index: 1; }
.tt-poll .poll-meta { color: #fff; font-size: 12px; margin-top: 4px; opacity: 0.8; }

/* Quoted post inside TikTok card */
.tt-quote {
  margin-top: 8px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 13px;
}
.tt-quote strong { font-weight: 800; }

/* =================================================================
   MOBILE TOP BAR (tabs: For You / Following)
   ================================================================= */
.mobile-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
  padding-top: env(safe-area-inset-top, 0);
}
.mobile-topbar > * { pointer-events: auto; }

.mobile-topbar-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
}
.mobile-topbar-tab {
  color: rgba(255,255,255,0.65);
  font-size: 17px;
  font-weight: 700;
  position: relative;
  padding: 6px 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.mobile-topbar-tab.active { color: #fff; }
.mobile-topbar-tab.active::after {
  content: "";
  position: absolute;
  left: 10%; right: 10%;
  bottom: 0;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.mobile-topbar-search {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
}

/* On desktop, show the tabs inside the top bar too */
@media (min-width: 900px) {
  .mobile-topbar { max-width: calc(100vw - var(--sidebar-width)); inset-inline-start: var(--sidebar-width); }
}

/* =================================================================
   MOBILE BOTTOM NAV — TikTok style with center (+)
   ================================================================= */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: #000;
  border-top: 1px solid var(--border);
  display: none;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 2px;
  gap: 2px;
  position: relative;
}
.mobile-nav-item i { font-size: 22px; }
.mobile-nav-item.active { color: #fff; }

/* TikTok-style center "+" publish button */
.mobile-nav-publish {
  flex: 0 0 auto;
  width: 46px; height: 30px;
  border-radius: 10px;
  background: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    -6px 0 0 -2px var(--tt-cyan),
    6px 0 0 -2px var(--tt-pink);
  color: #000;
  font-size: 18px;
  font-weight: 900;
}
.mobile-nav-publish i { font-size: 18px; color: #000; }

@media (max-width: 899px) {
  .mobile-bottom-nav { display: flex; }
  .sidebar { display: none; }
  .app-container { grid-template-columns: 1fr; }
  .main-feed { padding-bottom: var(--bottom-nav-height); }
}

/* =================================================================
   MODAL (generic) — for compose / comments / etc.
   ================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modal-in 0.25s ease;
}
@keyframes modal-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-header, .compose-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-primary);
}
.modal-close:hover { background: var(--bg-tertiary); }
.modal-body { padding: 16px; overflow-y: auto; flex: 1; }

.btn-draft-save {
  color: var(--tt-pink);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius);
}

/* =================================================================
   COMPOSER — TikTok-like Upload UI
   ================================================================= */
.composer-pro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.composer-avatar-wrap { display: none; }
.composer-thread-line { display: none; }
.composer-audience { display: none; }
.composer-reply-who { display: none; }
.composer-divider { display: none; }
.composer-body { display: flex; flex-direction: column; gap: 10px; }
.composer-textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 15px;
  color: var(--text-primary);
  resize: none;
}
.composer-textarea::placeholder { color: var(--text-tertiary); }

.composer-media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.composer-media-preview:empty { display: none; }
.composer-media-preview .item {
  position: relative;
  aspect-ratio: 9/16;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-tertiary);
}
.composer-media-preview .item img,
.composer-media-preview .item video {
  width: 100%; height: 100%; object-fit: cover;
}
.composer-media-preview .item .remove {
  position: absolute; top: 6px; inset-inline-end: 6px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.composer-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.composer-action {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tt-pink);
  font-size: 17px;
  transition: background var(--transition);
}
.composer-action:hover { background: rgba(254,44,85,0.12); }
.composer-meta { display: flex; align-items: center; gap: 10px; }

.char-counter { position: relative; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.char-counter svg { transform: rotate(-90deg); }
.char-counter circle.bg { stroke: var(--bg-tertiary); stroke-width: 2; fill: none; }
.char-counter circle.progress { stroke: var(--tt-cyan); stroke-width: 2; fill: none; stroke-linecap: round; transition: stroke-dashoffset 0.2s; }
.char-counter-num { position: absolute; font-size: 10px; font-weight: 700; }
.char-counter.warn circle.progress { stroke: #ffd60a; }
.char-counter.over circle.progress { stroke: var(--danger); }

.btn-primary {
  background: var(--tt-pink);
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 22px;
  font-weight: 700;
  font-size: 14px;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn, .btn-follow, .empty-btn {
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transition: background var(--transition);
  display: inline-block;
}
.btn-follow, .empty-btn, .btn.btn-primary { background: var(--tt-pink); color: #fff; }
.btn-follow:hover, .empty-btn:hover { background: var(--primary-hover); }
.btn-follow.following { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-strong); }

/* Remove inline composer (no longer used on home feed) */
.composer-inline { display: none !important; }

/* =================================================================
   COMMENTS DRAWER (bottom sheet)
   ================================================================= */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 80;
  display: none;
}
.drawer-backdrop.active,
.drawer-backdrop.show { display: block; }

.comments-drawer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 70vh;
  max-height: 700px;
  background: var(--bg-secondary);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 90;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.comments-drawer.active { transform: translateY(0); }

@media (min-width: 900px) {
  .comments-drawer {
    left: auto;
    right: 20px;
    bottom: 20px;
    width: 420px;
    height: 80vh;
    border-radius: 18px;
  }
}

.comments-head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.comments-head h3 { font-size: 15px; font-weight: 700; }
.comments-close {
  position: absolute;
  inset-inline-start: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.comments-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.comments-loading { display: flex; justify-content: center; padding: 30px; }
.comments-loading .spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--tt-pink); border-radius: 50%; animation: spin 0.9s linear infinite; }

.comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.comment-item img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.comment-item .body { flex: 1; }
.comment-item .head { display: flex; align-items: center; gap: 6px; }
.comment-item .head strong { font-size: 13px; font-weight: 700; }
.comment-item .time { font-size: 11px; color: var(--text-tertiary); }
.comment-item .text { font-size: 14px; margin-top: 2px; line-height: 1.5; color: var(--text-primary); }
.comment-item .meta { display: flex; gap: 12px; margin-top: 4px; font-size: 12px; color: var(--text-tertiary); }
.comment-item .meta button { color: var(--text-tertiary); font-weight: 600; }
.comment-item .meta button.liked { color: var(--tt-pink); }

.comments-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}
.comments-input img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.comments-input input {
  flex: 1;
  background: var(--bg-tertiary);
  border-radius: 18px;
  padding: 9px 14px;
  font-size: 14px;
}
.comments-input button {
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--tt-pink);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comments-input button:disabled { color: var(--text-tertiary); }

/* =================================================================
   SHARE SHEET
   ================================================================= */
.share-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--bg-secondary);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 12px 16px 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
  z-index: 90;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.share-sheet.active { transform: translateY(0); }
.sheet-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  margin: 0 auto 12px;
}
.share-sheet h3 { text-align: center; font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 10px;
  margin-bottom: 16px;
}
.share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-primary);
}
.share-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}
.sheet-cancel {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  font-weight: 700;
  color: var(--text-primary);
}

/* =================================================================
   GENERIC PAGES (explore, notifications, profile, etc.)
   ================================================================= */
.main-feed.no-snap {
  scroll-snap-type: none;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
}
@media (min-width: 900px) {
  .main-feed.no-snap { padding: 24px 32px; max-width: 900px; margin: 0 auto; }
}

/* Page header */
.page-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  margin: -16px -16px 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-header h1 {
  font-size: 18px;
  font-weight: 800;
  flex: 1;
}
.page-header .back-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.page-header .back-btn:hover { background: var(--bg-tertiary); }

/* Tabs (generic) */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: -16px -16px 16px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1;
  min-width: max-content;
  text-align: center;
  padding: 14px 14px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 14px;
  position: relative;
}
.tab.active { color: #fff; }
.tab.active::after {
  content: "";
  position: absolute;
  left: 20%; right: 20%;
  bottom: 0;
  height: 3px;
  background: var(--tt-pink);
  border-radius: 2px;
}

/* =================================================================
   CLASSIC POST CARD (used on non-feed pages: profile, bookmarks, post detail)
   ================================================================= */
.post {
  display: flex;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}
.post:hover { background: var(--bg-secondary); }
.post-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-body { flex: 1; min-width: 0; }
.post-header { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; flex-wrap: wrap; }
.post-author { font-weight: 800; color: var(--text-primary); font-size: 14px; }
.post-handle, .post-time, .post-dot { color: var(--text-tertiary); font-size: 13px; }
.post-menu { margin-inline-start: auto; width: 28px; height: 28px; border-radius: 50%; color: var(--text-tertiary); display: flex; align-items: center; justify-content: center; }
.post-menu:hover { background: var(--bg-tertiary); color: var(--tt-pink); }
.post-content { font-size: 14px; line-height: 1.55; color: var(--text-primary); word-break: break-word; margin-bottom: 8px; }
.post-content .mention, .post-content .hashtag { color: var(--tt-cyan); font-weight: 700; }

.post-media {
  display: grid;
  gap: 4px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
  max-height: 420px;
}
.post-media.media-1 { grid-template-columns: 1fr; }
.post-media.media-2 { grid-template-columns: 1fr 1fr; }
.post-media.media-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.post-media.media-3 .media-item:first-child { grid-row: span 2; }
.post-media.media-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.post-media .media-item { position: relative; min-height: 120px; max-height: 420px; background: var(--bg-tertiary); overflow: hidden; }
.post-media .media-item img, .post-media .media-item video { width: 100%; height: 100%; object-fit: cover; }

.video-play-btn {
  position: absolute;
  inset: 0; margin: auto;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  pointer-events: none;
}
.video-duration {
  position: absolute; bottom: 8px; inset-inline-end: 8px;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(0,0,0,0.65); color: #fff;
  font-size: 11px; font-weight: 700;
}
.video-views, .video-overlay-actions { display: none; }

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 460px;
  margin-top: 6px;
}
.post-action {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 600;
  padding: 4px;
}
.post-action-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background var(--transition), color var(--transition);
}
.post-action:hover .post-action-icon { background: rgba(254,44,85,0.12); color: var(--tt-pink); }
.post-action.like.active { color: var(--tt-pink); }
.post-action.like.active .post-action-icon { color: var(--tt-pink); }
.post-action.repost.active { color: var(--success); }
.post-action.bookmark.active { color: #ffd60a; }

/* Quoted post (classic) */
.quoted-post {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background var(--transition);
}
.quoted-post:hover { background: var(--bg-tertiary); }
.quoted-post-header { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 4px; }
.quoted-post-header img { width: 22px; height: 22px; border-radius: 50%; }
.quoted-post-content { font-size: 14px; line-height: 1.5; }

/* Poll (classic) */
.poll { margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.poll-option {
  position: relative;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: start;
  overflow: hidden;
  width: 100%;
  background: transparent;
}
.poll-option:not(.voted):hover { background: rgba(254,44,85,0.1); border-color: var(--tt-pink); }
.poll-option.voted { cursor: default; border-color: transparent; background: var(--bg-tertiary); }
.poll-option .poll-bar {
  position: absolute;
  inset-inline-start: 0;
  top: 0; bottom: 0;
  background: rgba(254,44,85,0.3);
  z-index: 0;
}
.poll-option .poll-text { position: relative; z-index: 1; display: flex; justify-content: space-between; }
.poll-meta { font-size: 12px; color: var(--text-tertiary); }

/* Repost indicator (classic) */
.post-repost-indicator {
  color: var(--text-tertiary);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  margin-inline-start: 54px;
}

.reply-to {
  color: var(--text-tertiary);
  font-size: 12px;
  margin-bottom: 4px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}
.empty-state i { font-size: 48px; margin-bottom: 14px; color: var(--text-muted); display: block; }
.empty-state h3 { font-size: 18px; color: var(--text-primary); margin-bottom: 6px; }
.empty-state p { font-size: 14px; margin-bottom: 18px; }

/* Empty state centered fullscreen (home feed) */
.tt-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  text-align: center;
  padding: 20px;
}
.tt-empty i { font-size: 60px; color: rgba(255,255,255,0.3); }
.tt-empty h3 { font-size: 20px; font-weight: 800; }
.tt-empty p { font-size: 14px; color: rgba(255,255,255,0.7); max-width: 300px; }
.tt-empty .btn-primary { margin-top: 10px; }

/* Widgets (right side not shown in TikTok; used in explore) */
.widget {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.widget-header { font-weight: 800; font-size: 16px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.widget-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.widget-item:hover { background: var(--bg-tertiary); }
.trend-category { font-size: 11px; color: var(--text-tertiary); }
.trend-title { font-size: 14px; font-weight: 700; margin-top: 2px; }
.trend-count { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.widget-more { display: block; padding: 12px 14px; color: var(--tt-pink); font-weight: 700; font-size: 13px; }

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.suggestion-item img { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; object-fit: cover; }
.suggestion-info { flex: 1; min-width: 0; cursor: pointer; }
.suggestion-info h4 { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.suggestion-info span { font-size: 12px; color: var(--text-tertiary); }

/* Right sidebar (hidden globally; use widgets on explore pages) */
.right-sidebar { display: none !important; }

/* =================================================================
   AUTH PAGES (login / register)
   ================================================================= */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #000 0%, #161616 50%, #2a0a18 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
body.auth-body { overflow: auto; }
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--tt-pink);
}
.auth-logo span { color: var(--text-primary); }
.auth-subtitle { text-align: center; color: var(--text-tertiary); font-size: 13px; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form input, .auth-form select {
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: 13px 14px;
  font-size: 14px;
  color: var(--text-primary);
  width: 100%;
}
.auth-form input::placeholder { color: var(--text-tertiary); }
.auth-form .btn-primary { padding: 13px; font-size: 15px; width: 100%; }
.auth-footer { text-align: center; font-size: 13px; color: var(--text-tertiary); margin-top: 18px; }
.auth-footer a { color: var(--tt-pink); font-weight: 700; }
.auth-error { color: #fff; font-size: 13px; text-align: center; padding: 10px; background: rgba(255,59,48,0.5); border-radius: var(--radius); }
.auth-success { color: var(--text-primary); font-size: 13px; text-align: center; padding: 10px; background: rgba(37,244,238,0.2); border-radius: var(--radius); }

/* =================================================================
   PROFILE PAGE
   ================================================================= */
.profile-cover {
  width: 100%;
  aspect-ratio: 3/1;
  max-height: 220px;
  background: linear-gradient(135deg, #1a1a1a, #2a0a18);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  margin-bottom: -50px;
}
.profile-header {
  padding: 0 8px 16px;
}
.profile-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  object-fit: cover;
  background: var(--bg-tertiary);
  margin-bottom: 10px;
}
.profile-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: -110px; margin-bottom: 60px; }
.profile-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.profile-username { color: var(--text-tertiary); font-size: 14px; margin-bottom: 10px; }
.profile-bio { font-size: 14px; line-height: 1.5; margin-bottom: 10px; color: var(--text-primary); }
.profile-meta { display: flex; gap: 14px; color: var(--text-tertiary); font-size: 13px; margin-bottom: 10px; flex-wrap: wrap; }
.profile-stats { display: flex; gap: 20px; font-size: 13px; }
.profile-stats strong { color: var(--text-primary); font-weight: 800; }

/* Grid of videos on profile */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 10px;
}
.video-grid-item {
  position: relative;
  aspect-ratio: 9/16;
  background: var(--bg-tertiary);
  overflow: hidden;
  cursor: pointer;
}
.video-grid-item img, .video-grid-item video { width: 100%; height: 100%; object-fit: cover; }
.video-grid-item .play-icon {
  position: absolute;
  bottom: 6px; inset-inline-start: 6px;
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
.video-grid-item .views {
  position: absolute;
  bottom: 6px; inset-inline-end: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

/* =================================================================
   TOASTS
   ================================================================= */
.toasts, .toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}
.toast {
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  animation: toast-in 0.25s ease;
  pointer-events: auto;
  border: 1px solid var(--border);
}
.toast.success { background: rgba(37,244,238,0.95); color: #000; border-color: transparent; }
.toast.error { background: var(--danger); border-color: transparent; }
@keyframes toast-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* =================================================================
   SEARCH WIDGET
   ================================================================= */
.search-widget {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-primary);
  padding: 12px 0;
  margin-bottom: 10px;
}
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-wrapper i {
  position: absolute;
  inset-inline-start: 14px;
  color: var(--text-tertiary);
  font-size: 14px;
}
.search-input {
  width: 100%;
  padding: 12px 14px;
  padding-inline-start: 40px;
  background: var(--bg-tertiary);
  border-radius: 100px;
  font-size: 14px;
  color: var(--text-primary);
}
.search-input::placeholder { color: var(--text-tertiary); }

/* =================================================================
   LIGHTBOX (image preview)
   ================================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .close {
  position: absolute;
  top: 20px; inset-inline-end: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* =================================================================
   MESSAGES
   ================================================================= */
.msg-layout { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - var(--bottom-nav-height)); gap: 0; }
.msg-list { border-inline-end: 1px solid var(--border); overflow-y: auto; }
.msg-thread { display: flex; flex-direction: column; height: 100%; }
.msg-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.msg-item:hover { background: var(--bg-secondary); }
.msg-item img { width: 44px; height: 44px; border-radius: 50%; }
.msg-item .body { flex: 1; min-width: 0; }
.msg-item .body h4 { font-size: 14px; font-weight: 700; }
.msg-item .body p { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 899px) {
  .msg-layout { grid-template-columns: 1fr; height: calc(100dvh - var(--bottom-nav-height)); }
}

/* Sensitive overlay */
.sensitive-overlay {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  text-align: center;
  padding: 20px;
}
.sensitive-overlay button {
  background: #fff; color: #000;
  padding: 8px 18px; border-radius: 20px;
  font-weight: 700;
}

/* Verified badge styles */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  flex-shrink: 0;
}
.verified-badge.blue { background: #1d9bf0; }
.verified-badge.gold { background: #e7a33e; }
.verified-badge.gray { background: #829aab; }
.verified-badge.business { background: #00ba7c; }

/* =================================================================
   FLOATING BUTTONS
   ================================================================= */
.floating-compose-btn { display: none; }

/* Stories — hidden in TikTok home layout only */
body.tt-feed-page .stories-bar,
body.tt-feed-page .feed-header,
body.tt-feed-page .feed-tabs { display: none; }

/* =================================================================
   NOTIFICATIONS / LISTS / SETTINGS
   ================================================================= */
.notif-item, .list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.notif-item img, .list-item img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.notif-item .body, .list-item .body { flex: 1; min-width: 0; }
.notif-item .body p { font-size: 14px; color: var(--text-primary); }
.notif-item .body .time { font-size: 12px; color: var(--text-tertiary); }

.settings-section { margin-bottom: 20px; padding: 14px; background: var(--bg-secondary); border-radius: var(--radius); }
.settings-section h2 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.settings-section label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; margin-top: 10px; }
.settings-section input, .settings-section select, .settings-section textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
}
.settings-section textarea { min-height: 80px; resize: vertical; }

/* =================================================================
   UTILS
   ================================================================= */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* =================================================================
   ========= GUEST / AUTH UI — TikTok-style =========================
   ================================================================= */

/* Top-right login pill for guests on feed page */
.guest-top-cta {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  inset-inline-end: 16px;
  z-index: 60;
}
.guest-login-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--tt-pink);
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(254, 44, 85, 0.4);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.guest-login-pill:hover { filter: brightness(1.1); transform: translateY(-1px); }
.guest-login-pill:active { transform: scale(0.95); }

/* Sidebar guest block */
.sidebar-guest {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  text-align: center;
}
.sidebar-guest p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}
.sidebar-guest .btn-primary {
  display: block;
  width: 100%;
  padding: 11px;
  margin-bottom: 8px;
}
.sidebar-register-link {
  display: block;
  font-size: 13px;
  color: var(--tt-cyan);
  font-weight: 600;
  padding: 8px;
}

/* ========================================
   AUTH SHEET (shown when guest tries action)
   ======================================== */
.auth-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #1c1c1e;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  z-index: 200;
  padding: 28px 24px 32px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  text-align: center;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0));
}
.auth-sheet.active { transform: translateY(0); }

@media (min-width: 700px) {
  .auth-sheet {
    left: 50%;
    right: auto;
    bottom: 50%;
    transform: translate(50%, 50%) scale(0.92);
    width: 420px;
    border-radius: 16px;
    padding: 36px 30px;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.25s ease;
  }
  .auth-sheet.active {
    transform: translate(50%, 50%) scale(1);
    opacity: 1;
  }
}

.auth-sheet-close {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}
.auth-sheet-logo {
  margin: 0 auto 16px;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fe2c55, #25f4ee);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(254, 44, 85, 0.3);
}
.auth-sheet-title {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}
.auth-sheet-sub {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}
.auth-sheet-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-sheet-btns .btn-primary {
  background: var(--tt-pink);
  color: #fff;
  padding: 13px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 6px;
  text-align: center;
}
.auth-sheet-btns .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 13px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 6px;
  text-align: center;
}

.comments-guest-cta {
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.comments-guest-cta .btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--tt-pink);
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
}

/* =================================================================
   ============== COMMENTS DRAWER — Professional TikTok =============
   ================================================================= */
.comments-drawer .sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  margin: 8px auto 4px;
}
.comments-drawer .comments-head {
  padding: 12px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.comments-drawer .comments-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  flex: 1;
}
.comments-drawer .comments-close {
  position: absolute;
  inset-inline-end: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border: none;
  cursor: pointer;
}
.comments-drawer .comments-close:hover { background: rgba(255,255,255,0.08); }

.comments-body { padding: 10px 0; }

/* Comment item */
.comment-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  align-items: flex-start;
}
.comment-avatar-link { flex-shrink: 0; }
.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  display: block;
}
.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-author {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 4px;
}
.comment-author a {
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.comment-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
  margin-bottom: 6px;
}
.comment-text a { color: var(--tt-cyan); }
.comment-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.comment-time { color: var(--text-tertiary); }
.comment-reply-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.comment-reply-btn:hover { color: var(--text-primary); }

.comment-like {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  min-width: 32px;
  transition: transform 0.15s ease;
}
.comment-like:active { transform: scale(0.85); }
.comment-like svg {
  width: 20px;
  height: 20px;
  display: block;
  transition: transform 0.2s ease;
}
.comment-like.liked svg { animation: tt-pop 0.4s ease; }
.comment-like .count {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 600;
}
.comment-like.liked .count { color: var(--tt-pink); }

/* Empty state */
.comments-empty {
  padding: 50px 24px;
  text-align: center;
  color: var(--text-tertiary);
}
.comments-empty .empty-icon {
  margin: 0 auto 16px;
  width: 64px;
  height: 64px;
  opacity: 0.4;
}
.comments-empty h4 {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.comments-empty p { font-size: 13px; }

/* Comment input bar */
.comments-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-secondary);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
}
.comment-input-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  flex-shrink: 0;
}
.comments-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.comments-input input:focus { background: rgba(255, 255, 255, 0.12); }
.comments-input button {
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}
.comments-input button:not(:disabled) { color: var(--tt-pink); }
.comments-input button:not(:disabled):hover { background: rgba(254, 44, 85, 0.1); }
.comments-input button:disabled { cursor: not-allowed; opacity: 0.5; }

/* =================================================================
   ========= MORE SHEET (bottom sheet for post menu) ================
   ================================================================= */
.more-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #1c1c1e;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  z-index: 200;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.more-sheet.active { transform: translateY(0); }
@media (min-width: 700px) {
  .more-sheet { left: 50%; right: auto; transform: translate(50%, 100%); width: 420px; border-radius: 16px; bottom: 20px; }
  .more-sheet.active { transform: translate(50%, 0); }
}

.more-sheet .sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  margin: 8px auto 16px;
}
.more-items {
  padding: 0 8px;
}
.more-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 14px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  text-align: start;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.more-item:hover { background: rgba(255, 255, 255, 0.06); }
.more-item:active { background: rgba(255, 255, 255, 0.1); }
.more-item.danger .more-label { color: #fe2c55; }

.more-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 17px;
}
.more-label {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
}
.more-chevron {
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
}

.sheet-cancel {
  display: block;
  width: calc(100% - 24px);
  margin: 12px 12px 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  transition: background 0.15s ease;
}
.sheet-cancel:hover { background: rgba(255, 255, 255, 0.14); }

/* =================================================================
   ========= SHARE SHEET — refined =========
   ================================================================= */
.share-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #1c1c1e;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  z-index: 200;
  padding: 8px 16px env(safe-area-inset-bottom, 16px);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.share-sheet.active { transform: translateY(0); }
@media (min-width: 700px) {
  .share-sheet { left: 50%; right: auto; transform: translate(50%, 100%); width: 440px; border-radius: 16px; bottom: 20px; }
  .share-sheet.active { transform: translate(50%, 0); }
}
.share-sheet .sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  margin: 8px auto 14px;
}
.share-sheet h3 {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
}
.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 14px 8px;
  margin-bottom: 8px;
}
.share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: transform 0.15s ease;
}
.share-item:active { transform: scale(0.92); }
.share-item .share-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
.share-item:hover .share-icon { transform: translateY(-2px); }
.share-item span {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

/* =================================================================
   ========= CONFIRM DIALOG =========
   ================================================================= */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.confirm-overlay.show { opacity: 1; }
.confirm-dialog {
  background: #1c1c1e;
  border-radius: 14px;
  padding: 22px 22px 18px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.confirm-overlay.show .confirm-dialog { transform: scale(1); }
.confirm-dialog h3 {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.confirm-dialog p {
  color: #aaa;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.confirm-actions button {
  padding: 11px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s ease;
}
.confirm-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.confirm-cancel:hover { background: rgba(255, 255, 255, 0.14); }
.confirm-ok {
  background: var(--tt-cyan);
  color: #000;
}
.confirm-ok.danger {
  background: #ef4444;
  color: #fff;
}
.confirm-ok:hover { filter: brightness(1.08); }

/* =================================================================
   ========= REPORT SHEET =========
   ================================================================= */
.report-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 250;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.report-sheet-overlay.show { opacity: 1; }
.report-sheet {
  background: #1c1c1e;
  width: 100%;
  max-width: 500px;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  padding: 8px 16px env(safe-area-inset-bottom, 16px);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.report-sheet-overlay.show .report-sheet { transform: translateY(0); }
@media (min-width: 700px) {
  .report-sheet-overlay { align-items: center; }
  .report-sheet { border-radius: 16px; max-width: 420px; transform: translateY(24px) scale(0.95); opacity: 0; }
  .report-sheet-overlay.show .report-sheet { transform: translateY(0) scale(1); opacity: 1; }
}
.report-sheet .sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  margin: 8px auto 14px;
}
.report-sheet h3 {
  text-align: center;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}
.report-sub {
  text-align: center;
  color: #999;
  font-size: 13px;
  margin-bottom: 16px;
}
.report-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}
.report-reason {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  padding: 14px 12px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  text-align: start;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.report-reason:hover { background: rgba(255, 255, 255, 0.06); }
.report-reason i { color: rgba(255, 255, 255, 0.3); font-size: 12px; }


/* ================================================================
   DISCOVER PANEL (desktop sidebar right on home page)
   ================================================================ */
.tt-discover-panel {
  display: none;
  position: fixed;
  top: 20px;
  inset-inline-end: 20px;
  width: 320px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  z-index: 20;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.tt-discover-panel::-webkit-scrollbar { width: 4px; }
.tt-discover-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

@media (min-width: 1280px) {
  .tt-discover-panel { display: block; }
}

.tt-discover-card {
  background: linear-gradient(135deg, rgba(28, 28, 36, 0.88), rgba(16, 16, 22, 0.92));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.tt-discover-card::before {
  content: '';
  position: absolute;
  top: -40px;
  inset-inline-end: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(254, 44, 85, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.tt-discover-card > * { position: relative; z-index: 1; }

.tt-discover-card h4 {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}

.tt-discover-card h4 i {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #fe2c55, #ff5778);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(254, 44, 85, 0.35);
}

.tt-trending-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tt-trending-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.15s ease, transform 0.15s ease;
  color: #fff;
}

.tt-trending-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(-2px);
}

[dir="rtl"] .tt-trending-item:hover { transform: translateX(2px); }

.tt-trending-rank {
  width: 28px;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, #fe2c55, #ff5778);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tt-trending-info { flex: 1; min-width: 0; }
.tt-trending-info strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}
.tt-trending-info span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.tt-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tt-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tt-suggest-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: #fff;
}

.tt-suggest-link img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.tt-suggest-link:hover img { border-color: rgba(254, 44, 85, 0.5); }

.tt-suggest-link > div { flex: 1; min-width: 0; line-height: 1.2; }
.tt-suggest-link strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tt-suggest-link span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.tt-suggest-follow {
  padding: 6px 16px;
  background: linear-gradient(135deg, #fe2c55, #c7184a);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(254, 44, 85, 0.3);
}

.tt-suggest-follow:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(254, 44, 85, 0.5);
}

.tt-suggest-follow.following {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

.tt-discover-footer {
  text-align: center;
  padding: 10px;
}

.tt-discover-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.tt-discover-footer a:hover { color: #25f4ee; }

/* Adjust feed width when discover is visible */
@media (min-width: 1280px) {
  .tt-feed-page .main-feed { padding-inline-end: 360px; }
}
