
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Noto Sans", sans-serif;
}

body {
    background-color: #ffffff;
    color: #0f0f0f;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

#header-1{
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 10px;
}

#menu-toggle {
    border: none;
    background: transparent;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#menu-toggle:hover {
    background-color: #f2f2f2;
}

#header-2{
    margin: 0 auto; /*keep search center*/
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

#search-container {
  display: flex;
  height: 40px;
  border: 1px solid #d3d3d3;
  border-radius: 40px;
  overflow: hidden;
}

#search-bar {
  flex: 1;
  border: none;
  padding-left: 15px;
  outline: none;
  width: 600px;
}

#search-button {
  width: 60px;
  border: none;
  border-left: 1px solid #d3d3d3;
  background: #f8f8f8;
}


#voice-search{
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: #f2f2f2;
}

#header-3{
    display: flex;
    align-items: center;
    gap: 8px;
}

#theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 12px;
    border: 1px solid #d3d3d3;
    background-color: #f8f8f8;
    font-size: 13px;
    cursor: pointer;
}

#theme-icon {
    font-size: 14px;
}

#create-btn{
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    height: 40px;
    justify-content: center;
    height: 36px;
    padding: 0 16px 0 12px;
    border-radius: 18px;
    border: none;
    background-color: #f2f2f2;
    font-weight: 500;
    font-size: 14px;
}

#create-span{
    background-color: #f2f2f2;
}
#create{
    background-color: #f2f2f2;
}

#bell{
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

#profile{
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}



#tags{
    position: fixed;
    top: 60px; /* exactly header height */
    left: 240px; /* sidebar width */
    right: 0;
    height: 50px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow-x: auto;
    z-index: 999;
    transition: background-color 0.3s ease, color 0.3s ease;
}
#all-tag{
    background-color: black;
    color: white;
}

.tag-butt{
    border-radius: 8px;
    padding: 4px 14px 4px 12px;
    font-weight: 500;
    border: none;
    background-color: #f2f2f2;
}

aside {
    width: 240px;
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 12px 0;
    background-color: white;
    transition: background-color 0.3s ease, color 0.3s ease, width 0.25s ease;
}

.side-sec{
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.side-title {
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    color: black;
    display: block;
}

.side-butt{
    display: flex;
    align-items: center;
    gap: 20px;
    height: 40px;
    padding: 0 24px;
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    border-radius: 10px;
}
.side-butt:hover {
    background-color: #f2f2f2;
}
/*.side-butt .material-symbols-outlined {
    font-size: 22px;
}*/

.butt-text {
    margin: 0;
}

#main-screen {
    margin-left: 240px;
    margin-top: 110px;
    padding: 1px 16px;
    height: 1000px; 
    transition: background-color 0.3s ease, color 0.3s ease, margin-left 0.25s ease;
}

/* Sidebar collapsed layout */
body.sidebar-collapsed aside {
    width: 72px;
}

body.sidebar-collapsed #tags {
    left: 72px;
}

body.sidebar-collapsed #main-screen {
    margin-left: 72px;
}

body.sidebar-collapsed .side-title,
body.sidebar-collapsed .butt-text {
    display: none;
}

#videos-container-1{
    display: flex;
}

#shorts-container{
    display: flex;
}

#videos-container-2{
    display: flex;
}

/*video card*/
.videoCard {
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.thumbnail {
    position: relative;
}

.thumbnail img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.thumbnail:hover .preview {
    opacity: 1;
}

.video-details {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
}

.channel-pic img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.video-info {
    flex: 1;
}

.vid-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.channel-name,
.views-time {
    font-size: 12px;
    color: #606060;
    margin: 2px 0;
}

.more {
    font-size: 20px;
    color: #606060;
}

#videos-container-1,
#videos-container-2 {
    display: grid;
    gap: 24px;
}

#videos-container-1,
#videos-container-2 {
    display: grid;
    gap: 32px; /* slightly bigger gap */
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

#shorts-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 24px 0;
}

#shorts {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.shortCard {
    width: 260px;
    flex-shrink: 0;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #0f0f0f;
    color: #f1f1f1;
}

body.dark-mode header {
    background: #0f0f0f;
}

body.dark-mode #tags {
    background: #0f0f0f;
}

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

body.dark-mode .side-title,
body.dark-mode .butt-text,
body.dark-mode .channel-name,
body.dark-mode .views-time,
body.dark-mode .short-vid-title,
body.dark-mode .vid-title {
    color: #f1f1f1;
}

body.dark-mode .tag-butt {
    background-color: #272727;
    color: #f1f1f1;
}

body.dark-mode #all-tag {
    background-color: #f1f1f1;
    color: #0f0f0f;
}

body.dark-mode #create-btn,
body.dark-mode #voice-search,
body.dark-mode #theme-toggle {
    background-color: #272727;
    color: #f1f1f1;
    border-color: #3f3f3f;
}

body.dark-mode .more {
    color: #f1f1f1;
}

.shortThumbnail img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.short-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 8px;
}

.short-text {
    flex: 1;
}

.short-vid-title {
    font-size: 14px;
    margin: 0;
    line-height: 1.3;
}

.views-time {
    font-size: 12px;
    color: #606060;
    margin-top: 4px;
}

.more {
    font-size: 20px;
    color: #606060;
}