
/*
關閉手機下拉重新整理  避免 iOS Safari 雙擊畫面放大
prevent pull-to-refresh for Chrome 63+
https://usefulangle.com/post/278/html-disable-pull-to-refresh-with-css
*/
body {
    overscroll-behavior: contain;
    height: 100%;
    touch-action: manipulation;
    overscroll-behavior-y: none;
}

/*取消選取*/
* {
    -webkit-user-select: none; /* iOS/Safari/Chrome */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    user-select: none;         /* 標準 */
}
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

h1{
    font-family: "Segoe UI", "Noto Sans TC", sans-serif;
    font-size: 16px;
    color: #fff;
    background: linear-gradient(90deg, #a84fe5, #4c35d1);
    padding: 8px 36px;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin: 2px auto;
    width: fit-content;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}
.modal.show{
    background-color: rgba(49,49,49,0.8);
}
.navbar-nav{
    gap: 16px;
}

@media (max-width: 1400px) {
    .nav-item{
        margin: 8px 0;
    }
    .navbar-nav{
        gap: 0;
    }
}

/* 取消下拉更新 */
/* prevent pull-to-refresh for Safari 16+ */
@media screen and (pointer: coarse) {
    @supports (-webkit-backdrop-filter: blur(1px)) and (overscroll-behavior-y: none)  {
        html {
            min-height: 100.3%;
            overscroll-behavior-y: none;
        }
    }
}
/* prevent pull-to-refresh for Safari 9~15 */
@media screen and (pointer: coarse) {
    @supports (-webkit-backdrop-filter: blur(1px)) and (not (overscroll-behavior-y: none))  {
        html {
            height: 100%;
            overflow-x: hidden;
        }
        body {
            margin: 0;
            max-height: 100%; /* or `height: calc(100% - 16px);` if body has default margin */
            overflow: auto;
            -webkit-overflow-scrolling: touch;
        }
    }
}

.group {
    border: 1px solid #aaa;
    margin: 6px 0;
    padding: 8px;
    cursor: pointer;
    background-color: #fff;
}

.room {
    border: 1px solid #aaa;
    margin: 0 0 16px;
    padding: 8px;
    box-shadow: 3px 4px 4px #aaa;
    cursor: pointer;
    background-color: #fff;
}

.room_people {
    height: 4rem;
    box-shadow: inset 0 0 8px 6px #5dcfbf;
    margin: 0 0.5rem 0.5rem 0;
    text-align: center;
    line-height: 4rem;
    border-radius: 4px;
    width: 100%;
    /*padding: 8px 0;*/
}
.room_item{
    padding: 4px 8px;
    margin-right: 4px;
    background-color: #c33667;
    border-radius: 16px;
    color: #fff;
}
.room_item_value{
    font-size: 20px;
    font-weight: bold;
}
.user_list_user_name{
    padding: 6px 10px;
    background-color: #1e9586;
    color: #fff;
    margin-right: 4px;
    border-radius: 24px;
}
.ui-slider {
    width: 90% !important;
}

.ui-slider-handle {
    width: 2rem !important;
    height: 1.5rem !important;
    text-align: center;
}

.ui-slider-horizontal .ui-slider-handle {
    top: -0.4em !important;
}

.vertical_center > div {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
}

.vertical_center > div > div {
    width: 360px;
}

@media (max-width: 460px) {
    .vertical_center > div > div {
    }

    .vertical_center > div {
    }
}

.area{
    background-color: #ffffff00;
}

#area_join {
    background-image: radial-gradient(circle at 67% 83%, hsla(317, 0%, 96%, 0.05) 0%, hsla(317, 0%, 96%, 0.05) 1%, transparent 1%, transparent 5%, transparent 5%, transparent 100%), radial-gradient(circle at 24% 80%, hsla(317, 0%, 96%, 0.05) 0%, hsla(317, 0%, 96%, 0.05) 27%, transparent 27%, transparent 63%, transparent 63%, transparent 100%), radial-gradient(circle at 23% 5%, hsla(317, 0%, 96%, 0.05) 0%, hsla(317, 0%, 96%, 0.05) 26%, transparent 26%, transparent 82%, transparent 82%, transparent 100%), radial-gradient(circle at 21% 11%, hsla(317, 0%, 96%, 0.05) 0%, hsla(317, 0%, 96%, 0.05) 35%, transparent 35%, transparent 45%, transparent 45%, transparent 100%), radial-gradient(circle at 10% 11%, hsla(317, 0%, 96%, 0.05) 0%, hsla(317, 0%, 96%, 0.05) 21%, transparent 21%, transparent 81%, transparent 81%, transparent 100%), radial-gradient(circle at 19% 61%, hsla(317, 0%, 96%, 0.05) 0%, hsla(317, 0%, 96%, 0.05) 20%, transparent 20%, transparent 61%, transparent 61%, transparent 100%), radial-gradient(circle at 13% 77%, hsla(317, 0%, 96%, 0.05) 0%, hsla(317, 0%, 96%, 0.05) 63%, transparent 63%, transparent 72%, transparent 72%, transparent 100%), radial-gradient(circle at 30% 93%, hsla(317, 0%, 96%, 0.05) 0%, hsla(317, 0%, 96%, 0.05) 33%, transparent 33%, transparent 82%, transparent 82%, transparent 100%), linear-gradient(90deg, rgb(22, 176, 207), rgb(103, 7, 215));
    height: 100%;
    width: 100%;
}
.stage_background {
    background-image: linear-gradient(to right bottom, #ebdcff, #cfeaff, #bef6ff, #c8fef0, #e8ffdc);
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin-left: auto;
    margin-right: auto;
}
.question_count {
    color: #fff;
    font-size: 0.9rem;
    background-color: #d32727;
    width: 24px;
    height: 24px;
    border-radius: 100%;
    padding: 2px;
    box-shadow: 2px 2px 5px #890707;
}

.question_count > span {
    display: inline-block;
    text-align: center;
    width: 21px;
}

/* 用来实现动画的keyframes;  从0度旋转到360度 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.option {
    float: left;
    width: 20px;
    height: 20px;
    border: 2px solid #cccccc;
    margin-right: 10px;
}

.lw {
    text-align: center;
    vertical-align: middle;
}

img.output {
    border: 1px solid green;
}

.btn-close.float-end{
    background-color: #fff;
    margin: 2px 0;
}

*,.btn {
    font-size: 16px;
}
@media (min-width: 576px) {
    .container_mobile {
        max-width: 540px;
        width: 100%;
        padding-right: calc(var(--bs-gutter-x) * .5);
        padding-left: calc(var(--bs-gutter-x) * .5);
        margin-right: auto;
        margin-left: auto;
    }
}
.box{
    display: inline-block;
    border: 1px solid #ddd;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    border-radius: 45px;
}

/* 選單 */
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);
    }

    .mobile-offcanvas .container, .mobile-offcanvas .container-fluid {
        display: block;
    }
}

.nav-item > a {
    color: #000 !important;
}

/* 選單連結文字 */
.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: -4px;
    border: 0;
    transition: all 40ms linear;
    margin: 10px 2px;
}

.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;
}

/* 頒獎台 */
.podium-container {
    text-align: center;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 280px;
    margin-bottom: 20px;
}

.podium-step {
    background: linear-gradient(to bottom, #e9ecef, #dee2e6);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    margin: 0 10px;
}

.second-place {
    width: 150px;
    height: 210px;
    background: linear-gradient(to bottom, #ced4da, #adb5bd);
}

.first-place {
    width: 180px;
    height: 260px;
    background: linear-gradient(to bottom, #ffd700, #daa520);
}

.third-place {
    width: 150px;
    height: 160px;
    background: linear-gradient(to bottom, #cd7f32, #b87333);
}

.place-number {
    position: absolute;
    top: 20px;
    font-size: 2.5rem;
    font-weight: bold;
    color: rgba(0,0,0,0.2);
}

.winner-info {
    padding: 20px 10px;
    width: 100%;
    background-color: rgba(255,255,255,0.8);
}

.winner-name {
    margin-bottom: 5px;
}

.winner-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: #495057;
}

.controls {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.trophy-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.first-place .trophy-icon {
    color: gold;
}

.second-place .trophy-icon {
    color: silver;
}

.third-place .trophy-icon {
    color: #cd7f32;
}

.winner-score {
    font-size: 16px; /* 整體較小字體 */
    line-height: 1.2;
}

.winner-score::first-line {
    font-size: 24px; /* 第一行（1）變大 */
}

/* 玩家列表 */
#id_player_sort {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.player_order_box {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #f1f1f1;
    border-radius: 8px;
    padding: 0 4px;
    height: 36px;
    max-height: 36px;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.1);
}

.player_order_box span:first-child {
    line-height: 1;
}

.player_order_box span:last-child {
    font-weight: bold;
    padding: 0 2px;
    background: white;
    border-radius: 4px;
    text-align: center;
}
/* UsI */
.select2-container--default .select2-results>.select2-results__options{
    max-height: 350px;
}
