
.topclass {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 2rem;
    background: black;
    font-family: 'Space Mono', monospace;
    gap: 2rem;
}

.header_logo {
    flex-shrink: 0;
}

#home_logo {
    height: 6rem;
    width: 6rem;
    display: block;
}


.header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

#browse,
#favorites,
#about {
    font-size: 1.1rem;
    font-family: 'Space Mono', monospace;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

#browse:hover,
#favorites:hover,
#about:hover {
    opacity: 0.7;
    text-decoration: none;
}


.search_bar {
    display: flex;
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
}

form.bar {
    display: flex;
    width: 100%;
}

header input[type=text] {
    flex: 1;
    font-size: 1rem;
    font-family: 'Space Mono', monospace;
    padding: 0.6rem 1.2rem;
    border: 1px solid #444;
    border-radius: 25px 0 0 25px;
    background-color: #1a1a1a;
    color: white;
    min-width: 0;
}

header input[type=text]:focus {
    outline: none;
    border-color: #666;
}

header input[type=text]::placeholder {
    color: #666;
}

form.bar button {
    font-size: 1.2rem;
    padding: 0.6rem 1.5rem;
    border: 1px solid #444;
    border-left: none;
    border-radius: 0 25px 25px 0;
    background-color: #1a1a1a;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

form.bar button:hover {
    background-color: #2a2a2a;
}


#login {
    font-size: 1.1rem;
    font-family: 'Space Mono', monospace;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    margin-left: auto;
    transition: opacity 0.3s ease;
}

#login:hover {
    opacity: 0.7;
    text-decoration: none;
}


.dropdown {
    position: relative;
    margin-left: auto;
}

.dropbtn {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    color: white;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: opacity 0.3s ease;
}

.dropbtn:hover {
    opacity: 0.7;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0;
    background-color: #1a1a1a;
    min-width: 160px;
    border: 1px solid #333;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.dropdown-content a {
    font-family: 'Space Mono', monospace;
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #2a2a2a;
    text-decoration: none;
}

.dropdown:hover .dropdown-content {
    display: block;
}


.topclass a:link, .topclass a:visited, .topclass a:hover, .topclass a:active {
    text-decoration: none;
    color: white;
}



.form-group input[type=text] {
    margin-bottom: 2%;
}

.form-group p {
    font-size: 12px;
}

#post_password {
    display: flex;
    flex-direction: column;
    align-items: center;
}


@media screen and (max-width: 900px) {
    .topclass {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 1rem;
    }

    .header-nav {
        order: 2;
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }

    .search_bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    #login,
    .dropdown {
        order: 1;
        margin-left: auto;
    }
}

@media screen and (max-width: 600px) {
    #home_logo {
        height: 4rem;
        width: 4rem;
    }

    #browse,
    #favorites,
    #about,
    #login,
    .dropbtn {
        font-size: 0.95rem;
    }

    .header-nav {
        gap: 1rem;
    }
}