
        :root {
            --primary-color: #000000; /* HOLA */
            --primary-hover: #FFC32C;
            --bg-dark: #2D2D2D;       /* 深灰色，導覽列背景 */
            --bg-light: #F5F5F5;      /* 頁面背景 */
            --text-light: #FFFFFF;
            --text-dark: #333333;
            --border-color: #E0E0E0;
            --shadow-color: rgba(0, 0, 0, 0.15);
            --sidebar-width: 280px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Outfit', 'Noto Sans TC', sans-serif;
            background-color: var(--bg-light);
            color: var(--text-dark);
            overflow: hidden; /* 防止桌機版整頁滾動 */
        }

        /* 桌面版佈局 */
        .desktop-view {
            display: flex;
            width: 100vw;
            height: 100vh;
        }

        /* 左側固定導覽列 */
        .sidebar {
            width: var(--sidebar-width);
            background-color: var(--bg-dark);
            color: var(--text-light);
            display: flex;
            flex-direction: column;
            padding: 30px 20px;
            z-index: 100;
            box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
            transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), padding 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        }

        /* 折疊按鈕樣式 */
        .toggle-sidebar-btn {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.6);
            font-size: 16px;
            cursor: pointer;
            padding: 5px;
            transition: color 0.3s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
            margin-left: auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .toggle-sidebar-btn:hover {
            color: white;
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 0px;
            margin-bottom: 40px;
            padding-bottom: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            width: 100%;
        }

        .brand-logo {
            display: flex;
            color: white;
            flex-shrink: 0;
            align-items: center;
            justify-content: center;
        }

        .brand-title {
            font-size: 20px;
            font-weight: 700;
            letter-spacing: 1px;
            white-space: nowrap;
            transition: opacity 0.2s ease;
        }

        .nav-menu {
            display: flex;
            flex-direction: column;
            gap: 12px;
            flex-grow: 1;
            width: 100%;
            align-items: center;
        }

        .nav-btn {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 18px;
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 8px;
            color: var(--text-light);
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
            text-align: left;
            text-decoration: none;
            width: 100%;
            height: 50px;
            box-sizing: border-box;
        }

        .nav-btn:hover {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
            transform: translateY(-2px);
        }

        .nav-btn.primary {
            border-color: var(--primary-color);
        }

        .nav-btn.primary:hover {
            background-color:var(--primary-hover);
            border-color: var(--primary-color);
        }

        .nav-icon {
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .nav-text {
            white-space: nowrap;
            transition: opacity 0.2s ease;
        }

        .page-indicator-container {
            margin-top: auto;
            padding: 20px;
            background-color: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            text-align: center;
            width: 100%;
            transition: padding 0.3s ease;
        }

        .page-indicator-label {
            font-size: 12px;
            color: #999;
            margin-bottom: 5px;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .page-indicator-value {
            font-size: 16px;
            font-weight: 700;
            color: #ffffff;
            white-space: nowrap;
            transition: font-size 0.3s ease;
        }

        /* === 收合狀態樣式 (Collapsed) === */
        .desktop-view.collapsed {
            --sidebar-width: 120px;
        }

        .desktop-view.collapsed .sidebar {
            padding: 30px 10px;
            align-items: center;
        }

        .desktop-view.collapsed .brand {
            justify-content: center;
        }

        .desktop-view.collapsed .brand-title,
        .desktop-view.collapsed .nav-text,
        .desktop-view.collapsed .page-indicator-label {
            display: none;
        }

        .desktop-view.collapsed .toggle-sidebar-btn {
            margin-left: 0;
            transform: rotate(180deg);
        }

        .desktop-view.collapsed .nav-btn {
            justify-content: center;
            padding: 0;
            width: 50px;
            height: 50px;
            border-radius: 50%; /* 圓形 icon 按鈕 */
        }

        .desktop-view.collapsed .page-indicator-container {
            padding: 10px 5px;
        }

        .desktop-view.collapsed .page-indicator-value {
            font-size: 13px;
        }

        /* Tooltip 提示 */
        .desktop-view.collapsed .nav-btn {
            position: relative;
        }

        .desktop-view.collapsed .nav-btn::after {
            content: attr(data-tooltip);
            position: absolute;
            left: 65px;
            top: 50%;
            transform: translateY(-50%) translateX(10px);
            background-color: var(--bg-dark);
            color: white;
            padding: 8px 14px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.15);
            z-index: 1000;
        }

        .desktop-view.collapsed .nav-btn:hover::after {
            opacity: 1;
            transform: translateY(-50%) translateX(0px);
        }

        /* 右側主顯示區：自適應無裁切 */
        .main-content {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            position: relative;
            padding: 10px;
            overflow: hidden;
            background-color: var(--bg-light);
        }

        .book-container {
            display: flex;
            position: relative;
            width: 100%;
            height: 100%;
            justify-content: center;
            
            overflow: hidden;
        }

        .book-shadow-wrapper {
            display: flex;
            position: relative;
            width: auto;
            max-width: 2400px;
            height: auto;
            max-height: calc(100vh - 20px); /* 確保高度不會超出螢幕，不被裁切 */
            aspect-ratio: 1.416; /* 使用 PDF 本身的真實高寬比 */
            background-color: transparent;
            transform-origin: center center;
            transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        }

        .book-shadow-wrapper.dragging {
            transition: none !important;
            cursor: grabbing !important;
        }

        .book-shadow-wrapper.zoomed {
            cursor: grab;
        }

        .book-page-wrapper {
            flex: 1;
            height: 100%;
            position: relative;
            background-color: #FFFFFF;
            transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease, border-radius 0.3s ease;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); /* 陰影由各頁自帶 */
        }

        /* 圖片包裝與熱點定位專用 wrapper */
        .page-img-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        .page-img-wrapper img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            display: block;
            user-select: none;
            -webkit-user-drag: none;
        }

        .page-left {
            border-radius: 8px 0 0 8px;
        }
        .page-left .page-img-wrapper img {
            border-radius: 8px 0 0 8px;
        }

        .page-right {
            border-radius: 0 8px 8px 0;
        }
        .page-right .page-img-wrapper img {
            border-radius: 0 8px 8px 0;
        }

        .page-empty {
            visibility: hidden;
            box-shadow: none !important;
        }

        /* 擬真中線書脊影 */
        .book-spine {
            width: 16px;
            height: 100%;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
            background: linear-gradient(to right, 
                rgba(0, 0, 0, 0.12) 0%, 
                rgba(0, 0, 0, 0) 10%,
                rgba(0, 0, 0, 0.04) 50%,
                rgba(0, 0, 0, 0) 90%, 
                rgba(0, 0, 0, 0.12) 100
            );
            pointer-events: none;
        }

        /* 切換動畫 */
        .flipping-left {
            transform: rotateY(-10deg) scale(0.98);
            opacity: 0.6;
        }

        .flipping-right {
            transform: rotateY(10deg) scale(0.98);
            opacity: 0.6;
        }

        /* === Hotspot 熱點樣式 === */
        .hotspot-link {
            position: absolute;
            border: 2px dashed rgba(42, 77, 62, 0.4);
            background-color: rgba(42, 77, 62, 0.04);
            cursor: pointer;
            transition: all 0.3s ease;
            z-index: 20;
            display: block;
            text-decoration: none;
            border-radius: 4px;
        }
        .hotspot-link:hover {
            border-color: var(--primary-color);
            background-color: rgba(42, 77, 62, 0.18);
            box-shadow: 0 0 12px rgba(42, 77, 62, 0.5);
        }
        .hotspot-icon {
            position: absolute;
            right: 4px;
            bottom: 4px;
            width: 20px;
            height: 20px;
            background-color: var(--primary-color);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.25);
            opacity: 0.7;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }
        .hotspot-link:hover .hotspot-icon {
            opacity: 1;
        }

        /* 放大縮小工具列樣式 */
        .zoom-controls {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 8px;
            z-index: 100;
            background: rgba(45, 45, 45, 0.85);
            padding: 6px 12px;
            border-radius: 30px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            transition: all 0.3s ease;
        }

        .zoom-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: transparent;
            border: none;
            color: white;
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            outline: none;
        }

        .zoom-btn:hover {
            background: var(--primary-hover);
            color: var(--primary-color);
        }

        .zoom-indicator {
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 12px;
            font-weight: 600;
            min-width: 48px;
            user-select: none;
        }

        /* 手機版佈局 */
        .mobile-view {
            display: none;
            width: 100vw;
            height: 100vh;
            position: relative;
            background-color: #1A1A1A; /* 暗色底 */
        }

        .mobile-header {
            height: 60px;
            background-color: var(--bg-dark);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            color: white;
            border-bottom: 2px solid var(--primary-color);
        }

        .mobile-brand {
            font-size: 16px;
            font-weight: 700;
        }

        .mobile-back-btn {
            color: white;
            text-decoration: none;
            font-size: 14px;
            border: 1px solid rgba(255,255,255,0.3);
            padding: 6px 12px;
            border-radius: 4px;
        }

        .mobile-scroll-container {
            height: calc(100vh - 120px);
            display: flex;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
        }

        .mobile-slide {
            flex: 0 0 100%;
            width: 100%;
            height: 100%;
            scroll-snap-align: start;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 10px;
        }

        .mobile-slide img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            border-radius: 4px;
            display: block;
        }

        .mobile-footer {
            height: 60px;
            background-color: var(--bg-dark);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .mobile-indicator {
            color: var(--text-light);
            font-size: 16px;
            font-weight: 600;
        }

        .mobile-nav-group {
            display: flex;
            gap: 10px;
        }

        .mobile-btn {
            background-color: var(--primary-color);
            color: white;
            border: none;
            padding: 8px 14px;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
        }

        .mobile-btn:disabled {
            background-color: #555;
            color: #888;
            cursor: not-allowed;
        }

        /* 響應式切換 */
        body.is-mobile-device .desktop-view {
            display: none !important;
        }
        body.is-mobile-device .mobile-view {
            display: flex !important;
            flex-direction: column;
        }
        body.is-desktop-device .desktop-view {
            display: flex !important;
        }
        body.is-desktop-device .mobile-view {
            display: none !important;
        }

        @media (max-width: 767px) {
            body:not(.is-desktop-device) {
                overflow: auto;
            }
            body:not(.is-desktop-device) .desktop-view {
                display: none !important;
            }
            body:not(.is-desktop-device) .mobile-view {
                display: flex !important;
                flex-direction: column;
            }
        }
