@font-face {
    font-family: 'NeoDunggeunmoPro-Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/NeoDunggeunmoPro-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'DNFBitBitv2';
    src: url('https://cdn.df.nexon.com/img/common/font/DNFBitBitv2.otf') format('opentype');
    font-style: normal;
    font-weight: 400;
}

html, body, .main-content{
    overflow: hidden;
    -webkit-overflow-scrolling: none;
    overscroll-behavior: none;
}

html, body {
    background-image: url('../img/background.png');
    background-repeat: no-repeat;
    background-size: cover;
    color: #1E1E1E;
    font-family: 'DNFBitBitv2', 'NeoDunggeunmoPro-Regular', cursive;
    height: 100vh;
    margin: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

* {
    box-sizing: border-box;
    cursor: url(../icon/pointer-solid-24.png), auto !important;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: none;
    -webkit-font-smoothing: antialiased;
}

img{
	-webkit-touch-callout:none;
	user-drag: none; /* Safari */
	-webkit-user-drag: none; /* Chrome, Edge 등 */
	pointer-events: none; /* 마우스 이벤트도 막을 경우 */
}

a {
    text-decoration: none;
    color: #1E1E1E;
}
/* 로딩 화면 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: opacity 0.5s ease-out;
}

.loader img {
    width: 45px;
    height: auto;
    animation: rotate_image 6s linear infinite;
    transform-origin: 50% 50%
}
@keyframes rotate_image{
	100% {
    	transform: rotate(360deg);
    }
}

/* 메인 콘텐츠 */
.main-content {
    display: flex;
    flex-direction: column;
    visibility: hidden;
}
.main-content.show {
    visibility: visible;
}

/* 헤더 스타일 */
.top-bar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    background: white;
    z-index: 1000;
}

/* 헤더 내부 요소 */
.left-section, .center-section, .right-section {
    display: flex;
    align-items: center;
}

/* 왼쪽 영역 */
.left-section {
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    padding-right: 15px;
}

.logo {
    font-size: 12px;
    font-weight: bold;
    color: #1E1E1E;
    padding-left: 15px;
}
.logo a, .logo a:hover {
    text-decoration: none;
    color: #1E1E1E;
}

/* 메뉴 스타일 */
.top-bar .menu {
    display: flex;
    gap: 8px;
    padding-left: 10px;
    font-weight: normal;
}

.top-bar .menu a {
    font-size: 12px;
}

/* 햄버거 메뉴 */
.menu-toggle {
    display: none;
    font-size: 16px;
    background: none;
    border: none;
    color: #1E1E1E;
    cursor: pointer;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    font-family: none !important;
    line-height: inherit;
}

.top-bar .menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 35px;
    left: 0;
    padding: 9px;
    border: 1px solid #1E1E1E;
    background-color: white;
    line-height: 1.5;
    text-align: left;
}

/* 중앙 빈 공간 */
.center-section {
    flex-grow: 1;
}

/* 오른쪽 영역 */
.right-section {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid rgba(0, 0, 0, 0.2);
    padding-left: 15px;
    padding-right: 5px;
}

/* 날짜 & 시간 */
.datetime {
    color: #1E1E1E;
    font-size: 10px;
}

/* 콘텐츠 영역 */
.content-section {
    flex-grow: 1;
    padding: 20px;
    margin-top: 35px;
}

/* 아이콘 메뉴 */
.icon-menu {
    position: fixed;
    bottom: 15px;
    left: 15px;
    display: grid;
    gap: 4px;
    list-style: none;
    padding: 0;
}

/* 아이콘 개별 스타일 */
.icon-menu li {
    width: 70px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    margin: 5px;
}

.icon-menu li div {
    height: 100%;
}

.icon-menu li .iconImg {
    width: 40px;
    height: 40px;
}

.icon-menu li span {
    font-weight: normal;
    font-size: 11px;
}

/* 팝업창 */
.window {
    display: none;
    position: absolute;
    width: 310px;
    height: 300px;
    background: white;
    color: #1E1E1E;
    border: 1px solid #1E1E1E;
    padding: 5px;
    cursor: grab;
    box-shadow: 5px 5px 10px #c9c9c9;
    transition: background .01s ease-in-out;
    overflow: hidden;
}

/* 팝업창 내부 iframe */
.window .content {
    width: 100%;
    height: calc(100% - 35px);
    padding: 0;
    overflow: hidden;
    border: 1px solid #1E1E1E;
}

.window .content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 팝업창 제목 바 */
.title-bar {
	padding: 2px 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 4px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.2);
	font-size: 14px;
}

/* 팝업 버튼 */
.max-btn, .close-btn {
    color: #1E1E1E;
    background-color: transparent;
    border: 1px solid #1E1E1E;
}

/* 팝업 크기 조절 핸들 (삼각형) */
.resize-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    bottom: 0;
    right: 0;
    background: transparent;
    cursor: nwse-resize;
}

/* 삼각형 모양 */
.resize-handle::after {
    content: "";
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-right: 10px solid gray;
    opacity: 0.7;
}

.resize-handle:hover::after {
    opacity: 1;
}

/* 기본 팝업 스타일 */
.side-popup {
    position: fixed;
    background: white;
    color: #1E1E1E;
    border: 1px solid #1E1E1E;
    box-shadow: 5px 5px 10px #c9c9c9;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.side-popup .iconDiv {
    text-align: center;
}

.side-popup .icon-list span{
    font-size: 11px;
}

.selected-title{
	font-size: 17px;
}

/* 반응형 스타일 */
@media (max-width: 900px) {
    .top-bar .menu {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .fullscreen {
        display: none;
    }
    .icon-menu {
        grid-template-columns: repeat(4, 1fr);
        justify-content: center;
    }
    .icon-menu li:nth-child(1),
    .icon-menu li:nth-child(2) {
        grid-column: span 1; /* 첫 줄 2개 */
    }
    .icon-menu li:nth-child(3),
    .icon-menu li:nth-child(4),
    .icon-menu li:nth-child(5) {
        grid-column: span 1; /* 두 번째 줄 3개 */
    }
    
    .side-popup {
        width: 230px; /* 기본 펼쳐진 상태 */
        height: 380px;
        top: 80px;
        right: 0;
        display: grid;
        grid-template-columns: 24px repeat(1, 1fr);
        grid-template-rows: 65% 35%;
        justify-items: center;
        padding: 5px 0px 5px 5px;
        border-left: 1px solid #1E1E1E;
    }
    .side-popup:not(.open) {
        width: 30px !important;
    }
    .side-popup:not(.open) .sidebar-left{
        padding-right: 5px;
    }

    /* 왼쪽 영역 */
    .side-popup .sidebar-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        grid-row: span 2; /* 세로 병합 */
        gap: 10px;
    }

    .side-popup .sidebar-text {
        writing-mode: vertical-rl;
        font-size: 11px;
        font-weight: bold;
        text-align: center;
    }

    /* 아이콘 리스트 */
    .side-popup .icon-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        width: 190px;
        padding: 4px 0;
    }

    .side-popup .icon-list img {
        width: 40px;
        height: 40px;
    }

    /* 이미지 (모바일에서도 항상 표시) */
    .popup-image {
        width: 190px;
        height: auto;
        display: block;
        border: 1px solid #1E1E1E;
        align-items: center;
        justify-items: center;
    }

    /* 토글 버튼 */
    .toggle-button {
        width: 100%;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    
    .nav-item,  .video-item{
	    font-size: 14px;
	}
}

@media (min-width: 901px) {
    .fullscreen {
        display: block;
    }
    .logo {
        padding-right: 10px;
        border-right: 1px solid rgba(0, 0, 0, 0.2);
    }
    .icon-menu {
        right: 20px;
        left: auto;
        top: 55px;
        bottom: auto;
        display: flex;
        flex-direction: column; /* 세로 정렬 */
        align-items: flex-end;
    }
    
    .side-popup {
        width: 400px;
        height: 600px;
        left: 50%;
        top: calc(55% - 45px);
        transform: translate(-50%, -50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px;
        box-shadow: 5px 5px 10px #c9c9c9;
    	transition: background .01s ease-in-out;
    }
    .side-popup:not(.open) {
    	top: calc(30% - 45px) !important;
        height: 35px !important;
    }
    
	/* 상단 영역 */
    .side-popup .sidebar-left {
    	width: 95%;
        gap: 10px;
	    display: flex;
	    justify-content: space-between;
	    align-items: center;
	    padding-top: 3px;
	    padding-bottom: 10px;
	    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
	    font-size: 15px;
    }
    
    /* 상단 이미지 (PC에서도 항상 표시) */
    .popup-image {
        width: 95%;
        height: auto;
        display: block;
        border: 1px solid #1E1E1E;
    }

    /* 아이콘 리스트 (가로 정렬) */
    .side-popup .icon-list {
        display: flex;
        gap: 8px;
        width: 95%;
        padding: 5px;
        margin-top: 10px;
    }

    .side-popup .icon-list img {
        width: 50px;
        height: 50px;
    }
}
