@property --paint-pos {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

html, body {
    margin: 0;
    background: rgba(30, 40, 49, 1);
    height: 100%;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
}

.container.has-ad-vertical-lg {
    padding: 0 310px;
    box-sizing: border-box
}

.container.has-a-div {
    padding: 0 170px 140px 170px;
    box-sizing: border-box
}

.container.hide-vertical {
    padding: 140px 0 140px 0 !important;
    box-sizing: border-box
}

* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.rotate {
    transform: rotate(90deg);
    transform-origin: 28.1% 50%;
}

.spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 1));
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 1) 59%);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* loading page */



.a-div-video {
    position: fixed;
    height: 168px;
    width: 300px;
    z-index: 9997;
    bottom: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(38, 37, 43, 1);
}

@-webkit-keyframes animation2 {
    0% {
        width: 0;
    }

    50% {
        width: 100%;
    }

    100% {
        width: 0
    }
}

@-moz-keyframes animation2 {
    0% {
        width: 0
    }

    50% {
        width: 100%;
    }

    100% {
        width: 0
    }
}

@-o-keyframes animation2 {
    0% {
        width: 0
    }

    50% {
        width: 100%;
    }

    100% {
        width: 0
    }
}

@keyframes animation2 {
    0% {
        width: 0
    }

    50% {
        width: 100%;
    }

    100% {
        width: 0
    }
}

@-webkit-keyframes animation1 {
    0% {
        height: 0
    }

    50% {
        height: 100%;
    }

    100% {
        height: 0
    }
}

@-moz-keyframes animation1 {
    0% {
        height: 0
    }

    50% {
        height: 100%;
    }

    100% {
        height: 0
    }
}

@-o-keyframes animation1 {
    0% {
        height: 0
    }

    50% {
        height: 100%;
    }

    100% {
        height: 0
    }
}

@keyframes animation1 {
    0% {
        height: 0
    }

    50% {
        height: 100%;
    }

    100% {
        height: 0
    }
}

.load {
    animation: animation1 2.5s;
    -moz-animation: animation1 2.5s;
    -webkit-animation: animation1 2.5s;
    -o-animation: animation1 2.5s;
    background: #40dbfa;
    /*background: #000;*/
    height: 0;
    width: 10%;
    top: 0;
    animation-iteration-count: infinite;
}

.load-h {
    animation: animation2 2.5s;
    -moz-animation: animation2 2.5s;
    -webkit-animation: animation2 2.5s;
    -o-animation: animation2 2.5s;
    background: #40dbfa;
    /*background: #000;*/
    height: 10%;
    width: 0;
    animation-iteration-count: infinite;
}

.nenly {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10000006;
    display: flex;
    align-items: center;
    justify-content: center;
}

#h2 {
    font-size: 50px;
    color: rgb(64, 219, 250);
    transition: color 1s;
}

@-webkit-keyframes opacity_none {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        display: none;
    }
}

@-moz-keyframes opacity_none {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        display: none;
    }
}

@-o-keyframes opacity_none {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        display: none;
    }
}

@keyframes opacity_none {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        display: none;
    }
}

.yellow {
    color: #ffeb00 !important;
}

.red {
    color: #fc4a5e !important;
}

.green {
    color: #6cff00 !important;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.video {
    -webkit-filter: contrast(1.06) saturate(1.06);
    -moz-filter: contrast(1.06) saturate(1.06);
    -o-filter: contrast(1.06) saturate(1.06);
    -ms-filter: "contrast(1.06) saturate(1.06)";
    filter: contrast(1.06) saturate(1.06);
}



#canvasCoc {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 899;
}

.game {
    position: relative;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-info {
    display: inline-block;
    font-weight: 800;
    text-align: center;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    width: 275px;
    height: 75px;
    /*transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;*/
    color: #000;
    background: url("./images/enter_game_btn_1.png") no-repeat;
    background-position: center center;
    background-size: cover;
    /*border-color: #17a2b8;*/
    /*padding: .5rem 1rem;*/
    line-height: 80px;
    border: 0 solid #fff;
    font-size: 1.25rem;
    /*border-radius: .3rem;*/
}

.btn-info:active {
    background: url("./images/enter_game_btn_2.png") no-repeat;
    background-position: center center;
    background-size: cover;
}


.swal2-container {
    z-index: 99999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.swal2-actions {
    justify-content: center !important;
}

.game-pad {
    text-align: center;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    /*background-color: #fff;*/
}

.game-pad-rocker {
    text-align: center;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    pointer-events: none;
}

.game-pad_large_btn {
    position: absolute;
    width: 6rem;
    height: 2.5rem;
    line-height: 2.5rem;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 30%, #828B9E 100%);
    border-radius: 5px;
    border: 1px solid #828B9E;
    color: #828B9E;
    opacity: 0.8;
}

.game-pad_large_btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.game-pad_menu_btn {
    position: absolute;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 30%, #828B9E 100%);
    border-radius: 50%;
    border: 1px solid #828B9E;
    opacity: 0.8;
}

.game-pad_menu_btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.game-pad_arrow_btn {
    position: absolute;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 30%, #828B9E 100%);
    border: 1px solid #828B9E;
    opacity: 0.8;
}

.game-pad_arrow_btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.game-pad_play_btn {
    color: #828B9E;
    position: absolute;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 30%, #828B9E 100%);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    line-height: 3rem;
    border: 1px solid #828B9E;
    opacity: 0.8;
}

.game-pad_play_btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.keyboard {
    text-align: center;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 999;
    margin: auto;
}

.keyboard-no-pointer {
    pointer-events: none;
}

.keyboard-key {
    position: absolute;
    backdrop-filter: blur(2px);
    font-size: 0.6rem;
    color: #ffffff;
    user-select: none;
    touch-action: none;
    transition: transform 0.08s, box-shadow 0.08s;
}

.keyboard-key-text {
    cursor: grab;
    background: linear-gradient(to top, rgba(92, 109, 130, 0.7), rgba(60, 70, 81, 0.7));
    border-radius: 50%;
}

.keyboard-key-text.dragging {
    cursor: grabbing;
    background: rgba(255, 255, 255, 0.9);
    color: #232830;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    z-index: 9999;
}

.keyboard-key-small {
    transform: translate(-50%, 50%);
    border-radius: 50%;
    height: 1.6rem;
    width: 1.6rem;
    line-height: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.keyboard-key-large {
    border-radius: 1rem;
    height: 2rem;
    width: 4rem;
    line-height: 2rem;
}

.keyboard-key-press {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.keyboard-lock {
    opacity: 0.6;
    text-align: center;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    border-radius: 1.1rem;
    height: 2.2rem;
    line-height: 2.2rem;
    /*width: 14rem;*/
    background-color: rgba(0, 0, 0, 0.4);
    padding: 0 1.1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    border: 1px #fff solid;
}

.keyboard-editor {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    padding: 0 1.1rem;
    display: flex;
    gap: 2rem;
}

.bling {
    animation: blink-scale 2s forwards;
}

@keyframes blink-scale {
    0% {
        background-color: #5c6ac4;
        transform: scale(1);
    }
    25% {
        background-color: #8fa0ff;
        transform: scale(1.5);
    }
    50% {
        background-color: #5c6ac4;
        transform: scale(1);
    }
    75% {
        background-color: #8fa0ff;
        transform: scale(1.5);
    }
    100% {
        background-color: #5c6ac4;
        transform: scale(1);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes blink {
    0%, 100% {
        background-color: #fffa65;
    }
    50% {
        background-color: #ff6a6a;
    }
}

.editor-btn {
    height: 2.2rem;
    line-height: 2.2rem;
    width: 6.5rem;
    border-radius: 1.1rem;
    cursor: pointer;
    color: #fff;
    font-size: 1rem;
    text-align: center;
    display: inline-block;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* 轻微浮起感 */
}

.layout-btn select {
    width: 100%;
    height: 100%;
    padding-left: 10px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: #5a6c78;
    color: #fff;
}

.layout-btn select option {
    color: #fff;
    background: linear-gradient(145deg, #6d8391, #5a6c78);
}

/* Reset 按钮 */
.reset-btn {
    background: linear-gradient(145deg, #5a6c78, #3f4f5b);
}

.reset-btn:hover {
    background: linear-gradient(145deg, #6b7d8b, #495864);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Add Key 按钮 */
.add-key-btn {
    background: linear-gradient(145deg, #47537a, #5c6ac4);
}

.add-key-btn:hover {
    background: linear-gradient(145deg, #5a67a4, #6a78d1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Done 按钮 */
.done-btn {
    background: linear-gradient(145deg, #5c6ac4, #8fa0ff);
}

.done-btn:hover {
    background: linear-gradient(145deg, #6a78d1, #9fb0ff);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.loader {
    position: relative;
    width: 100px;
    height: 100px;
}

/* 渐变圆形（logo 圆） */
.circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(225deg,
    #ffcd85 0%,
    #ffb07c 25%,
    #ff8fa3 40%,
    #8e44ad 100%);
    /*-webkit-mask: radial-gradient(farthest-side, black 90%, transparent 100%);*/
    /*-webkit-mask-composite: destination-in;*/
    mask-composite: intersect;
    position: relative;
    z-index: 1;
}

/* 云朵 */
.cloud {
    z-index: 2;
    position: absolute;
    background: #fff;
    animation: float 3s ease-in-out infinite alternate;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 1);
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: #fff;
    border-radius: 50%;
}

.cloud1 {
    width: 70px;
    height: 30px;
    top: 60px;
    left: -25px;

    border-radius: 15px;
}

.cloud1::before {
    width: 40px;
    height: 40px;
    top: -18px;
    left: 10px;
}

.cloud1::after {
    width: 25px;
    height: 25px;
    top: 14px;
    left: 13px;
}

.cloud2 {
    width: 40px;
    height: 20px;
    top: 60px;
    left: 80px;
    animation-duration: 2s;
    border-radius: 10px;
}

.cloud2::before {
    width: 25px;
    height: 25px;
    top: -10px;
    left: 8px;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

.l-rocker {
    transform: translate(-50%, 50%);
    position: absolute;
    cursor: grab;
    width: 150px;
    height: 150px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}

.l-rocker.dragging {
    cursor: grabbing;
    background: rgba(255, 255, 255, 0.1);
    color: #232830;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    z-index: 9999;
}

.l-rocker-key {
    position: absolute;
    /*background-color: rgba(0, 0, 0, 0.3);*/
    background: linear-gradient(to top, rgba(92, 109, 130, 0.7), rgba(60, 70, 81, 0.7));
    backdrop-filter: blur(2px);
    font-size: 0.6rem;
    color: #ffffff;
}

.l-rocker-key-small {
    transform: translate(-50%, 50%);
    border-radius: 50%;
    height: 1.6rem;
    width: 1.6rem;
    line-height: 1.6rem;
}

.ping {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 16px;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 0 2px 2px 0;
    display: flex;
    font-size: 8px;
    justify-content: center;
    align-items: center;
}



/* 自动贴边逻辑 */
/*@media (hover: none) {*/
/*    #floating-ball {*/
/*        filter: invert(1);*/
/*    }*/
/*}*/

.switch {
    margin: auto 0;
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}


input:checked + .slider {
    background-color: #818cf8;
}

input:checked + .slider::before {
    background-color: white;
    transform: translateX(26px);
}

.reward-btn {
    z-index: 9999;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    opacity: 1;
    border-radius: 17px;
    background: rgba(59, 69, 99, 1);
    padding: 9px 15px;
    border: none;
    cursor: pointer;
}

.loading-video-div{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loading-video-body{
    width: 100%;
    height: auto;

    aspect-ratio: 16 / 9;
    max-width: 100%;
    max-height: 100%;
}

.border-svg {
    position: absolute;
    inset: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    pointer-events: none;
    overflow: visible;
    z-index: 1;
}

.border-rect {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.border-rect.drawing {
    animation: drawBorder 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drawBorder {
    from { stroke-dashoffset: var(--perimeter--perimeter); }
    to   { stroke-dashoffset: 0; }
}