* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  height: 100vh;
  width: 100vw;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header h1 {
  font-size: 21px;
  font-weight: 600;
}

.upload-btn {
  background: #ff0050;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 15.5px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

/* Strong & Smooth TikTok-style scrolling */
.feed {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-snap-stop: always;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;        /* Prevent elastic bounce */
  scroll-behavior: smooth;
  scrollbar-width: none;
}

/* Each video container - optimized for smooth snapping */
.video-container {
  height: 100vh;
  width: 100vw;
  scroll-snap-align: start;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;                     /* Important for stability */
}

video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Hide default video controls */
video::-webkit-media-controls {
  display: none !important;
}

/* Mute button */
.mute-btn {
  position: absolute;
  bottom: 40px;
  right: 20px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  border: 2px solid rgba(255,255,255,0.4);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 26px;
  z-index: 30;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.feed::-webkit-scrollbar {
  display: none;
}

/* Mobile-specific optimizations */
@media (max-width: 480px) {
  .header {
    height: 54px;
  }
  
  .header h1 {
    font-size: 19.5px;
  }
  
  .upload-btn {
    padding: 11px 20px;
    font-size: 16px;
  }
  
  .mute-btn {
    bottom: 35px;
    right: 18px;
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
}