﻿/* project1/css/style.css */

body {
    margin: 0;
    background-color: #d3d3d3;
    overflow: hidden; 
    display: flex;
    flex-direction: column; 
    height: 100vh;
}

#zoom-container {
    flex: 1; 
    width: 100%;
    display: flex;
    justify-content: center; 
    align-items: center; 
    overflow: hidden; 
    /* 【追加】スクロールバーを完全に非表示にする（Firefox用） */
    scrollbar-width: none;
    /* 【追加】ブラウザの標準タッチ操作と過剰スクロールを防ぐ */
    touch-action: none;
    overscroll-behavior: contain;
}

/* 【追加】スクロールバーを完全に非表示にする（Chrome, Safari, Edge用） */
#zoom-container::-webkit-scrollbar {
    display: none;
}

#zoom-container.zoomed {
    justify-content: flex-start; 
    align-items: flex-start; 
    overflow: auto; 
    /* 【追加】ズーム時は掴めるカーソルにする */
    cursor: grab;
}

/* 【追加】ドラッグ中（掴んでいる状態）のカーソル */
#zoom-container.zoomed:active {
    cursor: grabbing;
}

.wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease; 
    transform-origin: center center; 
}

.wrapper.zoomed {
    transform-origin: 0 0; 
}

.flip-book {
    display: none; 
    width: 100%;
    height: 100%;
}

.page {
    background-color: #fff;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

/* ページ内部の安全地帯（コンテンツラッパー） */
.page-content {
    position: relative; 
    width: 100%;
    height: 100%;
}

.page-content img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    pointer-events: none; 
    display: block;
}

/* クリッカブルリンク領域の装飾 */
.link-area {
    position: absolute;
    z-index: 10;
    cursor: pointer !important; /* リンクの上では指マークを優先 */
    background-color: transparent; 
}

/* =========================================
   コントロールパネル
   ========================================= */
#controls-wrapper {
    width: 100%;
    background: rgba(255, 255, 255, 0.6); 
    border-top: 1px solid rgba(0, 0, 0, 0.1); 
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0; 
    box-sizing: border-box;
    z-index: 1000;
/*20260326追記レスポンシブ*/
    overflow-x: scroll;
    white-space: nowrap;
}

#controls { display: flex; }
.btn-group { display: flex; align-items: center; }

.btn {
    border: none;
    padding: 8px 20px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    outline: none;
}

.btn:active { opacity: 0.8; }
.btn-grey { background-color: #999999; }
.btn-blue { background-color: #0099ff; }
.btn-left-edge { border-radius: 6px 0 0 6px; }
.btn-right-edge { border-radius: 0 6px 6px 0; }
.btn-border-right { border-right: 1px solid rgba(255, 255, 255, 0.3); } 

.page-input {
    width: 60px;
    text-align: center;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    margin: 0 8px; 
}

/* ページ番号表示用のスタイル */
.page-number-overlay {
    position: absolute;
    bottom: 20px; /* 下端からの距離 */
    left: 50%; /* 左右中央に配置 */
    transform: translateX(-50%); /* 中央寄せの微調整 */
    font-size: 14px; /* 文字サイズ */
    color: #444; /* 文字色（濃いグレー） */
    background-color: rgba(255, 255, 255, 0.8); /* 見やすくするための半透明の白背景 */
    padding: 4px 12px;
    border-radius: 12px; /* 角丸 */
    pointer-events: none; /* クリックやスワイプの邪魔にならないようにする */
    z-index: 10;
    font-family: sans-serif;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* ほんのり影をつける */
}