/* ========================================================
   SCREEN 1: FEED VIDEO (TIKTOK VERTICAL SCROLL SNAP)
======================================================== */
#screen-feed {
  background: #000;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Fixed Header Bar at Top */
.feed-header {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 40;
  padding: 0 16px;
  height: 42px;
  pointer-events: auto;
}

/* Left Header Space / Live Icon (Matches TikTok UI) */
.feed-header-left {
  display: flex;
  align-items: center;
  width: 54px;
}

.feed-live-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: opacity 0.2s ease;
}

.feed-live-btn:active {
  opacity: 0.6;
}

.feed-tabs-center {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feed-tab {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.feed-tab.active {
  color: #fff;
  font-weight: 700;
}

.feed-tab.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* Compact In-App Language Switcher Pill */
.inapp-lang-pill {
  display: flex;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border-light);
  border-radius: 18px;
  padding: 2px 3px;
  z-index: 45;
}

.inapp-lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inapp-lang-btn.active {
  background: var(--gradient-tik);
  color: #fff;
  box-shadow: 0 1px 6px rgba(254, 44, 85, 0.4);
}

/* ========================================================
   VERTICAL SCROLL SNAP CONTAINER (TIKTOK STYLE)
======================================================== */
.feed-scroll-container {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

/* Individual Full-Height Video / Post Card */
.feed-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.feed-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.38) 0%, transparent 22%, transparent 60%, rgba(0,0,0,0.92) 100%);
  pointer-events: none;
}

/* Floating Hearts Layer */
.floating-hearts-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  overflow: hidden;
}

.flying-heart {
  position: absolute;
  color: var(--primary-pink);
  animation: floatUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  filter: drop-shadow(0 2px 6px rgba(254,44,85,0.7));
}

@keyframes floatUp {
  0% { transform: scale(0.3) translateY(0) rotate(0deg); opacity: 0; }
  30% { transform: scale(1.3) translateY(-40px) rotate(-15deg); opacity: 1; }
  80% { transform: scale(1) translateY(-140px) rotate(15deg); opacity: 0.8; }
  100% { transform: scale(0.8) translateY(-220px) rotate(-10deg); opacity: 0; }
}

/* Video Information Overlay Bottom Left */
.video-overlay-bottom {
  position: absolute;
  bottom: 16px;
  left: 14px;
  right: 76px;
  z-index: 30;
  pointer-events: auto;
}

.creator-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.creator-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
}

.verified-badge-mini {
  width: 14px;
  height: 14px;
  fill: var(--primary-cyan);
}

.video-caption {
  font-size: 0.76rem;
  line-height: 1.35;
  color: #f1f5f9;
  margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

.tag-item {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--primary-cyan);
}

.music-marquee {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.85);
  overflow: hidden;
  white-space: nowrap;
}

.music-icon {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Side Actions Bar */
.side-actions-bar {
  position: absolute;
  bottom: 18px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 30;
}

.author-avatar-wrap {
  position: relative;
  margin-bottom: 4px;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
}

.follow-plus-btn {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: var(--primary-pink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 6px rgba(254,44,85,0.6);
}

.follow-plus-btn.followed {
  background: var(--accent-green);
  transform: translateX(-50%) scale(0.9);
}

.action-btn-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #fff;
  cursor: pointer;
}

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

.action-circle-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.action-circle-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  transition: fill 0.2s ease;
}

.action-btn-item.liked .action-circle-icon {
  background: rgba(254, 44, 85, 0.25);
}

.action-btn-item.liked svg {
  fill: var(--primary-pink);
  filter: drop-shadow(0 0 8px rgba(254,44,85,0.8));
}

.action-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.music-disc {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #111;
  border: 6px solid #222;
  animation: spin 4s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-disc img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

/* Creator Location Badge */
.creator-loc-badge {
  font-size: 0.62rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  padding: 2px 7px;
  border-radius: 10px;
  color: #e2e8f0;
  font-weight: 600;
  margin-left: 2px;
}

/* ========================================================
   COMMENTS BOTTOM SHEET & BACKDROP (ISOLATED OVERLAY)
======================================================== */
.comments-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.comments-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.comments-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72%;
  background: rgba(15, 17, 26, 0.96);
  backdrop-filter: blur(25px);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border-top: 1px solid var(--glass-border-light);
  z-index: 85;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 14px 14px 18px 14px;
  pointer-events: none;
}

.comments-sheet.open {
  transform: translateY(0);
  pointer-events: auto;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
}

.sheet-title {
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.seeding-tag {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.58rem;
  padding: 2px 6px;
  border-radius: 12px;
}

.close-sheet-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-row {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
}

.comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-author {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-time {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: normal;
}

.comment-text {
  color: #cbd5e1;
  line-height: 1.35;
}

.comment-input-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--glass-border);
}

.comment-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 8px 14px;
  color: #fff;
  font-size: 0.72rem;
  outline: none;
}

.send-comment-btn {
  background: var(--gradient-tik);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
