
#id_menu{
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 99999;
}

#top_btn{
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.1s ease;
    z-index: 9999;
}

#top_btn:hover{
    transform: scale(1.1);
    background: #0b5ed7;
}

#top_btn:active{
    transform: scale(0.9);
}

/* select2  =============================  */
/*.select2-container .select2-selection--single {*/
/*    height: 40px;*/
/*}*/

/*.select2-container--default .select2-selection--single .select2-selection__rendered {*/
/*    line-height: 40px;*/
/*}*/

/*.select2-container--default .select2-selection--single .select2-selection__arrow {*/
/*    height: 40px;*/
/*}*/

.select2-container .select2-results > .select2-results__options {
    max-height: 50vh !important;
}

.select2-song-player-dropdown {
    width: 220px !important;
}

.select2-results__option {
    padding: 3px;
    border-bottom: 1px dashed #ddd;
}

/* 滑動 Radio ======================= */
/* 整排 */
 .switch-row{
     display: flex;
     align-items: center;
     /*gap: 20px;*/
 }

/* 功能名稱 */
.switch-title{
    width: 90px;
    font-weight: bold;
    font-size: 18px;
}

/* 開關 */
.switch-group{
    position:relative;
    width:150px;
    height:36px;
    background:#ddd;
    border-radius:999px;
    display:flex;
    overflow:hidden;
}

/* 隱藏 radio */
.switch-group input{
    display:none;
}

/* 按鈕 */
.switch-group label{
    flex:1;
    z-index:2;
    text-align:center;
    line-height:36px;
    cursor:pointer;
    color:#555;
    transition:0.3s;
    user-select:none;
}

/* 滑塊 */
.slider{
    position:absolute;
    top:4px;
    left:4px;
    width:calc(50% - 4px);
    height:calc(100% - 8px);
    background:#4f46e5;
    border-radius:999px;
    transition:0.3s;
    z-index:1;
}

/* 滑動 */
.slider_radio_on:checked ~ .slider{
    transform:translateX(0%);
}

.slider_radio_off:checked ~ .slider{
    transform:translateX(100%);
}

/* 選中文字 */
.slider_radio_on:checked + label{
    color:white;
}

.slider_radio_off:checked + label{
    color:white;
}

/* ============================= */

.player-card {
    background: #1e293b;
    padding: 4px;
    border-radius: 6px;
    box-shadow: 2px 2px 4px 2px rgba(0,0,0,0.4);
    min-height: 114px;
}
.progress-wrap {
    height: 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    cursor: pointer;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px;
    width: 0;
    position: relative;
    transition: width 0.1s linear;
}
.progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -4px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}
.progress-wrap:hover .progress-bar::after {
    opacity: 1;
}
.btn-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.btn-play:hover {
    transform: scale(1.05);
}
.btn-icon {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 4px;
    transition: color 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
}
.btn-icon:hover {
    color: #fff;
}
.vol-slider {
    -webkit-appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    outline: none;
}
.vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}
.cover-img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
}

@media (min-width: 576px) {
    .controls-fixed {
        width: 280px;
        flex-shrink: 0;
        padding: 17px 4px;
    }
}

/* ========================= */

/* modal 影片 */
/* --------------------------- */
/* modal-body 整體 */
.movie_modal-body {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #000;
}

/* --------------------------- */
/* movieTitle */
#movieTitle {
    padding: 8px 16px;
    color: #fff;
    font-size: 1.25rem;
    text-align: center;
}

/* --------------------------- */
/* movie-content：影片區 */
.movie-content {
    flex-grow: 1; /* 撐滿剩餘空間 */
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 80vh; /* 可依需求調整 */
}

/* videoWrapper */
#videoWrapper {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* video 本體 */
#videoWrapper video {
    max-width: 100%;
    max-height: calc(100vh - 90px);
    background: #000;
}

/* --------------------------- */
/* 橫向影片 */
.video-landscape video {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
}

/* 直向影片 */
.video-portrait video {
    aspect-ratio: 9 / 16;
    width: auto;
    height: 100%;
}

/* --------------------------- */
/* modal-header 管理按鈕 + close */
.movie-header .d-flex {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.movie-header .btn-close {
    margin-left: auto; /* 推到右側 */
    height: 36px;
    width: 36px;
}

/* 管理按鈕 */
.movie-header .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* --------------------------- */
/* modal-footer 可選 */
.modal-footer {
    border: 0;
    padding: 4px 16px;
    text-align: center;
    font-size: 0.875rem;
    color: #ccc;
}

/* --------------------------- */
/* 疊在 a 上面 */
.ImageCheckbox {
    position: absolute;
    inset: 0;               /* top/right/bottom/left = 0 */
    z-index: 10;
}

/* 半透明遮罩 */
.ImageCheckbox .mask {
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0.5;
}

/* checkbox 區塊 */
.ImageCheckbox .checkbox-box {
    position: absolute;
    top: 10px;
    left: 28px;
    background: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    pointer-events: auto;  /* checkbox 可以點 */
}

.ImageCheckbox label{
    background: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

body.offcanvas-active {
    overflow: hidden;
}

.offcanvas-header {
    display: none;
}

.screen-darken {
    height: 100%;
    width: 0%;
    z-index: 30;
    position: fixed;
    top: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    background-color: rgba(34, 34, 34, 0.6);
    transition: opacity .2s linear, visibility 0.2s, width 2s ease-in;
}

.screen-darken.active {
    z-index: 10;
    transition: opacity .3s ease, width 0s;
    opacity: 1;
    width: 100%;
    visibility: visible;
}

.page_title {
    display: none;
}

.menu_bar{
    display: none;
    position: fixed;
    z-index: 1000;
    background-color: rgba(224, 224, 224, 0.9);
    width: 100%;
    /*padding: 0.5rem 1rem 0.75rem;*/
    top: 0;
}

@media all and (max-width: 991px) {

    #id_albums_container{
        margin-top: 3.5rem;
    }

    .navbar-nav {
        margin-top: 1rem;
    }
    .menu_bar {
        /*padding: 0 1rem 0.25rem;*/
    }
    .page_title {
        display: inline-block;
    }

    .offcanvas-header {
        display: block;
    }

    .mobile-offcanvas {
        visibility: hidden;
        transform: translateX(-100%);
        border-radius: 0;
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 1200;
        width: 80%;
        overflow-y: scroll;
        overflow-x: hidden;
        transition: visibility .3s ease-in-out, transform .3s ease-in-out;
    }

    .mobile-offcanvas.show {
        visibility: visible;
        transform: translateX(0);
    }

    .mobile-offcanvas .container, .mobile-offcanvas .container-fluid {
        display: block;
    }
    .menu_bar {
        display: block !important;
    }
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.navbar-dark .navbar-nav .nav-link.active, .navbar-dark .navbar-nav .show>.nav-link {
    background-color: #fff6;
}
#svg_logo path{
    fill: #f00;
}
#drag-area {
    width: 100%;
    border: 3px dotted #0B85A1;
    color: #92AAB0;
    height: 80px;
    line-height: 80px;
    text-align: center;
    border-radius: 0.5rem;
}
.progressBar{
    height: 22px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.progressBar div{
    color: #fff;
    text-align: right;
    line-height: 22px;
    width: 0;
    background-color: #0ba1b5;
    border-radius: 3px;
}
.filename{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.box{
    height: 300px;
    border: 1px solid rgba(214, 214, 214, 0.8);
    position: relative;
}
.cover_text {
    width: 100%;
    right: 0;
    font-size: .8rem;
    word-wrap: break-word;
    position: absolute;
    color: #000;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.75);
    padding: 2px 8px;
    word-break: break-all;
}
.cover_text>.Date{
    font-size: 1rem;
    font-weight: bold;
}

.text {
    width: 100%;
    font-size: .8rem;
    word-wrap: break-word;
    position: relative;
    color: #000;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.75);
    padding: 2px 8px;
    word-break: break-all;
    max-width: 300px;
}

section{
    margin-top: 0;
}

#albums_title{
    font-size: 1.25rem;
}

@media all and (max-width: 992px) {
    section{
        /**/
    }
    .dropdown-item{
        padding: 0.5rem 1rem;
        margin: 0.25rem auto;
    }

    #albums_title {
        margin-top: 38px;
    }
}

fieldset{
    border: 1px solid #999;
    padding: 1rem;
}
legend{
    float: none;
    width: auto;
    padding: 0 0.5rem;
    margin: 0;
}
.movie{
    border: 1px solid #999;
}

.gallery>a{
    /*max-width: 300px;*/
    /*max-height: 300px;*/
}
.gallery>a>img{
    /*max-width: 300px;*/
    /*max-height: 300px;*/
    /*margin-bottom: -23px;*/
}

.photo_box{
    margin: 4px;
}
.big_checkbox{
    transform: scale(1.3);
}

[data-cropped] img {
    height: 300px;
    object-fit: cover;
    width: auto;
}

@media (max-width: 420px) {
    /*.gallery {*/
    /*    display: grid;*/
    /*    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); !* 每列寬度 160px *!*/
    /*    grid-gap: 8px; !* 圖片間距 *!*/
    /*    justify-content: center;*/
    /*}*/

    /*.gallery img {*/
    /*    width: 170px;  !* 固定寬度 *!*/
    /*    height: auto;  !* 高度自適應 *!*/
    /*    object-fit: cover; !* 確保圖片適應框架 *!*/
    /*    border-radius: 8px; !* 圖片圓角（可選） *!*/
    /*    display: block; !* 避免圖片有底部空隙 *!*/
    /*    margin: 0 auto;*/
    /*}*/

    /* 瀑布流 順序會改變 */
    /*.gallery {*/
    /*    column-count: 2; !* 設置為 2 欄 *!*/
    /*    column-gap: 8px;*/
    /*}*/

    /*.gallery img {*/
    /*    width: 100%; !* 讓圖片適應欄寬 *!*/
    /*    height: auto;*/
    /*    margin-bottom: 8px; !* 讓圖片間距一致 *!*/
    /*    display: block;*/
    /*    border-radius: 8px;*/
    /*}*/

}

.pswp__counter {
    margin: 0 !important;
    margin-inline-start: unset;
    width: 60px;
    height: 60px;
    line-height: 60px;
}
.pswp__button--zoom {
    display: none !important;
}
.pswp__button{
    width: 42px !important;
    line-height: 60px;
    padding: 0 8px;
    text-align: center;
}

.pswp__top-bar .pswp__button:hover{
    padding: 0 !important;
}

.pswp__custom-caption {
    background: rgba(75, 150, 75, 0.75);
    font-size: 16px;
    color: #fff;
    width: calc(100% - 32px);
    max-width: 400px;
    padding: 2px 8px;
    border-radius: 4px;
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
}
.pswp__custom-caption a {
    color: #fff;
    text-decoration: underline;
}
.hidden-caption-content {
    display: none;
}

/* 讓年份排在月份前面 */
.flatpickr-current-month {
    display: flex !important;
    flex-direction: row-reverse; /* 反轉排序 */
    justify-content: center;
    align-items: center;
}

.flatpickr-current-month .flatpickr-month {
    margin-left: 5px; /* 月份與年份間距 */
}

/* 正方形 */
.gallery img {
    object-fit: cover; /* 確保圖片適應框架 */
    border-radius: 8px; /* 圖片圓角（可選） */
    display: block; /* 避免圖片有底部空隙 */
    margin: 0 auto;
}

@media (max-width: 400px) {
    .photo-wrapper {
        width: 45vw; /* 正方形尺寸，可改 */
    }
}
@media (max-width: 200px) {
    .photo-wrapper {
        width: 100vw; /* 正方形尺寸，可改 */
    }
}
@media (min-width: 401px) {
    .photo-wrapper {
        width: 200px; /* 正方形尺寸，可改 */
    }
}

.photo, .movie {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;       /* ★ 關鍵：正方形 */
    overflow: hidden;
}

.photo_box {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* 裁切填滿，不變形 */
    display: block;
}

/* 文字疊在圖片下方或圖片內（可調） */
.photo .text, .movie .text {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 14px;
    padding: 4px 6px;
    box-sizing: border-box;
}

/* checkbox 疊在圖片上 */
.ImageCheckbox {
    position: absolute;
    inset: 0;
}

.gps_image{
    width: 100px;
}
.gps_image img{
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.modal {
    z-index: 200000 !important;
}

.modal-backdrop {
    z-index: 199000 !important;
}

/* 選單 */
body.offcanvas-active {
    overflow: hidden;
}

.offcanvas-header {
    display: none;
}
.screen-darken {
    height: 100%;
    width: 0;
    z-index: 30;
    position: fixed;
    top: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    background-color: rgba(34, 34, 34, 0.6);
    transition: opacity .1s linear, visibility 0.1s, width 2s ease-in;
}
.screen-darken.active {
    z-index: 10;
    transition: opacity .1s ease, width 0s;
    opacity: 1;
    width: 100%;
    visibility: visible;
}

.mobile-offcanvas.show {
    display: block;
    visibility: visible;
    transform: translateX(0);
}

@media all and (max-width: 1399px) {
    .offcanvas-header {
        display: block;
    }

    .mobile-offcanvas {
        visibility: hidden;
        transform: translateX(-100%);
        border-radius: 0;
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 1200;
        width: 80%;
        overflow-y: auto;
        overflow-x: hidden;
        transition: visibility .1s ease-in-out, transform .1s ease-in-out;
    }

    .mobile-offcanvas.show {
        display: block;
        /*visibility: visible;*/
        transform: translateX(0);
        z-index: 100000;
    }

    .mobile-offcanvas .container, .mobile-offcanvas .container-fluid {
        display: block;
    }
}

.nav-item > a {
    color: #000 !important;
}

@media (max-width: 1400px) {
    .nav-item{
        margin: 8px 0;
    }
    .navbar-nav{
        gap: 0;
    }
}

/* 選單連結文字 */
.link_text {
    border-bottom: 1px #fff solid;
    padding-bottom: 1px;
}

.nav-link {
    background-color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 2px 2px 2px, 2px 2px 2px, 2px 2px 2px, 2px 2px 2px, 2px 2px 2px;
}

/*
 btn3d
 https://codepen.io/bepctak/pen/ojXjzR
*/
.btn3d {
    position: relative;
    top: -6px;
    border: 0;
    transition: all 20ms linear;
}

.btn3d:active:focus,
.btn3d:focus:hover,
.btn3d:focus {
    -moz-outline-style: none;
    outline: medium none;
}

.btn3d:active,
.btn3d.active {
    top: 2px;
}

.btn3d.btn-white {
    box-shadow: 0 0 0 1px #ebebeb inset, 0 0 0 2px rgba(255, 255, 255, 0.10) inset, 0 8px 0 0 #f5f5f5, 0 8px 8px 1px rgba(0, 0, 0, .2);
    background-color: #fff;
}

.btn3d.btn-white:active,
.btn3d.btn-white.active {
    box-shadow: 0 0 0 1px #ebebeb inset, 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 1px 3px 1px rgba(0, 0, 0, .1);
    background-color: #fff;
}

.btn3d.btn-default {
    box-shadow: 0 0 0 1px #ebebeb inset, 0 0 0 2px rgba(255, 255, 255, 0.10) inset, 0 8px 0 0 #BEBEBE, 0 8px 8px 1px rgba(0, 0, 0, .2);
    background-color: #f9f9f9;
}

.btn3d.btn-default:active,
.btn3d.btn-default.active {
    box-shadow: 0 0 0 1px #ebebeb inset, 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 1px 3px 1px rgba(0, 0, 0, .1);
    background-color: #f9f9f9;
}

.btn3d.btn-dark {
    color: #ffffff;
    box-shadow: 0 0 0 1px #606060 inset, 0 0 0 2px rgba(255, 255, 255, 0.10) inset, 0 8px 0 0 #303030, 0 8px 8px 1px rgba(0, 0, 0, .2);
    background-color: #4d4d4d;
}

.btn3d.btn-dark:active,
.btn3d.btn-dark.active {
    color: #ffffff;
    box-shadow: 0 0 0 1px #606060 inset, 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 1px 3px 1px rgba(0, 0, 0, .1);
    background-color: #4d4d4d;
}

.btn3d.btn-primary {
    box-shadow: 0 0 0 1px #417fbd inset, 0 0 0 2px rgba(255, 255, 255, 0.15) inset, 0 8px 0 0 #4D5BBE, 0 8px 8px 1px rgba(0, 0, 0, 0.5);
    background-color: #4274D7;
}

.btn3d.btn-primary:active,
.btn3d.btn-primary.active {
    box-shadow: 0 0 0 1px #417fbd inset, 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 1px 3px 1px rgba(0, 0, 0, 0.3);
    background-color: #4274D7;
}

.btn3d.btn-success {
    box-shadow: 0 0 0 1px #31c300 inset, 0 0 0 2px rgba(255, 255, 255, 0.15) inset, 0 8px 0 0 #5eb924, 0 8px 8px 1px rgba(0, 0, 0, 0.5);
    background-color: #78d739;
}

.btn3d.btn-success:active,
.btn3d.btn-success.active {
    box-shadow: 0 0 0 1px #30cd00 inset, 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 1px 3px 1px rgba(0, 0, 0, 0.3);
    background-color: #78d739;
}

.btn3d.btn-info {
    box-shadow: 0 0 0 1px #00a5c3 inset, 0 0 0 2px rgba(255, 255, 255, 0.15) inset, 0 8px 0 0 #348FD2, 0 8px 8px 1px rgba(0, 0, 0, 0.5);
    background-color: #39B3D7;
}

.btn3d.btn-info:active,
.btn3d.btn-info.active {
    box-shadow: 0 0 0 1px #00a5c3 inset, 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 1px 3px 1px rgba(0, 0, 0, 0.3);
    background-color: #39B3D7;
}

.btn3d.btn-warning {
    box-shadow: 0 0 0 1px #d79a47 inset, 0 0 0 2px rgba(255, 255, 255, 0.15) inset, 0 8px 0 0 #D79A34, 0 8px 8px 1px rgba(0, 0, 0, 0.5);
    background-color: #FEAF20;
}

.btn3d.btn-warning:active,
.btn3d.btn-warning.active {
    box-shadow: 0 0 0 1px #d79a47 inset, 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 1px 3px 1px rgba(0, 0, 0, 0.3);
    background-color: #FEAF20;
}

.btn3d.btn-danger {
    box-shadow: 0 0 0 1px #b93802 inset, 0 0 0 2px rgba(255, 255, 255, 0.15) inset, 0 8px 0 0 #AA0000, 0 8px 8px 1px rgba(0, 0, 0, 0.5);
    background-color: #D73814;
}

.btn3d.btn-danger:active,
.btn3d.btn-danger.active {
    box-shadow: 0 0 0 1px #b93802 inset, 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 1px 3px 1px rgba(0, 0, 0, 0.3);
    background-color: #D73814;
}

.btn3d.btn-magick {
    color: #fff;
    box-shadow: 0 0 0 1px #9a00cd inset, 0 0 0 2px rgba(255, 255, 255, 0.15) inset, 0 8px 0 0 #9823d5, 0 8px 8px 1px rgba(0, 0, 0, 0.5);
    background-color: #bb39d7;
}

.btn3d.btn-magick:active,
.btn3d.btn-magick.active {
    box-shadow: 0 0 0 1px #9a00cd inset, 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 1px 3px 1px rgba(0, 0, 0, 0.3);
    background-color: #bb39d7;
}
