/* PDF 뷰어 스타일 */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
    position: relative;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

h1 {
    text-align: center;
    margin: 0;
    padding: 15px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #ddd;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.viewer-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #f0f0f0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

#pdf-container {
    position: absolute;
    top: 60px; /* 헤더 높이 */
    left: 0;
    right: 0;
    bottom: 60px; /* 컨트롤 높이 */
    width: 100%;
    height: calc(100% - 120px); /* 헤더와 컨트롤 높이 제외 */
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#pdf-viewer {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#flipbook {
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.page-container {
    background: white;
    overflow: hidden;
    position: relative;
    width: 50%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background-color: #f8f8f8;
    border-top: 1px solid #ddd;
    z-index: 1000;
}

.control-btn {
    margin: 0 5px;
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.control-btn:hover {
    background-color: #0056b3;
}

#page-num {
    margin: 0 15px;
    font-size: 16px;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 99;
    background: rgba(255,255,255,0.8);
    padding: 20px;
    border-radius: 10px;
}

/* 모바일 환경 스타일 */
@media (max-width: 768px) {
    body {
        height: 100vh;
        height: -webkit-fill-available;
        width: 100vw;
        overflow: hidden;
    }
    
    .container {
        height: 100vh;
        height: -webkit-fill-available;
        width: 100vw;
        overflow: hidden;
    }
    
    h1 {
        font-size: 1.2em;
        padding: 8px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(248, 248, 248, 0.8);
    }
    
    .controls {
        padding: 3px;
        height: 40px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background-color: rgba(248, 248, 248, 0.7);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        border-top: none;
    }
    
    .control-btn {
        width: 32px;
        height: 32px;
        padding: 0;
        font-size: 1em;
        background-color: rgba(0, 123, 255, 0.8);
        border-radius: 50%;
    }
    
    #page-num {
        padding: 0 10px;
        background-color: rgba(255, 255, 255, 0.7);
        border-radius: 15px;
        font-size: 14px;
        line-height: 1;
        height: 24px;
        display: flex;
        align-items: center;
    }

    #pdf-container {
        top: 30px; /* 헤더 높이 */
        bottom: 40px; /* 컨트롤 높이 */
        height: calc(100% - 70px); /* 헤더와 컨트롤 높이 제외 */
        width: 100%;
        left: 0;
        right: 0;
        padding: 0;
        margin: 0;
    }

    #pdf-viewer {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
    }

    #flipbook {
        margin: 0;
        padding: 0;
        box-shadow: none;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
    }

    .page-container {
        width: 100%; /* Single page takes full width */
        padding: 0;
        margin: 0;
    }
}

/* 전체 화면 모드에서의 스타일 */
@media (max-width: 768px) and (display-mode: fullscreen) {
    #pdf-container {
        top: 30px;
        bottom: 40px;
        height: calc(100% - 70px);
    }
} 