/* Header/Nav Bar */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 500;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 25px;
}

.logo-container img {
    cursor: pointer;
}
#menu:hover {
    background-color: #d8d7d7;
    border-radius: 50%;
}

sup {
    font-size: 10px;
    position: relative;
    top: -10px;
    left: -20px;
    color: grey;
}

/* Search Section */
.search-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-container {
    display: flex;
    align-items: center;
}

#search {
    width: 500px;
    height: 23.5px;
    border: 1px solid #ccc;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    padding: 6px 12px;
}

#search-button {
    background-color: #f7f6f6;
    border: 1px solid #ccc;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    cursor: pointer;
    padding: 6px 12px;
}

#voice-search {
    background-color: #f1f1f1;
    border-radius: 50%;
    cursor: pointer;
    padding: 6px;
}

/* User Actions */
#theme-toggle {
    border: none;
    background-color: #f1f1f1;
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
}

.dark-mode {
    background-color: #0f0f0f;
    color: white;
}

.dark-mode header,
.dark-mode aside,
.dark-mode .filter {
    background-color: #181818;
}

.dark-mode h3,
.dark-mode h4,
.dark-mode p {
    color: white;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.create-button {
    width: 85px;
    height: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    background-color: #f1f1f1;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    padding: 10px;
}

.create-button h4 {
    font-size: 15px;
    font-weight: 500;
}

.user-actions img {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.user-actions span {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 4px;
    font-size: 10px;
    position: relative;
    top: -10px;
    left: -23px;
    margin-right: -15px;
    cursor: pointer;
}

#avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* Sidebar */
aside {
    width: 200px;
    gap: 20px;
    padding: 15px;
    float: left;
    height: 85vh;
    overflow-y: auto;
}

aside section {
    border-bottom: 1px solid rgb(199, 199, 199);
    padding-bottom: 15px;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

.home, .subscriptions, .explore, .you, .more, .report {
    display: flex;
    flex-direction: column;
}

.home div, .subscriptions div, .explore div, .you div, .more div, .report div {
    display: flex;
    align-items: center;
    height: 40px;
    gap: 25px;
    cursor: pointer;
}

aside div:hover {
    background-color: #ebeaea;
    border-radius: 5px;
}

.home h4, .subscriptions h4, .explore h4, .you h4, .more h4, .report h4 {
    font-size: 15px;
    font-weight: 500;
}

.subscriptions img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
}

.report {
    padding-top: 10px;
    padding-bottom: 10px;
}

.report h4 {
    margin-bottom: 5px;
    margin-top: 5px;
}

footer {
    width: 175px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

footer a {
    color: #505050;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

footer p {
    color: #757575;
    font-size: 13px;
    margin-top: 0;
}

/* Category section */
.filter {
    display: flex;
    padding: 10px;
    gap: 15px;
    overflow-x: auto;
    position: sticky;
    top: 50px;
    margin-left: 230px;
    background-color: white;
    z-index: 1000;
}

.filter::-webkit-scrollbar {
    display: none;
}

.filter button {
    background-color: #ebe9e9;
    font-size: 15px;
    font-weight: 550;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    width: fit-content;
    height: 35px;
}

.filter button.active-filter {
    background-color: black;
    color: white;
}

/* Video Section */
main {
    margin-left: 230px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px;
    height: 76vh;
    overflow-y: auto;
}

main section {
    cursor: pointer;
    padding: 13px;
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

main section:hover {
    background-color: #ebe9e9;
}

main iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: none;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

main section div {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 12px;
  margin-top: 12px;
}

main section div h3 {
    transition: color 0.3s ease;
}

main section:hover h3 {
    color: #065fd4;
}

main section div img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ccc;
  grid-row: span 3;
}

main section div h3 {
  font-size: 15px;
  line-height: 1.3;
  margin: 0 0 6px;
  color: #0f0f0f;
}

main section div p {
  font-size: 14px;
  color: #606060;
  margin: 2px 0;
}

/* Responsive */
@media (max-width: 1100px) {
  main {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  main {
    margin-left: 0;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  main {
    grid-template-columns: 1fr;
    padding: 80px 15px 20px;
  }
}