@font-face {
  font-family: 'PixelFont';
  src: url('/font/fnt_dotumche.ttf');
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

a {
  -webkit-tap-highlight-color: transparent;
}

button
{
  -webkit-tap-highlight-color: transparent;
}

* {
    box-sizing: border-box;
}
body {
    background-color: #543964;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;

    display: flex;
    padding: 0px;
    margin: 0px;
    color: #F0E6F6;
    font-size: 16px;
    font-family: 'PixelFont', monospace;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
}

.clickable-logo {
    cursor: pointer;
    transition: transform 0.1s;
}

.clickable-logo:active {
    transform: scale(0.95);
}

.pixel-divider {
    height: 4px;
    background-color: #4a3158;
    margin: 10px 0px;
}

div.menu {
    background-color: #83629e;
    border: 4px solid #3A2646;
    text-align: center;
    width: 220px;
    flex-shrink: 0;
    margin: 20px;
    padding: 20px;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 8px 8px 0px #3a264665;

    &::-webkit-scrollbar {
        width: 12px;
    }
    &::-webkit-scrollbar-thumb {
        background-color: #3A2646;
        border: 3px solid transparent; 
        background-clip: padding-box;   
    }
    
    &::-webkit-scrollbar-thumb:hover {
        background: #442f50;
        border: 3px solid transparent; 
        background-clip: padding-box;   
    }

    img {
        width: 80%;
        margin: -10px auto 0px auto;
        display: block;
        image-rendering: pixelated;
        filter: drop-shadow(4px 4px 0px #3a264665);
    }

    h1 {
        font-weight: normal;
        color: #FFFFFF;
        text-shadow: 2px 2px 0px #3a264665;
        font-size: 30px;
        letter-spacing: 1px;
        margin: 0px;
    }

    p {
        color: #3A2646;
        display: inline-block;
        font-size: 15px;
        margin: 0px;   
    }

    nav {
        display: flex;
        flex-direction: column;
        margin: auto;
        width: 90%;
        gap: 10px;
        a {
            text-decoration: none;
            color: #ffffff;
            background-color: #4a3158;
            box-shadow: 4px 4px 0px #3a264665;
            padding: 8px;

            transition: all 0.1s ease, box-shadow 0.1s ease;
            border: 3px solid transparent; 

            &:hover {
                background-color: #6e5185 ;
                border: 3px solid #4a3158;
                transform: scale(1.05);
            }
            &:active {
                background-color: #5e4270;
                transform: scale(0.95);
            }
        }
    }
}


div.main
{
    flex: 1;
    margin: 20px 10px;
    min-width: 0;
}



::-webkit-scrollbar {
    width: 12px;
    background-color: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: #3A2646;
    border: 3px solid transparent; 
    background-clip: padding-box;   
}
    
::-webkit-scrollbar-thumb:hover {
    background: #442f50;
    border: 3px solid transparent; 
    background-clip: padding-box;   
}



.burger {
    display: none;
}

@media (max-width: 768px) {
    
    div.menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 10px 15px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        z-index: 1000;
        border-width: 0 0 4px 0;
        box-shadow: 0 4px 0px #3a264665;
        overflow: visible;
        display: flex;
        flex-wrap: wrap;
    }

    div.menu img {
        width: 40px;
        margin: 0;
    }
    
    div.menu h1 {
        font-size: 20px;
        margin: 0 0 0 10px;
        flex-grow: 1;
        text-align: left;
    }

    .burger {
        display: block;
        background: none;
        border: none;
        color: #4a3158;
        font-size: 30px;
        cursor: pointer;
        padding: 0;
        margin-left: auto;
        transition: all 0.1s ease, box-shadow 0.1s ease;

        &:active {
            color: #2c1c35;
            transform: scale(1.05);
        }
    }

    div.menu > p,
    div.menu > .pixel-divider,
    div.menu > nav {
        display: none;
    }

    div.menu.open > p,
    div.menu.open > .pixel-divider,
    div.menu.open > nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        gap: 5px;
        order: 10;
    }
    
    div.menu.open > p {
        display: none; 
    }

    div.menu.open > .pixel-divider {
        display: block;
    }

    div.menu.open > nav a {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }

    div.main {
        margin: 10px;
        margin-top: 70px;
        width: calc(100% - 20px);
    }
}