:root {
    --hue: 13;
    --sat: 10%;
    --bg: hsl(var(--hue),var(--sat),90%);
    --fg: hsl(var(--hue),var(--sat),10%);
    --hue-success: 126;
    --success1: hsl(var(--hue-success),90%,40%);
    --success2: hsl(var(--hue-success),90%,24%);
    --periwinkle: hsl(240,90%,70%);
    --light-blue: hsl(210,90%,70%);
    --orange: hsl(15,90%,70%);
    --magenta: hsl(300,90%,70%);
    --light-green: hsl(105,40%,70%);
    --light-teal: hsl(150,40%,70%);
    --purple: hsl(270,90%,70%);
    --trans-dur: 0.3s;
}

/* 隱藏未顯示的 Modal */
.modal.fade:not(.show) {
    display: none !important;
}

.modal a,button{
    cursor: pointer;
}
/* 移除上下箭头 */
.modal input[type="number"]::-webkit-inner-spin-button,
.modal input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none; /* 隐藏箭头 */
    margin: 0; /* 防止样式偏移 */
}

.modal .popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 130px; /* 4:3 比例 */
    background: rgba(86, 100, 88, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 20px;
    visibility: hidden;
}

.modal .popup p{
    color: #ffffff;
}

.modal .show {
    visibility: visible;
}

.modal .checkmark {
    font-size: 35px;
    /* color: #e71212; */
}

.modal .btn_1 {
    z-index: 1;
    display: grid;
    place-items: center;
    font-size: 16px;
    text-decoration: none;
    border-radius: 4.375em;
    overflow: hidden;
    position: relative;
    height: 2.7em;
    border: 0;
    border-bottom: 3px solid #e0e0e0;

}

.modal .btn_1::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4.375em;
    background: linear-gradient(-247deg, #aad7b1cc 13%, #d0eab7d4 100%);
    opacity: .5;
    transform: translateX(calc(-160% + 4.375em));
    transition: transform .2s cubic-bezier(.645, .045, .355, 1),opacity .2s linear;
    z-index: -1;
    will-change: transform, opacity;
    
}

.modal .btn_1 span {
    font-size: 1em;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #32352c;;
    text-transform: uppercase;
}

.modal .btn_1 svg {
    margin-left: 10px;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke: currentColor;
    stroke-width: 2;
    transform: translateX(-5px);
    transition: transform .2s cubic-bezier(.645, .045, .355, 1);
    will-change: transform;
}

.modal .btn_1:hover svg {
    transform: none;
}

.modal .btn_1:hover::after {
    transform: none;
    opacity: 1;
}


.login-box .user-box {
    position: relative;
}

.login-box .user-box input {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    color: #2e2e2e;
    margin-bottom: 10px;
    border: none;
    border-bottom: 1px solid #e9e9e9;
    outline: none;
    background: transparent;
}
.login-box .user-box label {
    position: absolute;
    top:0;
    left: 0;
    padding: 10px 0;
    font-size: 16px;
    color: #8d8d8d;
    pointer-events: none;
    transition: .5s;
}

.login-box .user-box input:focus ~ label,
.login-box .user-box input:valid ~ label {
    top: -20px;
    left: 0;
    color: #aaaaaa;
    font-size: 14px;
}

.modal .btn {
    position: relative;
    cursor: pointer;
    text-transform: uppercase;
    overflow: hidden;
}

.modal .btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.modal .btn:hover::before {
    transform: translateX(100%);
}

.modal .spinner {
    color: var(--success2);
    overflow: visible;
    margin: auto;
    width: 6em;
    height: auto;
    transition: color var(--trans-dur);
}
.modal .spinner circle,
.modal .spinner g,
.modal .spinner path {
    animation-duration: 2s;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.modal .spinner-text {
    opacity: 0;
    animation: fadeInText 0.3s ease-in-out forwards;
    animation-delay: 2s; 
}

.modal .spinner__check, .modal .spinner__pop-start, .modal .spinner__worm {
    transform-origin: 24px 24px;
}
.modal .spinner__check {
    animation-name: check;
}
.modal .spinner__pop-dot {
    animation-name: pop-dot;
}
.modal .spinner__pop-dot-group {
    animation-name: pop-dot-group1;
}
.modal .spinner__pop-dot-group + .modal .spinner__pop-dot-group {
    animation-name: pop-dot-group2;
}
.modal .spinner__pop-end {
    animation-name: pop-end;
}
.modal .spinner__pop-start {
    animation-name: pop-start;
}
.modal .spinner__worm {
    animation-name: worm;
}

@media (max-width: 950px) {
    main #Register-Modal{
        padding-right: 0px !important;
        /* padding-left: 0px; */
        display: block;
    }
}

@keyframes fadeInText {
from {
    opacity: 0;
}
to {
    opacity: 1;
}
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: hsl(var(--hue),var(--sat),10%);
        --fg: hsl(var(--hue),var(--sat),90%);
    }

    .modal .spinner {
        color: var(--success1);
    }
}
/* Animations */
@keyframes check {
    from, 64% {
        stroke-dashoffset: -36.7;
        transform: scale(1);
    }
    75%, 77% {
        animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
        stroke-dashoffset: 13.7;
        transform: scale(1);
    }
    79% {
        animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
        stroke-dashoffset: 13.7;
        transform: scale(0.4);
    }
    87% {
        animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0);
        stroke-dashoffset: 13.7;
        transform: scale(1.4);
    }
    93%, to {
        stroke-dashoffset: 13.7;
        transform: scale(1);
    }
}
@keyframes pop-dot {
    from, 80% {
        animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
        transform: translate(0, 6px);
    }
    90%, to {
        transform: translate(0, 0);
    }
}
@keyframes pop-dot-group1 {
    from, 82.5%, 90%, to {
        opacity: 0;
    }
    85%, 87.5% {
        opacity: 1;
    }
}
@keyframes pop-dot-group2 {
    from, 82.5%, to {
        opacity: 0;
    }
    85%, 90% {
        opacity: 1;
    }
}
@keyframes pop-end {
    from {
        animation-timing-function: steps(1, end);
        opacity: 0;
        r: 18px;
        stroke-width: 4px;
    }
    82.5% {
        animation-timing-function: linear;
        opacity: 1;
        r: 18px;
        stroke-width: 4px;
    }
    84%, to {
        opacity: 0;
        r: 19px;
        stroke-width: 3px;
    }
}
@keyframes pop-start {
    from {
        animation-timing-function: steps(1, end);
        opacity: 0;
        transform: scale(0.35);
    }
    76% {
        animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
        opacity: 1;
        transform: scale(0.35);
    }
    82.5% {
        animation-timing-function: steps(1, start);
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1);
    }
}
@keyframes worm {
    from {
        stroke-dashoffset: -51.84;
        transform: rotate(0deg);
    }
    60% {
        stroke-dashoffset: -51.84;
        transform: rotate(481deg);
    }
    64% {
        animation-timing-function: cubic-bezier(0.61, 1, 0.88, 1);
        stroke-dashoffset: -51.84;
        transform: rotate(571deg);
    }
    72.5%, to {
        stroke-dashoffset: -138.23;
        transform: rotate(571deg);
    }
}