body,html{
    margin: 0;
    padding:0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    background: #06002E;
}

a{
    color:black;
    text-decoration:none;
}

.hidden{
    position: absolute;
    width: 1px;
    height: 1px;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    margin: -1px;
    padding: 0;
}

ul.skipmenu_list li a:focus{
    width: 100%;
    height: 1.875rem;
    font-size: 0.875rem;
    line-height: 1.875rem;
    z-index: 9999;
    background:black;
    color:white;
    text-align:center;
    top: 0;
}

/* 메뉴 */
header{
    position: fixed;
    display: flex;
    flex-direction: column;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 0.625rem 2.5rem 0;
    box-sizing: border-box;
}

#logo{
    width: 15vw;
    height: 5vh;
    background: url('../images/starbattlelogo.svg') center no-repeat;
    background-size: contain;
    position:relative;
    left: 0;
    top: 0;
    text-indent: -99999px;
    margin-bottom: 0.625rem;
}

#logo>a{
    width: 100%;
    height: 100%;
    display: block;
}

#logo.dark {
    background: url('../images/starbattlelogo_black.svg') center no-repeat;
    background-size: contain;
}

.mainmenu{
    width: 3.75rem;
    height: 3.75rem;
    background: url('../images/starbattle_menuicon.svg') center no-repeat;
    background-size: contain;
    border: none;
    cursor: pointer;
}

.mainmenu.dark {
    background: url('../images/starbattle_menuicon_black.svg') center no-repeat;
    background-size: contain;
}

.mainmenu_slide{
    position: fixed;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem 0;
    box-sizing: border-box;
    top: 0;
    left: 0;
    width: 29.125rem;
    height: 100%;
    background: #EAF7F6;
    clip-path: polygon(0% 0%, 100% 0%, 85% 100%, 0% 100%);
    transition: all 0.3s ease-out;
    z-index: 100;
    transform: translateX(-100%);
    transform: translateX(-100%); 
    visibility: hidden;
    opacity: 0; 
}

.mainmenu_slide.active {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
}

.mainmenu_logo{
    width: 100%;
    height: 5vh;
    background: url('../images/starbattle_innerlogo.svg') left center no-repeat;
    background-size: contain;
    position: relative;
    left: 0;
    top: 0;
    margin-bottom: 6.25rem;
}

.mainmenu_list{
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.mainmenu_list li a{
    font: 600 1.25rem 'Pretendard';  
    color: #000;
}

/* CSS 추가 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    z-index: 99;
}

body.menu-open {
    overflow-x: hidden;
}

@media screen and (max-width: 768px) {
    header {
        padding: 0.75rem 1.25rem 0;
    }
    
    #logo {
        width: clamp(140px, 22vw, 180px);  /* 최소 140px, 최대 180px로 제한 */
        height: clamp(40px, 7vh, 50px);    /* 최소 40px, 최대 50px로 제한 */
        margin-bottom: 0.5rem;
    }
    
    .mainmenu {
        width: clamp(2.75rem, 4vw, 3.25rem);  /* 최소 2.75rem, 최대 3.25rem으로 제한 */
        height: clamp(2.75rem, 4vw, 3.25rem);
    }
    
    .mainmenu_slide {
        width: 80vw;
        padding: 1.5rem 1rem 0;
    }
    
    .mainmenu_logo {
        height: clamp(40px, 7vh, 50px);  /* 로고와 동일한 크기 제한 */
        margin-bottom: 3rem;
    }
    
    .mainmenu_list {
        gap: 1.25rem;
    }
    
    .mainmenu_list li a {
        font-size: 1.125rem;
    }
}

