*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
:root {
    --toggle-loggedIn-color: green;
    --toggle-notLoggedIn-color: red;
}
#header{
    font-size: 43px;
    padding: 1px;
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    background-color: var(--brown);

}
body{
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background-color: var(--primary-background-color);
    color: var(--primary-font-color);
}
main{
    padding-left: 70px;
    padding-top: 70px;

}
header{
display: flex;
position: fixed;
z-index: 1000;
width: 100%;
justify-content: space-between;
height: 70px;
padding: 10px;
align-items: center;
background-color: var(--brown);
}
#searchDiv{
    display: flex ;
    justify-content: start;
    width: 800px;
}
#searchBar{
    width: 900px;
    height: 40px;
    padding: 10px;
    border-radius: 5px;
    font-size: 1.2rem;
    border: none;
}
#secondNav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 440px;
    height: 70px;
    padding: 15px;
    background-color: var(--brown);

}
header img{
 width: 100%;
 height:100%;
}
.navbarLinks{
    list-style-type: none;
    text-decoration: none;
    width: 60px;
    height: 60px;
    padding: 10px;
}
.browseText{
    width: 100px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    height: 40px;
    gap: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}
.browseText p{
    font-size: 1.3rem;
    padding: 4px;
}
.browseText span{
    font-size: 1rem;
    margin: 2px 0 0 -10px;
    padding: 2px;

}
.browseText:hover{
    background-color: var(--darkerBrown);
    transition: 0.3s ease;
}
#userTagActivity {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    background-color: var(--toggle-notLoggedIn-color);
    border-radius: 50%;
}

#userTag {
    border: 2px solid var(--primary-background-color);
    width: 72px;
    min-width: 0;
    max-width: 72px;
    flex: 0 0 72px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 10px;
    border-radius: 20px;
    margin-left: 2px;
    margin-right: 10px;
    transform: translateX(-4px);
}

#userTag img {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
}

#userTag p {
    display: none;
}


/*----SIDE NAV------------------------------*/

#sideNav {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding-top: 70px;
    flex-direction: column;
    background-color: var(--darkestBrown);
    width:70px;        /* ✅ fixed width */
    height: 100vh;       /* ✅ full height */
}

#sideNav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}


#sideNav ul li a {
    display: block;
    padding: 26px 20px;
    color: var(--primary-font-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.4s all;
}

#sideNav ul li img {
    width: 100%;
}

#sideNav ul li a:hover {
    background-color: var(--darkerBrown);
}

.hor_line {
    width: 70px;
    height: 3px;
    background-color: var(--primary-background-color);
}
/*-----------------------*/

#mainContainer{
    padding: 20px;
}

#recentlyPlayedArea,
#latestUpdates {
    margin: 8px 0 30px;
}

#recentlyPlayedArea h2,
#latestUpdates h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px 10px;
    color: var(--primary-font-color);
    font-size: 1.55rem;
    font-weight: 850;
    line-height: 1.2;
}

#recentlyPlayedArea h2::before,
#latestUpdates h2::before {
    content: "";
    width: 4px;
    height: 1.25em;
    border-radius: 4px;
    background: var(--hover-color, #e59a55);
}

.search-results-message {
    margin: 0 0 12px;
    color: var(--secondary-font-color, #d8cbb4);
    font-size: 0.95rem;
}

#recentlyPlayedCards{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap; /* keep items in a single row */
    justify-content: flex-start;
    gap: 12px;
    padding: 10px;
    justify-content: space-around;
    overflow-x: auto; /* allow horizontal scroll on small screens */
    -webkit-overflow-scrolling: touch;
}

.recentlyPlayedCard {
    width: 332px;
    height: 334px;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    outline: none;
    border: 1px solid rgba(255,255,255,.16);
    background: var(--darkestBrown);
    color: var(--primary-font-color);
    flex-direction: column;
    padding: 5px;

    margin: 10px;
    font-size: 1rem;
    text-align: center;
}
.recentlyPlayedCard:hover {
    border: 3px solid var(--darkerBrown);
    transition: 0.3s ease;
}

.video-container {
    width: 100%;
    overflow: hidden;
    height: 200px;
    outline: none;
    border: none;
    padding: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.video-container video, .video-container img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s ease;
}

#cardContent1{              /* ✅ changed from ID to class */
    background-color: var(--darkestBrown);
    color: var(--primary-font-color);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    font-weight: 600;
    font-size: .9rem;
    padding: 10px;
    border-radius: 0 0 10px 10px;
}
#cardContent1 p {
    margin: 5px 0;
}
#cardContent1 p:first-child {
    color: var(--primary-font-color);
    font-size: 1.05rem;
    font-weight: 850;
}
#cardContent1 p:nth-child(2),
#cardContent1 p:nth-child(3) {
    color: var(--secondary-font-color, rgba(255,255,255,.68));
    font-size: .78rem;
    font-weight: 600;
}
#cardContentAssets {
    position: absolute;
    top: 13px;
    right: 12px;
    width: 30px;
    height: 30px;
}
#cardContentAssets:hover{
    background-color: aquamarine;
}
#cardContentAssets img {
    width: 100%;
    height: 100%;
}
#allUpdates {
    display: grid;
    padding: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

#allUpdates .recentlyPlayedCard {
    width: 100%;
    min-width: 0;
    margin: 0;
}

/* ============================================================
   COMPACT HOME LAYOUT
   Also applies to narrow browser windows that are wider than a phone.
   ============================================================ */
@media screen and (max-width: 800px) {
    #mainContainer {
        width: 100%;
        max-width: 100%;
        padding: 0 8px;
    }

    #recentlyPlayedArea h2,
    #latestUpdates h2 {
        margin-left: 4px;
        margin-right: 4px;
        font-size: 1.35rem;
    }

    #recentlyPlayedArea #recentlyPlayedCards {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 8px 4px 14px;
        gap: 10px;
        scroll-snap-type: x mandatory;
    }

    #recentlyPlayedArea .recentlyPlayedCard {
        flex: 0 0 min(78vw, 280px);
        width: min(78vw, 280px);
        height: auto;
        min-height: 0;
        scroll-snap-align: start;
    }

    #allUpdates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 8px 4px;
    }

    #allUpdates .recentlyPlayedCard {
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        margin: 0;
        border-radius: 11px;
        border-width: 2px;
        font-size: .88rem;
    }

    .video-container {
        height: 118px;
    }

    #cardContent1 {
        min-width: 0;
        min-height: 0;
        padding: 10px;
        font-size: .88rem;
        line-height: 1.2;
    }

    #cardContent1 p {
        margin: 5px 0;
        overflow-wrap: anywhere;
    }

    #allUpdates #cardContent1 p:first-child {
        margin: 0 0 10px;
        padding-right: 28px;
        color: var(--primary-font-color);
        font-size: 1rem;
        font-weight: 800;
        letter-spacing: .02em;
        line-height: 1.15;
    }

    #allUpdates #cardContent1 p:nth-child(2),
    #allUpdates #cardContent1 p:nth-child(3) {
        color: var(--secondary-font-color, rgba(255,255,255,.68));
        font-size: .82rem;
        font-weight: 700;
        line-height: 1.25;
    }

    #cardContent1 p:first-child {
        padding-right: 28px;
        min-height: 2.6em;
    }

    #cardContentAssets {
        top: 10px;
        right: 10px;
        left: auto;
        width: 22px;
        height: 22px;
    }
}
