@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

*, *::before, *::after{
    box-sizing: border-box;
}

:root{
    --pagewidth: min(1000px, calc(100vw - 50px));
    --side-width: 300px;
    --margin: calc(50vw - var(--pagewidth) / 2 - var(--side-width));
    --header-height: 330px;
}

html{
    scroll-behavior: smooth
}

body{
    margin: 0;
    background-size: 500px;
    height: 100vh;
    font-family: Roboto, sans-serif;
    /*background: lightgray url("../static/cellobg-modified.png") fixed;*/
}

#wrapper{
    width: 100%;
    height: auto;
    background: white;
    padding: 20px;
    display: flex;
    column-gap: 20px;
}

aside{
    width: var(--side-width);
    display: flex;
    flex-direction: column;
    row-gap: 12px;
    font-size: 15px;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow: auto;
}

aside .principle{
    color: black;
    font-weight: bold;
}

aside .header{
    font-size: 24px;
    font-weight :bold;
}

.sectionlink, .collectionlink{
    color: rgb(32, 43, 58);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.sectionlink{
    font-size: 16px;
    font-weight: 600;
    color: rgb(31, 41, 55);
}

.sectionlink:hover, .collectionlink:hover{
    color: #447ff5;
}

.collectionlink{
    margin-left: 20px;
}

main{
    width: var(--pagewidth);
    margin-left: var(--margin);
}

header h1{
    font-size: 30px;
    font-weight: bolder;
}

div.collection_wrapper{
    border: 1px solid black;
    padding: 20px;
    margin-bottom: 20px;
    margin-left: 30px;
    margin-right: 10px;
}

div.collection_wrapper > h3{
    font-size: 18px;
    margin-top: 0;
}

div.collection{
    display: flex;
    column-gap: 10px;
    row-gap: 10px;
    flex-wrap: wrap;
}

div.piece{
    background: whitesmoke;
    padding: 20px;
    place-self: normal;
    flex: 1 1 0;
    min-width: 270px;
}

div.piece span.title{
    font-size: 18px;
    font-weight: bolder;
}

div.piece span.subtitle{
    font-weight: bolder;
}

div.piece span.author{
    font-style: italic;
    margin-bottom: 10px;
    font-weight: 300;
}

div.piece span.description{
    font-size: 14px;
}

div.piece > span{
    display: block;
    word-break: break-word;
}

audio{
    width: 100%;
}

i.collapsible{
    transition: 0s;
}

.collapsed > .collapsible_wrapper > i.collapsible{
    rotate: -90deg;
}

.collapsible_wrapper{
    user-select: none;
    cursor: pointer;
}

div.collection_wrapper.collapsed > .collection{
    display: none;
}

div.collection_wrapper.collapsed > .collapsible_wrapper{
    margin: 0;
}

section.collapsed > .collection_wrapper{
    display: none;
}

.modal-wrapper{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
}

.modal{
    width: calc(var(--pagewidth) - 40px);
    background: white;
    margin: 50px auto;
    padding: 20px;
    font-size: 18px;

    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

div.modal span.title{
    font-size: 40px;
    font-weight: bolder;
}

div.modal span.subtitle{
    font-weight: bolder;
}

div.modal span.author{
    font-style: italic;
    font-weight: 300;
}

div.modal span.description{
    font-size: 14px;
}

div.modal span{
    display: block;
    word-break: break-word;
}

div.modal span.sectionheader{
    font-weight: bold;
}

div.modal audio{
    margin: 10px 0;
}

.tag{
    background: #424242;
    color: white;
    width: fit-content;
    padding: 10px 20px;
    font-weight: bolder;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.tag:hover{
    opacity: 0.7;
}

.tag:active{
    opacity: 0.5;
}

.tag-composer{
    background: #ff3e00;
}

.tag-collection{
    background: rgb(34, 197, 94);
}

.tag-section{
    background: #6675e0;
}

.tag-part {
    background: #e38d33;
}

.tagbox{
    display: flex;
    margin: 10px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.closeable{
    margin-left: auto;
    cursor: pointer;
}

.closeable:hover{
    color: red;
}

.modal .title{
    display: flex;
}

video{
    width: 100%;
}

h2{
    position: sticky;
    top: 25px;
    z-index: 2;
    background: lightblue;
    border-radius: 4px;
    padding: 10px;
}

header{
    width: 100%;
    margin: auto;
    padding: 20px;
    height: var(--header-height);
    overflow-y: hidden;
    background-image: url("/static/Group.jpeg");
    background-size: 100% auto;
    background-blend-mode: overlay;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}


header h1{
    color: white;
    font-family: "Bebas Neue", sans-serif;
    font-size: 48px;
    text-align: center;
}

.piece iframe{
    width: 100% !important;
    height: 100%;
}

.hashed{
    background: lightyellow;
}

#nav_button_mobile{
    display: none;
}

@media only screen and (max-width: 1500px){
    main{
        margin: auto;
    }
}

@media only screen and (max-width: 700px){
    aside{
        position: fixed;
        background: white;
        z-index: 5;
        padding: 10px;
        border: 1px solid black;
        width: 300px;
        top: 73px;
        right: 10px;
        max-height: calc(100vh - 83px);
        display: none;
    }

    main{
        flex: 1;
    }

    .youtube-wrapper{
        margin: auto;
    }

    .collection_wrapper{
        margin-left: 10px !important;
    }

    :root{
        --pagewidth: 100%;
    }

    #wrapper{
        padding: 10px;
    }

    #nav_button_mobile{
        display: block;
        background: white;
        position: fixed;
        font-size: 20px;
        padding: 4px;
        top: 32px;
        z-index: 6;
        width: 32px;
        text-align: center;
        border-radius: 4px;
        right: 20px;
    }

    /*CSS trick*/
    #nav_button_mobile::after{
        content: " ";
        width: 32px;
        height: 32px;
        top: 64px;
        right: 20px;
        z-index: 6;
        display: block;
        background: none;
        position: fixed;
    }

    #nav_button_mobile:active + aside , #nav_button_mobile:hover + aside, aside:active, aside:hover{
        display: flex;
    }
}
