:root {
    --bg-color: #121212;
}

body {
    background-color: #121212;
}

a {
    text-decoration: none;
}

.topic {
    font-size: 20px;
    border-color: rgb(17, 186, 175);
    border-style: solid;
    border-width: 4px;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    width: 95%;
    height: 220px;
    overflow: hidden;
    position: relative;
    outline: 2px solid black;
    right: 6.5%;
    transition: box-shadow 0.5s;
}

.topic:hover {
    box-shadow: 0px 0px 15px rgba(17, 186, 175, 0.3),
                0px 0px 25px rgba(17, 186, 175, 0.3),
                0px 0px 50px rgba(17, 186, 175, 0.3),
                0px 0px 150px rgba(17, 186, 175, 0.3);
}

.topic_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 25px;
}

.topic_icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: invert(1);
    mix-blend-mode: screen;
}

.sub_topic {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 20px;
    color: white; 
    text-decoration: none;
    transition: color 0.5s ease;
}

.sub_topic:hover {
    color: rgb(0, 226, 0);
}



ol {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* 4 columns max*/
    gap: 30px;
}



li.topic ul {
    flex: auto; 
    overflow: hidden;
    position: relative;
    padding: 0;
    margin: 0;
}



.sub_topic:nth-child(n+4) {    /* hide sub-topics after the 3rd one */
    display: none; 
}

ul:has(li:nth-child(4))::after {   /* if there 3 sub-topics will be "... and more */
    content: "... and more";
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px 0;
    color: white
}


.footer {
    margin-top: 50px;
    text-align: center;
    font-size: 50px;
    color: white;
}

.link {
    text-align: center;
    font-size: 40px;
    margin-top: 10px;
}

#gmail_icon {
    width: 85px;
    height: 55px;
    margin-right: 7px;
    vertical-align: middle;
}

#discord_icon {
    width: 70px;
    height: 50px;
    margin-right: 7px;
    vertical-align: middle;
}

#catalogue {
    margin-top: 35px;
    margin-bottom: 40px;
    font-size: 35px;
    text-align: center;
    color: white;
}


.welcome {
    text-align: center;
    font-size: 45px;
    margin-bottom: 50px;
    color: white;
}

#physnex {
    width: 100px;
    height: 70px;
    top: 20px;
    position: relative;
    left: -20px;
}


.search {
    text-align: center;
    position: relative;
    font-size: 20px;
    display: block;
    float: center;
    filter: invert(1);
}

#search_bar {
    width: 45%;
    padding: 12px 20px;
    box-sizing: border-box;
    border: 2px solid black;
    border-radius: 4px;
    font-size: 20px;
    float: center;
    margin-bottom: 20px;
}

#search_results {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 20px;
    color: white;
}

.additional-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px;
    margin-top: 30px;
    padding: 0;
    list-style: none;
}

.additional {
    font-size: 30px;
    border: 4px solid black;
    padding: 15px;
    border-radius: 10px;
    outline: 2px solid rgb(17, 186, 175);
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    transition: box-shadow 0.5s;
}

.additional:hover {
    box-shadow: 0px 0px 15px rgba(17, 186, 175, 0.3),
                0px 0px 25px rgba(17, 186, 175, 0.3),
                0px 0px 50px rgba(17, 186, 175, 0.3),
                0px 0px 150px rgba(17, 186, 175, 0.3);
}

.Additional {
    font-size: 40px;
    text-align: center;
    margin-top: 50px;
    font-weight: bold;
    color: white;
}

.search_div {
    color: rgb(0, 211, 226);
    text-decoration: none;
}

.search_text {
    padding: 5px;
    font-size: 22px;
}

a {
    color: white;
    transition: color 0.5s ease;
}

a:hover {
    color: rgb(0, 226, 0)
}