* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

:root {
  --primary-color: #030303;
  --secondary-color: #606060;
  --hover-color: #f2f2f2;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
  background-color: #f9f9f9;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  height: 56px;
  z-index: 100;
  box-shadow: 0 2px 5px var(--shadow-color);
}

.header__left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header__menu {
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.header__menu:hover {
  background-color: var(--hover-color);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__logo-img {
  width: 90px;
}

/* Search Bar */
.header__search {
  display: flex;
  flex: 0 1 728px;
  margin: 0 2rem;
}

.search-bar {
  flex: 1;
  display: flex;
  margin: 0 auto;
  max-width: 600px;
}

.search-input {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 2px 0 0 2px;
  font-size: 1rem;
}

.search-btn {
  border: 1px solid #ccc;
  background-color: #f8f8f8;
  padding: 0 1.5rem;
  border-radius: 0 2px 2px 0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-btn:hover {
  background-color: #f0f0f0;
}

.header__icons {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.header__icon {
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.header__icon:hover {
  background-color: var(--hover-color);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  height: calc(100vh - 56px);
  width: 240px;
  background-color: white;
  padding: 0.5rem 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
  box-shadow: 2px 0 5px var(--shadow-color);
}

.sidebar.collapsed {
  width: 72px;
}

.sidebar__section {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f2f2f2;
}

.sidebar__item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  gap: 1.5rem;
  transition: background-color 0.3s;
}

.sidebar__item:hover {
  background-color: var(--hover-color);
}

.sidebar__item.active {
  background-color: var(--hover-color);
  font-weight: 500;
}

/* Main Content */
.main {
  margin-left: 240px;
  margin-top: 56px;
  padding: 1.5rem;
  transition: margin-left 0.3s ease;
}

.main.expanded {
  margin-left: 72px;
}

/* Category Pills */
.categories {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar */
}

.categories::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome */
}

.category {
  background-color: #f2f2f2;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s;
}

.category.active {
  background-color: var(--primary-color);
  color: white;
}

/* Video Grid */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem 1rem;
  padding: 1.5rem 0;
}

.video-card {
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s; /* Add transition for hover effect */
}

.video-card:hover {
  transform: scale(1.02); /* Slightly scale up on hover */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Add shadow effect */
}

.thumbnail {
  position: relative;
  width: 100%;
}

.thumbnail img {
  width: 100%;
  border-radius: 12px;
}

.video-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.video-info {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-image: url('./images/avatar\ copy.png'); /* Ensure the path is correct */
  background-size: cover; /* Ensure the image covers the entire area */
  background-position: center; /* Center the image */
  background-repeat: no-repeat; /* Prevent the image from repeating */
}

.video-details {
  flex: 1;
}

.video-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.channel-name,
.video-stats {
  color: var(--secondary-color);
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .videos {
      grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 960px) {
  .videos {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header__search {
      display: none;
  }

  .sidebar {
      transform: translateX(-100%);
  }

  .sidebar.show {
      transform: translateX(0);
  }

  .main {
      margin-left: 0;
  }

  .main.expanded {
      margin-left: 0;
  }
}

@media (max-width: 480px) {
  .videos {
      grid-template-columns: 1fr;
  }

  .header__left {
      gap: 1rem;
  }

  .header__icons {
      gap: 1rem;
  }
}