/* Vertical Video Scroll - TikTok/Reels-style vertical scrolling video feed
 * Implements snap-scrolling, full-screen video containers, smooth scrolling,
 * touch gestures, video positioning, and mobile-optimized scroll behavior
 *END_DESCRIPTION
 */

/* TikTok/Reels-style Vertical Video Scrolling */

.mobile-video-app {
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: #000;
}

.video-scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  /* Allow video elements to be touchable */
  touch-action: pan-y;
  position: relative; /* Required for virtual scrolling absolute positioning */
}

.video-scroll-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.video-slide {
  min-height: 100vh;
  width: 100vw;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  background: var(--mobile-bg);
  padding-top: 80px; /* Account for header height */
}

.video-player {
  position: relative;
  width: 100%;
  height: 60vh; /* Fixed height for video */
  z-index: 1;
  flex-shrink: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 60vh;
  background: #000;
  /* Ensure video is clickable on mobile */
  touch-action: manipulation;
  pointer-events: auto;
  z-index: 10;
  position: relative;
}

.video-element iframe {
  width: 100%;
  height: 100%;
  border: none;
  touch-action: manipulation;
  pointer-events: auto;
  z-index: 10;
}

/* Mobile Header */
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
  padding: env(safe-area-inset-top, 20px) 16px 16px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.nav-tab {
  padding: 8px 16px;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.nav-tab.active {
  color: #000;
}

.nav-tab.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Override any conflicting search-btn styles - use header-item styling instead */
.search-btn {
  /* Reset any absolute positioning */
  position: static !important;
  /* Remove any circular background styling */
  background: none !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  /* Remove any transform positioning */
  transform: none !important;
  top: auto !important;
  right: auto !important;
  /* Remove backdrop filters */
  backdrop-filter: none !important;
}

.search-btn:hover {
  background: none !important;
  transform: scale(1.05) !important;
}

.video-actions-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.video-actions-overlay > * {
  pointer-events: auto;
}

/* Right Side Actions */
.actions-right {
  position: absolute;
  right: 12px;
  bottom: 140px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.action-btn {
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  position: relative;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

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

.action-btn.clicked {
  animation: actionBtnClick 0.3s ease;
}

@keyframes actionBtnClick {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.action-btn svg {
  width: 28px;
  height: 28px;
  margin-bottom: 2px;
}

.action-count {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  min-height: 14px;
}

.like-action-btn.active {
  color: white;
}

.like-action-btn.active svg {
  fill: currentColor;
}

.dislike-action-btn.active {
  background: rgba(128, 128, 128, 0.8);
  color: white;
}

.dislike-action-btn.active svg {
  fill: currentColor;
}

.action-btn.hovered {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* Bottom Info */
.video-info-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 80px;
  padding: 20px;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
  color: white;
  pointer-events: none;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-description {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.video-tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.video-trend-score {
  margin: 8px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.trend-label {
  color: rgba(255, 255, 255, 0.6);
}

.trend-value {
  color: #4dabf7;
  font-weight: 600;
}

.video-additional-info {
  margin-top: 8px;
}

.info-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-right: 8px;
  margin-bottom: 4px;
  display: inline-block;
}

.info-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
}

/* Loading States */
.video-slide.loading {
  background: #000;
}

.video-slide.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 20;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* No Videos State */
.no-videos {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: white;
  background: #000;
}

.no-videos h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: white;
}

.no-videos p {
  font-size: 16px;
  opacity: 0.8;
  margin-bottom: 24px;
  line-height: 1.5;
  max-width: 300px;
}

.clear-filters-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.clear-filters-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* TRW Auth Required */
.trw-auth-required {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #000;
}

.auth-message-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  max-width: 400px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-message-card h2 {
  color: white;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
}

.auth-message-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.connect-trw-btn {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 14px 28px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.connect-trw-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  text-decoration: none;
  color: white;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .actions-right {
    right: 8px;
    bottom: 120px;
  }
  
  .action-btn {
    width: 48px;
    height: 48px;
  }
  
  .action-btn svg {
    width: 24px;
    height: 24px;
  }
  
  .video-info-bottom {
    right: 64px;
    padding: 16px;
  }
  
  .video-title {
    font-size: 14px;
  }
  
  .video-description {
    font-size: 13px;
  }
}

/* Comments Panel */
.comments-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px 20px 0 0;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.comments-panel.open {
  transform: translateY(0);
}

.comments-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.comments-panel-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.comments-panel-title {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.comments-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.comments-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.comments-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 20px 20px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.comment-item {
  display: flex;
  gap: 12px;
  color: white;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
}

.comment-author {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.comment-text {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.comment-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.comments-form {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.8);
  flex-shrink: 0;
}

.comment-input-container {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.comment-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 10px 16px;
  color: white;
  font-size: 14px;
  resize: none;
  max-height: 80px;
  min-height: 40px;
}

.comment-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.comment-submit-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 20px;
  color: white;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 40px;
}

.comment-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.comment-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.no-comments {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.no-comments-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Transcript Panel */
.transcript-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px 20px 0 0;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.transcript-panel.open {
  transform: translateY(0);
}

.transcript-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.transcript-panel-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.transcript-panel-title {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.transcript-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.transcript-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.transcript-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  color: white;
  line-height: 1.6;
  font-size: 16px;
}

.transcript-text {
  white-space: pre-wrap;
}

/* Categories Panel */
.categories-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px 20px 0 0;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.categories-panel.open {
  transform: translateY(0);
}

.categories-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.categories-panel-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.categories-panel-title {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.categories-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.categories-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.categories-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.categories-section {
  margin-bottom: 30px;
}

.categories-section h4 {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.current-categories,
.available-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.category-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

.category-add {
  font-size: 16px;
  font-weight: bold;
}

.new-category-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.new-category-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 10px 16px;
  color: white;
  font-size: 14px;
}

.new-category-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.add-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 20px;
  color: white;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Settings Panel */
.settings-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 85vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px 20px 0 0;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.settings-panel.open {
  transform: translateY(0);
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.settings-panel-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.settings-panel-title {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.settings-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.settings-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.settings-section {
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.settings-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.settings-section h4 {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}

.tag-selector {
  position: relative;
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.tag-display {
  flex: 1;
  padding: 12px 16px;
  color: white;
  cursor: pointer;
  min-height: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tag-display .placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.tag-selector-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-selector-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.tag-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tag-search {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: white;
  font-size: 14px;
}

.tag-search::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.tag-option {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: white;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.tag-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.selected-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.remove-tag {
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
}

.filter-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.apply-filters-btn,
.clear-filters-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.apply-filters-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.apply-filters-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.clear-filters-btn {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.clear-filters-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.setting-item {
  margin-bottom: 16px;
}

.setting-item label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

.setting-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #667eea;
}

/* Tag Filter Specific Styles */
.filter-tags-display {
  min-height: 40px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}

.filter-tags-display:empty::before {
  content: 'No tags selected';
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.tag-search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  margin-bottom: 16px;
}

.tag-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 8px 0;
}

.tag-filter-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tag-filter-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.tag-filter-btn.include {
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
  border-color: #4caf50;
  color: white;
}

.tag-filter-btn.exclude {
  background: linear-gradient(135deg, #f44336 0%, #ef5350 100%);
  border-color: #f44336;
  color: white;
}

.filter-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-tag.include-tag {
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
}

.filter-tag.exclude-tag {
  background: linear-gradient(135deg, #f44336 0%, #ef5350 100%);
}

/* Category Tag Styles for Mini Display */
.category-tag-mini {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px;
}

.remove-category-mini-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remove-category-mini-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.no-categories-mini {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  font-size: 14px;
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .video-scroll-container {
    -webkit-overflow-scrolling: touch;
  }
  
  .mobile-header {
    padding-top: max(env(safe-area-inset-top), 20px);
  }
  
  .comments-content {
    -webkit-overflow-scrolling: touch;
  }
  
  .transcript-content {
    -webkit-overflow-scrolling: touch;
  }
}
