/* Video Player Page Styles */
.video-player-container {
  background: var(--darker-bg);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

/* Video Source Tabs */
.video-source-tabs {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1rem;
}

.video-source-tabs .nav-tabs {
  border-bottom: none;
  margin-bottom: 0;
}

.video-source-tabs .nav-link {
  color: var(--text-secondary);
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.3s ease;
}

.video-source-tabs .nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: none;
}

.video-source-tabs .nav-link.active {
  color: var(--primary-color);
  background: rgba(255, 71, 87, 0.1);
  border-bottom: 2px solid var(--primary-color);
}

.video-source-tabs .nav-link i {
  margin-right: 0.5rem;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

/* Responsive Video Container */
.video-responsive-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-iframe,
.video-element {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem;
}

.video-loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: #111;
  color: #fff;
  font-size: 1.2rem;
  text-align: center;
  padding: 2rem;
}

.video-controls {
  background: var(--card-bg);
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.video-controls .btn {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 1rem;
}

/* Video Info Card */
.video-info-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

.video-header {
  margin-bottom: 1.5rem;
}

.video-title {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.video-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.stat-item {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.stat-item i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.video-actions .btn {
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.video-categories {
  margin-bottom: 1.5rem;
}

.video-categories .badge {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  font-weight: 500;
}

.video-description {
  margin-bottom: 1.5rem;
}

.video-description h5 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.video-description p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

.video-tags h5 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 71, 87, 0.1);
}

.tag-link:hover {
  color: var(--secondary-color);
  background: rgba(255, 71, 87, 0.2);
  text-decoration: none;
}

/* Comments Section */
.comments-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.comments-section h5 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.add-comment {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.comment-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border: 2px solid rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.comment-avatar:hover {
  border-color: var(--primary-color);
}

.comment-avatar-placeholder:hover {
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.comments-list {
  max-height: 400px;
  overflow-y: auto;
}

.comment-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comment-author {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.comment-text {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Related Videos */
.related-videos {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.related-videos h5 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.related-videos-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-video-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.related-video-item:hover {
  background: var(--card-hover);
  transform: translateX(5px);
}

.related-video-thumbnail {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
}

.related-video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-video-item:hover .related-video-thumbnail img {
  transform: scale(1.05);
}

.related-video-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.related-video-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.related-video-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.related-video-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.related-video-title a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.related-video-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.related-video-meta small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sidebar Components */
.video-info-sidebar,
.share-options {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.video-info-sidebar h5,
.share-options h5 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item strong {
  color: var(--text-primary);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-buttons .btn {
  min-height: 44px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-radius: 8px;
}

.share-link .form-control {
  border-radius: 8px 0 0 8px;
  font-size: 0.9rem;
}

.share-link .btn {
  border-radius: 0 8px 8px 0;
  min-height: 44px;
}

/* Breadcrumb Styling */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1.5rem;
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--text-primary);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .video-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .video-stats {
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  .video-actions {
    width: 100%;
    justify-content: flex-start;
  }
  
  .related-video-item {
    padding: 0.5rem;
  }
  
  .related-video-thumbnail {
    width: 100px;
    height: 56px;
  }
  
  .video-title {
    font-size: 1.25rem;
  }
  
  .comments-section {
    padding: 1rem;
  }
  
  .video-controls {
    padding: 0.75rem;
  }
  
  .video-controls .btn {
    min-height: 48px;
    min-width: 48px;
    padding: 0.875rem;
  }
  
  .video-info-card {
    padding: 1rem;
  }
  
  .related-videos {
    padding: 1rem;
  }
  
  .video-info-sidebar,
  .share-options {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .video-player-container {
    margin-bottom: 1rem;
    border-radius: 8px;
  }
  
  .video-info-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .video-title {
    font-size: 1.1rem;
  }
  
  .video-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .video-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .video-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    padding: 1rem;
  }
  
  .related-video-item {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .related-video-thumbnail {
    width: 100%;
    height: 120px;
  }
  
  .comments-section {
    padding: 1rem;
  }
  
  .add-comment {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
  
  .comment-avatar {
    width: 40px;
    height: 40px;
  }
  
  .breadcrumb {
    font-size: 0.9rem;
  }
  
  .video-controls {
    padding: 0.5rem;
  }
  
  .video-controls .btn {
    min-height: 48px;
    min-width: 48px;
    padding: 1rem;
    font-size: 1.1rem;
  }
}

/* Fullscreen Support */
.video-player-wrapper:fullscreen {
  background: #000;
  border-radius: 0;
}

.video-player-wrapper:fullscreen .video-iframe,
.video-player-wrapper:fullscreen .video-element {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
}

/* Loading and Error States */
.video-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: var(--darker-bg);
  color: var(--text-primary);
  text-align: center;
  padding: 2rem;
}

.video-loading .spinner {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
}

.video-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: var(--darker-bg);
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem;
}

.video-error i {
  font-size: 3rem;
  color: var(--warning-color, #ffc107);
  margin-bottom: 1rem;
}

/* Custom Scrollbar for Comments */
.comments-list::-webkit-scrollbar {
  width: 6px;
}

.comments-list::-webkit-scrollbar-track {
  background: var(--darker-bg);
}

.comments-list::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
  .btn {
    min-height: 48px;
    padding: 0.875rem 1.25rem;
  }
  
  .video-controls .btn {
    min-height: 48px;
    min-width: 48px;
    padding: 1rem;
  }
  
  .form-control {
    min-height: 48px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .comment-avatar {
    min-width: 48px;
    min-height: 48px;
  }
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .video-controls {
    border-top: 2px solid var(--text-primary);
  }
  
  .info-item {
    border-bottom: 1px solid var(--text-primary);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .related-video-item:hover {
    transform: none;
  }
  
  .related-video-thumbnail img {
    transition: none;
  }
} 