@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');



*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    font-family: "Nunito Sans", sans-serif;
}

.hidden{
    scale: 0;
    transition: scale 250ms, transform 250ms;
    transform: translateY(-300px);
    transform: translateX(100vw);
}

.visible{
    transition: scale 250ms,
                transform 250ms;

}

.grayed{
    filter: brightness(50%) saturate(0%);
    transition: filter 500ms;
}
.bg-gray {
    background-color: #4e4e4e;
    transition: background-color 500ms;
}

@keyframes marquee-scroll {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-50%, 0); } /* Scrolls exactly one half, so duplicates loop perfectly */
}

.marquee {
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    color: #fff;
    padding: 10px 0;
    box-sizing: border-box;
    display: none; /* Changed from flex to none */
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-scroll 25s linear infinite;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
}

body {
    background-color: rgb(255, 205, 205);
    transition: background-color 350ms;
}

.category-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 300ms;
}

.category-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
    scale: 1.05;
}

.category-btn.active {
    background-color: rgb(179, 48, 48);
    border-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

body.dark-mode .category-btn {
    background-color: #333;
}

body.dark-mode .category-btn:hover {
    background-color: #555;
}

body.dark-mode .category-btn.active {
    background-color: rgb(255, 102, 102);
}

#content {
    transition: filter 350ms;
    margin: 0 1.5vh;
    & h1{
        font-size: 48px;
        color: #fff;
        filter: drop-shadow(1px 1px 1px #000);
        text-transform: capitalize;
        opacity: 0.8;
    }
}
#navbar-div{
    position: fixed;
    right: 0;
    top: 0;
    align-items: end;
    align-self: end;
    align-content: end;
    text-align: right;
    overflow: hidden;
    z-index: 999;
    
    & #navbar-controls {
        position: relative;
        display: flex;
        gap: 10px;
        justify-content: flex-end;
        align-items: center;
        z-index: 10;
    }

    & nav{
        margin-right: 5px;
        filter: drop-shadow(1px 1px 5px #3a3a3a);
        & ul{
            & li{
                font-size: 24px;
                color: aliceblue;
                transition: font-size 300ms, color 300ms ;
                &:hover{
                    transition: all 450ms ; 
                    color: #f11;
                    font-size: 26px;
                    letter-spacing: 0.1vh;
                }
            }
        }

        & #nav-foot{
            font-weight: 100;
            font-size: 24px;
            color: #aaaaaa;
        }
    }

    & #hamburger-menu, & #info-btn, & #dark-mode-btn {
        font-size: 24px;
        padding: 0.4vh;
        margin-right: 10px;
        margin-top: 10px;
        border-radius: 320px ;
        border-width: 0.0vh;
        background-color: #e2e2e2;
        color: #3a3a3a;
        filter: drop-shadow(1px 0.1px 2px #662424);
        transition: color 300ms, scale 300ms, transform 300ms, opacity 300ms;
        cursor: pointer;
        &:hover{
            transition: all 450ms ease-in-out;
            color: rgb(179, 48, 48);
            scale: 1.2;
        }
    }

    & #dark-mode-btn {
        position: absolute;
        right: 0;
        opacity: 0;
        transform: translateX(0) rotate(-45deg) scale(0.5);
        pointer-events: none;
        z-index: -1;
    }

    & .menu-open #dark-mode-btn {
        opacity: 1;
        transform: translateX(-100px) rotate(0deg) scale(1);
        pointer-events: auto;
    }
}

/* Community Items Base (Light Mode) */
.community-item-card {
    background-color: #e2e2e2;
    color: #333;
}
.comm-title-link, .comm-rank, .comm-score, .pagination-text {
    color: #333;
}
.comm-title-link {
    text-decoration: none;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #f0f0f0;

    & #content h1 {
        color: #e2e2e2;
    }

    & .card,
    & #content .card,
    & #featured .showcase .card,
    & .video-card {
        background-color: #2c2c2c;
        color: #f0f0f0;
    }

    & .community-item-card {
        background-color: #222;
        color: #fff;
    }
    
    & .comm-title-link, 
    & .comm-rank, 
    & .comm-score, 
    & .pagination-text {
        color: #fff;
    }
}

#info-popup {
    position: fixed;
    top: 60px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 350px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 300ms, transform 300ms, visibility 300ms;

    &.hidden-popup {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
    }
}

.popup-content {
    position: relative;
    color: #333;

    & h3 {
        font-size: 18px;
        margin-bottom: 5px;
        color: rgb(179, 48, 48);
    }

    & p {
        font-size: 14px;
        margin-bottom: 15px;
        word-break: break-all;

        & a {
            color: #0066cc;
            text-decoration: none;
        }
    }

    & hr {
        margin: 15px 0;
        border: 0;
        border-top: 1px solid #eee;
    }

    & .close-popup {
        position: absolute;
        top: -15px;
        right: -10px;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #999;
        
        &:hover {
            color: #333;
        }
    }
}

#featured{
    & .showcase{
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        overflow-x: hidden;    
        & .card{
            height: 50vh;
            width: 65%;
            flex-shrink: 0; 
            background-color: aliceblue;
            margin: 15px 0;
            border-radius: 16px;
            filter: drop-shadow(1px 2px 3px rgba(0, 0, 0, 0.2));
            
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: width 300ms,
            opacity 300ms;
            
        }
        
        &  .collapsed{
            width: 8%;
            opacity: 0.6;
            transition: width 300ms,
            opacity 300ms;
        }
    }
}

.community-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.community-icon-link {
    color: inherit;
    text-decoration: none;
    font-size: 0.6em;
    opacity: 0.7;
    transition: opacity 0.3s;
    
    &:hover {
        opacity: 1;
    }
}

.community-icon-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: 0.6em;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.3s;
    padding: 0;
    
    &:hover {
        opacity: 1;
    }
}


#category-filters,
#community-category-filters {
    display: none;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.show-more-container {
    text-align: center;
    margin-top: 20px;
}

.community-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.page-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    transition: background-color 300ms, transform 300ms;
}

.page-btn:hover:not(:disabled) {
    background-color: #555;
    transform: translateY(-1px);
}

/* Community list layout and controls */
.community-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.community-item-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-radius: 8px;
    background-color: #e2e2e2;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.community-item-card img {
    width: 120px;
    height: auto;
    border-radius: 8px;
    display: block;
}

.comm-details {
    flex-grow: 1;
    min-width: 150px;
    overflow: hidden;
}

.comm-details h3 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    word-break: break-word;
}

.comm-rank {
    min-width: 48px;
    text-align: center;
    margin: 0;
    font-size: 1.1rem;
}

.vote-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.vote-btn {
    cursor: pointer;
    background: transparent;
    border: 1px solid #888;
    border-radius: 6px;
    padding: 6px 10px;
    color: inherit;
}

.vote-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .community-item-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .community-item-card img {
        width: 100%;
    }

    .comm-rank {
        align-self: flex-start;
    }
}

.page-btn:disabled {
    cursor: not-allowed;
}

#show-more-main-btn {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    display: none;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 8px;
}

footer {
    background-color: #222;
    color: #ccc;
    text-align: center;
    padding: 30px 15px;
    margin-top: 50px;

    & .footer-links {
        margin-bottom: 15px;

        & a {
            color: #fff;
            text-decoration: none;
            margin: 0 10px;

            &:hover {
                text-decoration: underline;
            }
        }
    }

    & .footer-credits {
        font-size: 14px;

        & a {
            color: #ff6666;
            text-decoration: none;
            font-weight: bold;

            &:hover {
                text-decoration: underline;
            }
        }
    }
}

