/********************event**********************/

/* 確保整個頁面有平滑滾動效果 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    background-color: #000000;
}

/* 網頁主要內容區域置中，寬度 960px */
.content {
    max-width: 960px;
    margin: 0 auto;
    padding: 0px;
}

/* 快速導覽文字 */
.sidebar::before {
    content: "快速導覽";
    color: white;
    font-size: 16px;
    text-align: center;
    opacity: 1; /* 初始可見 */
    transition: opacity 0.3s ease;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    writing-mode: vertical-rl; /* 垂直顯示文字 */
}

/* 桌面版右側側邊欄 */
.sidebar {
    top: 20px;
    height: 38%; /* 固定高度，佔滿整個螢幕 */
    width: 50px;
    position: fixed;
    right: 0;
    background-color: rgba(51, 51, 51, 0.75); /* 75% 透明度 */
    border-radius: 20px 0 0 20px;
    transition: width 0.3s ease, right 0.3s ease;
    overflow-x: hidden;
    overflow-y: hidden;
    padding-top: 20px; /* 調整padding讓內容有足夠空間 */
}

/* 滑過時展開側邊欄，隱藏快速導覽 */
.sidebar:hover {
    width: 140px;
    text-align: center;
}

.sidebar:hover::before {
    opacity: 0;
}


/* 桌面版選項連結 */
.sidebar a {
    padding: 10px 15px;
    text-decoration: none;
    font-size: 18px;
    color: white;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 當側邊欄展開時，文字顯示 */
.sidebar:hover a {
    opacity: 1;
}

.sidebar a:hover {
    background-color: #575757;
}

.sidebar-mobile {display: none;}



/* 內容區域樣式，每個 section 不同顏色 */
.section {
    height: 100vh;
    padding: 20px;
}

/*#section1 { background-color: #FFCCCC; } /* 紅色調 */
/*#section2 { background-color: #CCFFCC; } /* 綠色調 */
/*#section3 { background-color: #CCCCFF; } /* 藍色調 */
/*#section4 { background-color: #FFFFCC; } /* 黃色調 */
/*#section5 { background-color: #FFCCFF; } /* 粉色調 */
/*#section6 { background-color: #CCFFFF; } /* 青色調 */

h2 {
    margin-top: 0;
}

/* 圓形Top按鈕 */
.top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #dd6250;
    color: white;
    border: none;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 9999;
}

.top-btn:hover {
    background-color: #ac2310;
}

/* 手機版側邊欄 */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .sidebar-mobile {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        bottom:0px;
        left: 0;
        width: 100%;
        height: 50px;
        background-color: #333; /* 無透明度 */
        overflow-x: auto;
        white-space: nowrap;
        z-index: 9999;
        padding: 0px 5px;
        position: fixed !important;
    }

    .sidebar-mobile a {
        display: inline-block;
        padding: 10px;
        font-size: 16px;
        color: white;
        text-align: center;
        white-space: nowrap;
    }

    .content {
        margin-top: 80px; /* 手機版內容區域下移，預留側邊欄高度 */
    }


    /* Javascript 或 jQuery 觸發事件，讓滑過後隱藏再出現 */
    .sidebar-mobile:hover {
        transform: translateY(0); /* 滑過時顯示側邊欄 */
    }


    /* 圓形Top按鈕 */
    .top-btn {
        position: fixed;
        bottom: 80px;
        right: 20px;
        width: 50px;
        height: 50px;
        background-color: #dd6250;
        color: white;
        border: none;
        border-radius: 50%;
        text-align: center;
        line-height: 50px;
        font-size: 18px;
        cursor: pointer;
        transition: background-color 0.3s;
        z-index: 9999;
    }

    .top-btn:hover {
        background-color: #ac2310;
    }
}
