/* style.css - 共享樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft JhengHei', 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
}
@font-face {
    font-family: "FZFeiFTFU_Zhun";
    src: url("fonts/FZFeiFTFU_Zhun.eot"); /* IE9 */
    src: url("fonts/FZFeiFTFU_Zhun.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
    
    url("fonts/FZFeiFTFU_Zhun.woff") format("woff"), /* chrome、firefox */
    url("fonts/FZFeiFTFU_Zhun.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+ */
    
    url("fonts/FZFeiFTFU_Zhun.svg#FZFeiFTFU_Zhun") format("svg"); /* iOS 4.1- */

}
img {
    width: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    overflow: auto;
    padding: 18px;
}
main{
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}
/* 載入動畫樣式 */
.loading-div {
    /* position: absolute; */
    width: 100%;
    max-width: 420px;
    height: 170px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.loader-container {
    position: relative;
    width: 128px;
    height: 128px;
}

.la-line-spin-clockwise-fade, .la-line-spin-clockwise-fade > li {
    position: relative;
    box-sizing: border-box;
}

.la-line-spin-clockwise-fade {
    display: block;
    font-size: 0;
    color: #fff;
    width: 100%;
    height: 100%;
}

.la-line-spin-clockwise-fade > li {
    display: inline-block;
    float: none;
    background-color: currentColor;
    border: 0 solid currentColor;
}

.la-line-spin-clockwise-fade > li {
    position: absolute;
    width: 40px;
    height: 55px;
    margin: 2px;
    margin-top: -5px;
    margin-left: -1px;
    border-radius: 30px;
    animation: line-spin-clockwise-fade 3.5s infinite ease-in-out;
}

/* 新增殘影效果 */
.la-line-spin-clockwise-fade > li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    opacity: 0.5;
    filter: blur(5px);
    z-index: -1;
}

.la-line-spin-clockwise-fade > li:nth-child(1) {
    top: 15%;
    left: 50%;
    background-color: rgba(255, 170, 1, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transform: rotate(0deg);
    animation-delay: -1.2s;
    --rotation: 0deg;
}
.la-line-spin-clockwise-fade > li:nth-child(1)::before {
    background-color: rgba(255, 170, 1, 0.4);
}

.la-line-spin-clockwise-fade > li:nth-child(2) {
    top: 25.2512626585%;
    left: 74.7487373415%;
    background-color: rgba(241, 234, 12, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    animation-delay: -1.0s;
    --rotation: 45deg;
}
.la-line-spin-clockwise-fade > li:nth-child(2)::before {
    background-color: rgba(241, 234, 12, 0.4);
}

.la-line-spin-clockwise-fade > li:nth-child(3) {
    background-color: rgba(102, 169, 3, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    top: 50%;
    left: 85%;
    transform: rotate(90deg);
    animation-delay: -0.8s;
    --rotation: 90deg;
}
.la-line-spin-clockwise-fade > li:nth-child(3)::before {
    background-color: rgba(102, 169, 3, 0.4);
}

.la-line-spin-clockwise-fade > li:nth-child(4) {
    background-color: rgba(2, 177, 118, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    top: 74.7487373415%;
    left: 74.7487373415%;
    transform: rotate(135deg);
    animation-delay: -0.6s;
    --rotation: 135deg;
}
.la-line-spin-clockwise-fade > li:nth-child(4)::before {
    background-color: rgba(2, 177, 118, 0.4);
}

.la-line-spin-clockwise-fade > li:nth-child(5) {
    background-color: rgba(0, 177, 227, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    top: 84.9999999974%;
    left: 50.0000000004%;
    transform: rotate(180deg);
    animation-delay: -0.4s;
    --rotation: 180deg;
}
.la-line-spin-clockwise-fade > li:nth-child(5)::before {
    background-color: rgba(0, 177, 227, 0.4);
}

.la-line-spin-clockwise-fade > li:nth-child(6) {
    background-color: rgba(144, 68, 199, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    top: 74.7487369862%;
    left: 25.2512627193%;
    transform: rotate(225deg);
    animation-delay: -0.2s;
    --rotation: 225deg;
}
.la-line-spin-clockwise-fade > li:nth-child(6)::before {
    background-color: rgba(144, 68, 199, 0.4);
}

.la-line-spin-clockwise-fade > li:nth-child(7) {
    background-color: rgba(207, 0, 110, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    top: 49.9999806189%;
    left: 15.0000039834%;
    transform: rotate(270deg);
    animation-delay: 0s;
    --rotation: 270deg;
}
.la-line-spin-clockwise-fade > li:nth-child(7)::before {
    background-color: rgba(207, 0, 110, 0.4);
}

.la-line-spin-clockwise-fade > li:nth-child(8) {
    background-color: rgba(255, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    top: 25.2506949798%;
    left: 25.2513989292%;
    transform: rotate(315deg);
    animation-delay: 0.2s;
    --rotation: 315deg;
}
.la-line-spin-clockwise-fade > li:nth-child(8)::before {
    background-color: rgba(255, 0, 0, 0.4);
}

/* 修改動畫關鍵幀，新增殘影效果 */
@keyframes line-spin-clockwise-fade {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--rotation)) scale(1);
        filter: blur(0);
    }
    25% {
        opacity: 0.7;
        transform: translate(-50%, -50%) rotate(calc(var(--rotation) + 90deg)) scale(1.1);
        filter: blur(2px);
    }
    50% {
        opacity: 0.4;
        transform: translate(-50%, -50%) rotate(calc(var(--rotation) + 180deg)) scale(1.2);
        filter: blur(4px);
    }
    75% {
        opacity: 0.7;
        transform: translate(-50%, -50%) rotate(calc(var(--rotation) + 270deg)) scale(1.1);
        filter: blur(2px);
    }
}   

.loading-logo-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 42px;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8), 
                0 0 12px rgba(255, 255, 255, 0.5);
    z-index: 10;
    white-space: nowrap;
    font-family: "FZFeiFTFU_Zhun";
}

/* 表單容器樣式 */
.auth-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.auth-header {
    width: 100%;
    margin: 0 auto;
    padding: 15px 0 25px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-header h1 {
    font-size: 28px;
    color: #FFF;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.auth-header p {
    color: #EEE;
    font-size: 16px;
    opacity: 0.8;
}

.auth-form {
    width: 100%;
    padding: 20px 0 10px;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    padding-left: 5px;
}

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    z-index: 2;
    font-size: 16px;
}

.input-field {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    color: #FFF;
    position: relative;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-field:focus {
    border-color: #8bcede;
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 206, 222, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.input-with-icon i.password-toggle {
    position: absolute;
    left: calc(100% - 30px);
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 16px;
    z-index: 2;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #8bcede;
}

.phone-format-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
    padding-left: 5px;
}

.h-captcha-container {
    margin: 25px 0 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.h-captcha {
    display: flex;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    min-height: 78px;
}
.h-captcha iframe{
    width: 600px!important;
    border-radius: 0!important;
    /* background-color: rgb(51, 51, 51)!important; */
    background: #fff!important;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #8bcede, #9a76f6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    margin-top: 5px;
}
.submit-btn i{
    margin-right: 8px;
}
.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #9a76f6, #8bcede);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn.loading {
    opacity: 0.8;
    pointer-events: none;
}

.submit-btn.loading .btn-spinner {
    display: inline-block;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

.error-message {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
    display: none;
    padding: 8px 12px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 4px;
    border-left: 3px solid #ff6b6b;
}

.success-message {
    color: #51cf66;
    font-size: 14px;
    margin-top: 15px;
    display: none;
    padding: 10px 15px;
    background: rgba(81, 207, 102, 0.1);
    border-radius: 6px;
    border-left: 3px solid #51cf66;
    text-align: center;
}
.auth-forgot{
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    justify-content: end;
}
.auth-forgot a{
    font-size: 13px; 
    color: #8bcede;
    text-decoration: none;
}
.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    width: 100%;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer a {
    color: #8bcede;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #9a76f6;
    text-decoration: underline;
}

/* 第三方登入樣式 */
.social-login {
    width: 100%;
    margin-top: 20px;
}

.social-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.7);
}

.social-divider::before,
.social-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.social-divider span {
    padding: 0 15px;
    font-size: 14px;
}

.social-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}
.social-btn a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.social-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.social-btn.line {
    background: rgba(255, 255, 255, 0.15);
}

.social-btn.line:hover {
    background: rgba(6, 184, 75, 0.25);
}

.social-btn.google {
    background: rgba(255, 255, 255, 0.15);
}

.social-btn.google:hover {
    background: rgba(66, 133, 244, 0.25);
}

.social-icon {
    width: 32px;
    height: 32px;
    margin-right: 8px;
}

/* 密碼強度指示器 */
.password-strength {
    margin-top: 8px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.password-strength-text {
    font-size: 12px;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.7);
}
.code-input-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #FFF;
    transition: all 0.3s ease;
}

.code-input:focus {
    border-color: #8bcede;
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 206, 222, 0.2);
    background: rgba(255, 255, 255, 0.12);
}
.reset-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    width: 100%;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reset-footer a {
    color: #8bcede;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.reset-footer a:hover {
    color: #9a76f6;
    text-decoration: underline;
}
.password-strength, 
.password-strength-text {
    display: none; /* 預設隱藏密碼強度指示器 */
}
.error-field {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
}

.error-container {
    border: 1px solid #e74c3c;
    border-radius: 8px;
    padding: 10px;
}
/* 響應式設計 */
@media screen and (max-width: 480px) {
    .loading-div {
        height: 150px;
        margin-bottom: 20px;
    }
    
    .loading-logo-text {
        font-size: 36px;
    }
    
    .auth-container {
        max-width: 100%;
        padding: 20px 15px;
    }
    .auth-header h1{
        font-size: 24px;
    }
    .auth-form {
        padding: 15px 0 5px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .h-captcha {
        transform-origin: center left;
    }
    
    .social-buttons {
        /* flex-direction: column; */
        gap: 10px;
    }
    .h-captcha iframe{
        width: 100%!important;
    }
}
@media screen and (max-width: 376px) {
    .auth-header h1{
        font-size: 20px;
    }
    .auth-header p{
        font-size: 14px;
    }
    .form-group label{
        font-size: 13px;
    }
    .input-field{
        font-size: 13px;
    }
    .social-btn{
        padding: 6px;
        font-size: 13px;
    }
}
@media screen and (max-width: 321px) {
    .loading-div {
        height: 90px;
        margin-bottom: 20px;
    }
    .loader-container {
        width: 65px;
        height: 65px;
    }
    .la-line-spin-clockwise-fade > li {
        position: absolute;
        width: 20px;
        height: 35px;
    }
    .loading-logo-text{
        font-size: 20px;
        top:calc(50% - 5px)
    }
    .social-btn{
        padding: 4px;
        font-size: 12px;
    }
    .h-captcha-container {
        margin: 15px 0 10px;
        padding: 5px;
    }
}