@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");

body {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 1080px;
    width: 1920px;
}

.cabinet {
    position: relative;
    width: 100%; /* 추가: 캐비넷 컨테이너의 너비 설정 */
    height: 1210px; /* 추가: 캐비넷 컨테이너의 높이 설정 */
}

.cabinet-bg, .cabinet-handle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: auto;
    pointer-events: none;
}

.episodes {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    top: -240px; /* 추가: 에피소드 컨테이너의 초기 위치 설정 */
    display: flex;
    justify-content: center;
}

.episode {
    position: absolute;
    width: 100%;
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.episode:nth-child(1) {
    top: 0;
    width: 94%;
}

.episode:nth-child(2) {
    top: 120px;
    width: 96%;
}

.episode:nth-child(3) {
    top: 240px;
    width: 98%;
}

.episode:nth-child(4) {
    top: 360px;
}

.episode.active {
    opacity: 0;
    transform: translateY(-50px);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 84.5%;
    top: 60%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    overflow: auto;
}

.modal-content {
    padding: 20px;
    width: 600px;
    height: 720px;
    text-align: center;
    position: relative;
    background-image: url('http://episodes.co.kr/sources/episodes_modal.png'); /* 추가: 모달 배경 이미지 설정 */
    background-size: cover; /* 추가: 배경 이미지 크기 조정 */
    background-repeat: no-repeat; /* 추가: 배경 이미지 반복 방지 */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}