body {
    background-color: #f0f0f0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    min-height: 100vh;
    height: 100vh;
    /* iOS Safari 100vh 보정 */
    height: -webkit-fill-available;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
    overflow: hidden;
}

/* ============ 로고 (좌상단 고정) ============ */
#logo-link {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    display: flex;
    align-items: center;
}

#logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ============ 햄버거 버튼 (우상단 고정) ============ */
#menu-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 34px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

#menu-toggle.active span:nth-child(1) {
    -webkit-transform: rotate(45deg) translate(5px, 5px);
    -ms-transform: rotate(45deg) translate(5px, 5px);
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active span:nth-child(3) {
    -webkit-transform: rotate(-45deg) translate(6px, -6px);
    -ms-transform: rotate(-45deg) translate(6px, -6px);
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============ 드롭다운 메뉴 ============ */
#menu-dropdown {
    position: fixed;
    top: 55px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    /* backdrop-filter fallback - older browsers get solid background */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    -webkit-box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    display: none;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    min-width: 160px;
    z-index: 1000;
}

#menu-dropdown.show {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

#menu-dropdown a,
#menu-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    background: transparent;
    border: none;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

#menu-dropdown a:hover,
#menu-dropdown button:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ============ 푸터 ============ */
#site-footer {
    position: fixed;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    color: #888;
    z-index: 100;
}

/* 책이 들어갈 컨테이너 */
#book-container {
    position: relative;
    /* 초기 사이즈, JS로 제어됨 */
    width: auto;
    height: 95vh;
    transition: width 0.3s, height 0.3s;
}

/* 실제 책 요소 */
#flipbook {
    width: 100%;
    height: 100%;
}

/* 각 페이지 스타일 */
#flipbook .page {
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    background-size: 100% 100%;
    /* 이미지가 페이지에 꽉 차게 */
    background-repeat: no-repeat;
    background-position: center;
}

/* 내비게이션 버튼 */
.nav-btn {
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 40px 12px;
    cursor: pointer;
    z-index: 100;
    font-size: 18px;
    border-radius: 5px;
    -webkit-transition: opacity 0.3s, background 0.3s;
    -o-transition: opacity 0.3s, background 0.3s;
    transition: opacity 0.3s, background 0.3s;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 내비게이션 버튼 위치 (브라우저 끝에 고정) */
#prev {
    position: fixed;
    left: 0;
}

#next {
    position: fixed;
    right: 0;
}

/* 모바일 등 작은 화면에서 버튼 스타일 조정 */
@media (max-width: 768px) {
    .nav-btn {
        padding: 30px 10px;
        font-size: 14px;
        background: rgba(0, 0, 0, 0.3);
    }
}