@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: #eeeeee;
}

header {
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e2e2;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;

  .header-left {
    display: flex;
    align-items: center;
    gap: 16px;

    .menu-icon {
      width: 30px;
      height: 30px;
      cursor: pointer;
    }

    .logo {
      width: 94px;
      height: 21px;
      cursor: pointer;
    }
  }

  .header-center {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    max-width: 640px;
    margin: 0 40px;

    .search-container {
      display: flex;
      flex: 1;

      input {
        width: 100%;
        height: 38px;
        padding: 0 15px;
        border: 1px solid #e1e1e1;
        border-radius: 0;
        outline: none;
        font-size: 16px;
        font-family: "Roboto", sans-serif;

        &::placeholder {
          color: #9a9a9a;
        }
      }

      .search-btn {
        width: 65px;
        height: 38px;
        background-color: #e1e1e1;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;

        img {
          width: 24px;
          height: 24px;
        }
      }
    }

    .mic-btn {
      width: 40px;
      height: 40px;
      background-color: #ebebeb;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;

      img {
        width: 24px;
        height: 24px;
      }
    }
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 24px;

    img {
      cursor: pointer;
    }

    img:not(.avatar) {
      width: 30px;
      height: 30px;
    }

    .avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
    }
  }
}

.sidebar {
  position: fixed;
  left: 0;
  top: 67px;
  width: 68px;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 21px;
  padding: 10px 0;
  height: calc(100vh - 67px);

  .sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;

    img {
      width: 24px;
      height: 24px;
    }

    span {
      font-size: 8px;
      font-weight: 400;
      line-height: 1.171875em;
      color: #000000;
    }
  }
}

main {
  margin-left: 68px;
  margin-top: 67px;
  padding: 20px;

  .categories {
    display: flex;
    gap: 19px;
    margin-bottom: 20px;

    .category-btn {
      padding: 8px 17px;
      border: 1px solid #a7a7a7;
      background-color: #eeeeee;
      border-radius: 36px;
      font-size: 14px;
      font-weight: 400;
      line-height: 1.171875em;
      color: #000000;
      font-family: "Roboto", sans-serif;
      cursor: pointer;
      transition: all 0.2s;

      &:hover {
        background-color: #e0e0e0;
      }

      &.active {
        background-color: #000000;
        color: #ffffff;
        border-color: #000000;
      }
    }
  }

  .video-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px 24px;

    .video-card {
      display: flex;
      flex-direction: column;
      gap: 7px;

      .thumbnail {
        width: 100%;
        aspect-ratio: 16/9;
        overflow: hidden;

        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }

      .video-info {
        display: flex;
        gap: 9px;

        .channel-avatar {
          width: 25px;
          height: 25px;
          border-radius: 50%;
          object-fit: cover;
          flex-shrink: 0;
        }

        .video-details {
          flex: 1;
          display: flex;
          flex-direction: column;
          gap: 6px;

          h3 {
            font-size: 14px;
            font-weight: 500;
            line-height: 1.3em;
            color: #000000;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
          }

          .channel-name {
            font-size: 12px;
            font-weight: 400;
            color: #737171;
          }

          .video-meta {
            font-size: 12px;
            font-weight: 400;
            color: #737171;
          }
        }

        .dots-menu {
          width: 24px;
          height: 24px;
          cursor: pointer;
          flex-shrink: 0;
        }
      }
    }
  }
}
