:root {
    --bg-color: #2c2c2c;
    --text-color: #ffffff;
    --accent-color: #d4af37;
    /* Gold for premium feel */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    /* Prevent scrolling */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.book-wrapper {
    /* Adjust size as needed, keep aspect ratio roughly consistent with A4 or menu size */
    width: 90vw;
    height: 80vh;
    /* Reduced from 85vh to prevent vertical overflow */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    /* Add vertical padding to wrapper */
    box-sizing: border-box;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.controls {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 30px;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.nav-btn {
    background: none;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 5px 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
}

/* Page Styles */
.my-page {
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: inset -1px 0 5px rgba(0, 0, 0, 0.05);
}

.page-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 画像全体を表示 */
    /* object-fit: cover; // 隙間なく埋めたい場合はこちら */
}