/* Modern YouTube-like CSS */
:root {
  --primary: #ff0000;
  --text-primary: #0f0f0f;
  --text-secondary: #606060;
  --background: #ffffff;
  --surface: #f9f9f9;
  --border: #e5e5e5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

body {
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.5;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--background);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

.logo a {
    text-decoration: none;
    color: var(--praimary);
}
.search-bar {
  display: flex;
  align-items: center;
}

.search-bar input {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  width: 100%;
  max-width: 400px;
}

/* Main Content */
.main-content {
  padding: 1rem;
  max-width: 1600px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1rem 0;
  display: flex;
  align-items: center;
}

.section-title .icon {
  color: var(--primary);
  margin-right: 0.5rem;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.video-card {
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.2s;
}

.video-card:hover {
  transform: translateY(-4px);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #000;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.video-thumbnail:hover img {
  opacity: 0.9;
}

.duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.video-info {
  padding: 0.75rem 0.25rem;
}

.video-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Shorts Section */
.shorts-container {
  margin: 2rem 0;
}

.shorts-grid {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 0.5rem 0;
  scrollbar-width: none;
}

.shorts-grid::-webkit-scrollbar {
  display: none;
}

.short-card {
  flex: 0 0 120px;
  cursor: pointer;
}

.short-thumbnail {
  position: relative;
  width: 120px;
  height: 210px;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #000;
}

.short-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.short-info {
  padding: 0.5rem 0;
}

.short-title {
  font-size: 0.875rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.short-views {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Watch Page */
.video-player-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.video-player {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 0.5rem;
  overflow: hidden;
}

.video-info-container {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.video-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.video-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.video-description {
  font-size: 0.9375rem;
  line-height: 1.6;
  white-space: pre-line;
  padding: 1rem 0;
}

/* Related Videos */
.related-videos {
  padding: 1rem;
}

.related-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.related-video {
  display: flex;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.related-thumbnail {
  width: 160px;
  height: 90px;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.related-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-info {
  flex: 1;
}

.related-video-title {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-stats {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Shorts Viewer */
.shorts-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #000;
  z-index: 1000;
  display: none;
}

.short-video-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.short-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.short-actions {
  position: absolute;
  right: 1rem;
  bottom: 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  cursor: pointer;
}

.action-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.action-label {
  font-size: 0.875rem;
}

.close-shorts {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: white;
  font-size: 1.5rem;
  z-index: 1001;
  cursor: pointer;
}
.related-videos img {
    width: 300px;
}
/* Responsive */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  
  .header {
    padding: 5px;
  }
  
  .logo {
    font-size: 1.25rem;
  }
  
  .search-bar input {
    max-width: 200px;
  }
}