/* =====================================================
   FEED VIDEO - TikTok Style Vertical Scroll Feed
   ===================================================== */

.feed-video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #000;
  z-index: 10000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feed-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1001;
  color: #fff;
}

.feed-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-close-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s ease;
}

.feed-close-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.05);
}

.feed-videos-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.feed-videos-wrapper::-webkit-scrollbar {
  width: 4px;
}

.feed-videos-wrapper::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
}

.feed-videos-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
}

.feed-videos-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.5);
}

/* Individual Video Container */
.feed-video-item {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  scroll-snap-align: start;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-video-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Video Controls Overlay */
.feed-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 15px 60px 15px;
  z-index: 500;
  pointer-events: none;
}

.feed-video-info {
  display: flex;
  align-items: flex-end;
  gap: 15px;
  margin-bottom: 15px;
  pointer-events: auto;
}

.feed-user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ddd;
  overflow: hidden;
  border: 2px solid #fff;
  flex-shrink: 0;
}

.feed-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-video-details {
  flex: 1;
  color: #fff;
}

.feed-user-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-user-name .verified-badge {
  width: 14px;
  height: 14px;
  background: #4CAF50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
}

.feed-video-title {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-location-badge {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Side Controls (Right Side) */
.feed-side-controls {
  position: absolute;
  right: 15px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 600;
}

.feed-action-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.2s ease;
  position: relative;
  backdrop-filter: blur(5px);
}

.feed-action-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.1);
}

.feed-action-btn.liked {
  background: rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
}

.feed-action-btn.liked i {
  animation: likeHeart 0.4s ease;
}

.feed-mute-btn i.fa-volume-up {
  color: #4CAF50;
}

@keyframes likeHeart {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.feed-action-count {
  font-size: 11px;
  text-align: center;
  margin-top: 4px;
  color: #fff;
  min-width: 30px;
}

/* Bottom Action Bar */
.feed-bottom-actions {
  position: absolute;
  bottom: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  gap: 10px;
  z-index: 600;
}

.feed-bottom-btn {
  flex: 1;
  padding: 10px 15px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(5px);
}

.feed-bottom-btn:hover {
  background: rgba(255,255,255,0.25);
}

.feed-bottom-btn.share-btn {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
}

.feed-bottom-btn.share-btn:hover {
  background: rgba(76, 175, 80, 0.3);
}

/* Loading Indicator */
.feed-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  padding: 30px;
  border-radius: 12px;
  color: #fff;
  text-align: center;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.feed-loading i {
  font-size: 36px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* No Videos State */
.feed-empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 600;
}

.feed-empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.feed-empty-state h2 {
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: 700;
}

.feed-empty-state p {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 30px;
}

.feed-empty-state button {
  padding: 12px 30px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.feed-empty-state button:hover {
  background: #45a049;
  transform: scale(1.05);
}

/* Comments Modal */
.feed-comments-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 80vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  animation: slideUpComments 0.3s ease;
}

@keyframes slideUpComments {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.feed-comments-header {
  padding: 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feed-comments-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.feed-comments-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.feed-comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.feed-comment-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.feed-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ddd;
  overflow: hidden;
  flex-shrink: 0;
}

.feed-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-comment-body {
  flex: 1;
}

.feed-comment-user {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.feed-comment-text {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

.feed-comment-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

.feed-comments-input {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.feed-comment-input-field {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 10px 15px;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  max-height: 80px;
}

.feed-comment-input-field:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 2px rgba(76,175,80,0.1);
}

.feed-comment-send-btn {
  background: none;
  border: none;
  color: #4CAF50;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Swipe Indicator */
.feed-swipe-indicator {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  animation: fadeInOut 3s ease infinite;
  z-index: 400;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}

/* Ranking Badge */
.feed-ranking-badge {
  position: absolute;
  top: 70px;
  right: 15px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 550;
}

.feed-ranking-badge i {
  font-size: 12px;
}

/* Notification Toast */
.feed-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(76, 175, 80, 0.9);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 2000;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translate(-50%, -100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .feed-header {
    height: 50px;
    padding: 0 15px;
  }

  .feed-title {
    font-size: 16px;
  }

  .feed-video-controls {
    height: 120px;
    padding: 0 12px 50px 12px;
  }

  .feed-video-info {
    gap: 12px;
    margin-bottom: 12px;
  }

  .feed-user-avatar {
    width: 42px;
    height: 42px;
  }

  .feed-side-controls {
    right: 12px;
    bottom: 80px;
    gap: 12px;
  }

  .feed-action-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .feed-bottom-actions {
    bottom: 10px;
    left: 10px;
    right: 10px;
    gap: 8px;
  }

  .feed-bottom-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .feed-comments-modal {
    max-height: 70vh;
  }
}

@media (max-width: 480px) {
  .feed-video-item {
    height: 100vh;
  }

  .feed-side-controls {
    right: 10px;
    bottom: 70px;
  }

  .feed-action-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .feed-action-count {
    font-size: 10px;
  }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
  .feed-comments-modal {
    background: #1a1a1a;
  }

  .feed-comments-header {
    border-bottom-color: #333;
  }

  .feed-comment-item {
    color: #e0e0e0;
  }

  .feed-comment-text {
    color: #e0e0e0;
  }

  .feed-comments-input {
    border-top-color: #333;
  }

  .feed-comment-input-field {
    background: #2a2a2a;
    border-color: #333;
    color: #e0e0e0;
  }
}
