/* Reset */
* {
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
    
    margin: 0;
    padding: 0;
    
    user-select: none;
    -webkit-tap-highlight-color: transparent;

    scroll-margin-top: 25vh;
}

*::-webkit-scrollbar {
    display: none;
}

html {
    width: 100%;
    height: 100%;
    
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;

    width: 100%; 
    height: 100%;
     
    color: #2F2F2F;
    background-color: #FFF;       
}

main {
    flex: 1;
}

img, video {
    max-width: 100%;
}
/* /Reset */




/* Code Header */
header {
    display : grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;

    padding: 0 0.5rem;
    border-bottom: 0.1rem solid #C0C0C0;
    
    background-color: #FAFAFA;
}

header h1 {
    font-size: 1rem;
}

header a, header #show-code {
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0.8rem;
    text-decoration: none;
    
    color: #000;
    
    cursor: pointer;
}

header #code-menu {
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow-y: auto;
    
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    
    padding-bottom: 1rem;
    
    background-color: #FFF;
}

#code-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;

    padding: 0 0.5rem;
    border-bottom: 0.1rem solid #C0C0C0;
    
    background-color: #FAFAFA;
}

#close-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    width: 20px;
    aspect-ratio: 1 / 1;
    
    margin: 10px;
    
    cursor: pointer;
}

#close-code span {
    width: 20px;
    position: absolute;

    border: 1px solid #000;
    border-radius: 1px;
}

#close-code span#line1 {
    transform: rotate(45deg);
}

#close-code span#line2 {
    transform: rotate(-45deg);
}

.code:nth-of-type(4) {
    flex: 1;
    
    margin-bottom: 2rem;
}

.code h3 {
    margin-top: 4rem;

    text-align: center;
}

.code pre {
    display: block;
    overflow-x: auto;
    
    margin: 0.5rem 1rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #2F2F2F;
    
    cursor: text;
    user-select: text;
}
/* /Code Header */





/* HP */
  /* Header */
header.hp {
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    width: 100%;
    height: 48px;
    
    padding: 4px;
    
    background-color: #2F2F2F;
}

.hp #burger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;

    width: 20px;
    aspect-ratio: 1 / 1;
    
    margin: 10px;
    
    cursor: pointer;
}

.hp #burger-btn span {
    width: 20px;

    border: 1px solid #FFF;
    border-radius: 1px;
}

.hp #burger-menu {
    opacity: 0;

    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100vw);
    
    background-color: #FFF;
    
    transition: all 0.4s ease-out;
}

.hp #burger-menu.open {
    opacity: 1;
 
    transform: translateX(0);
}

.hp #burger-menu #burger-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    
    width: 100%;
    height: 48px;
    
    padding: 4px;
    border-bottom: 2px solid #C0C0C0;
}

.hp #burger-menu #burger-header #close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    width: 20px;
    aspect-ratio: 1 / 1;
    
    margin: 10px;
    
    cursor: pointer;
}

.hp #burger-menu #burger-header #close-btn span {
    width: 20px;
    position: absolute;

    border: 1px solid #000;
    border-radius: 1px;
    
    background-color: #000;
}

#close-btn span#line1 {
    transform: rotate(45deg);
}

#close-btn span#line2 {
    transform: rotate(-45deg);
}

.hp #links {
    padding: 1.2rem 0.4rem;
}

.hp #links a {
    display: inline-block;
    
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.5;
    text-decoration: none;
    
    color: #000; 
}

.hp #links a::before {
    content: "> ";
}


  /* Main */
main.hp section {
    display: flex;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
    
    background-color: #FFF;
}

main.hp > section:nth-child(2n) {
    background-color: #F5F5F5;
}

.hp h2 {
    padding: 1.6rem;

    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
}

.contain {
    overflow-x: auto;

    width: 100%;
    height: 100%;
}

.card {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    
    height: 100%;

    padding: 0.8rem;
}


  /* Card Type */
section.card-ta a, section.card-tb a {
    display: flex;
    align-items: center;
    flex-direction: column;
    overflow: hidden;

    height: 100%;

    text-decoration: none;
    color: #000;
    background-color: #FFF; 
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.card-ta a {
    aspect-ratio: 3 / 4;

    border-radius: 1rem;
}
.card-ta a img {
    width: auto;
    height: 80%;
    object-fit: contain;
    object-position: center center;
}

.card-tb a {
    aspect-ratio: 16 / 12;
    
    border-radius: 0.5rem;
}
.card-tb a img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
/* /HP */










/* Responsive */
@media (max-width: 768px) and (orientation: landscape) {
    section {
        min-height: 100vh;
        max-height: 100vh;
    }
}

@media (min-width: 768px) {
    #bookmarks {
        min-height: 50vh;
        max-height: 50vh;
    }

    #bookmarks .card {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    #bookmarks .card a {
        max-height: calc(50% - 1rem);
    }
}

/* /Responsive */





/* Footer */
footer {
    color: #FFF;
    background-color: #101010;
}
/* /Footer */
