/* 全局变量 */
:root {
    /* 颜色 */
    --color-primary: #9B82FF;
    --color-primary-light: rgba(155, 130, 255, 0.1);
    --color-primary-dark: #7C4DFF;
    --color-success: #67C23A;
    --color-error: #ff4d4f;
    --color-text: #17181A;
    --color-text-secondary: #626366;
    --color-border: #E6E6E6;
    --color-background: #fff;
    --color-mask: rgba(0, 0, 0, 0.5);
    
    /* 尺寸 */
    --size-radius: 6px;
    --size-radius-lg: 12px;
    --size-padding: 15px;
    --size-padding-lg: 32px;
    --size-gap: 20px;
    
    /* 字体 */
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    
    /* 动画 */
    --transition-base: all 0.3s ease;
    --transition-bounce: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Noto Sans SC, Roboto;
    min-height: 100vh;
    position: relative;
}

/* 背景图片 */
.x_app {
    min-height: 100vh;
    background-image: url('../assets/img_bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

/* 顶部导航 */
.x_header {
    padding: var(--size-padding) 300px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(104,85,167,0.6);
    position: relative;
    z-index: 99;
}

.x_logo_img {
    height: 56px;
    cursor: pointer;
}

.x_nav_buttons {
    display: flex;
    align-items: center;
    gap: var(--size-gap);
}

/* 导航按钮 */
.x_nav_btn {
    text-decoration: none;
    min-width: 110px;
    padding: 12px 0;
    border-radius: var(--size-radius);
    font-size: var(--font-size-base);
    color: #fff;
    text-align: center;
    transition: var(--transition-base);
    opacity: 1;
    /* visibility: visible; */
    display: block;
}

.x_nav_btn.x_hidden {
    opacity: 0;
    /* visibility: hidden; */
    display: none;
    width: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

.x_nav_btn.x_primary {
    background: rgba(255, 255, 255, 0.15);
}

.x_nav_btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 登录框遮罩 */
.x_login_mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    z-index: 999;
}

.x_login_mask.show {
    background: var(--color-mask);
}

/* 登录框 */
.x_login_box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--color-background);
    padding: 34px 88px;
    border-radius: var(--size-radius-lg);
    min-width: 630px;
    opacity: 0;
    transition: var(--transition-bounce);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.x_login_box.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.x_login_title {
    font-size: var(--font-size-2xl);
    color: var(--color-text);
    text-align: center;
}

.x_login_subtitle {
    font-size: var(--font-size-base);
    color: #A7A7CC;
    text-align: center;
    margin-top: 10px;
}

/* 表单样式 */
.x_input_group {
    margin-top: 30px;
    position: relative;
}

.x_input_group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--size-radius);
    font-size: var(--font-size-lg);
    transition: var(--transition-base);
}

.x_input_group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* 验证码组 */
.x_captcha_group {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    display: none;
}

.x_captcha_group.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    display: block;
}

.x_captcha_group .x_input_group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.x_captcha_group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--size-radius);
    font-size: var(--font-size-lg);
    transition: var(--transition-base);
}

.x_captcha_group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.x_captcha_img {
    width: 100px;
    height: 34px;
    border-radius: var(--size-radius);
    cursor: pointer;
}

.x_verify_btn {
    width: 100px;
    height: 40px;
    border: none;
    border-radius: var(--size-radius);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.x_verify_btn:hover {
    opacity: 0.9;
}

.x_verify_btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.x_login_btn {
    width: 100%;
    padding: 15px;
    background: var(--color-primary);
    box-shadow: 0px 6px 12px rgba(107,79,219,0.2);
    border: none;
    border-radius: 23px;
    font-size: var(--font-size-lg);
    color: #fff;
    cursor: pointer;
    transition: var(--transition-base);
    margin-top: 40px;
}

.x_login_btn:hover {
    transform: translateY(-1px);
}

/* 更多选项 */
.x_more_options {
    text-align: center;
    margin-top: 50px;
    position: relative;
}

.x_more_options::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #EBEDF0;
}

.x_more_link {
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding: 0 12px;
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    background: var(--color-background);
}

/* 二维码部分 */
.x_qr_section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 30px;
    gap: 40px;
}

.x_qr_box {
    flex: 1;
    text-align: center;
}

.x_qr_code {
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

.x_qr_box p {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin-top: 12px;
}

/* 页脚 */
.x_footer {
    position: relative;
    text-align: center;
    padding: var(--size-padding) 300px;
    color: #fff;
    font-size: var(--font-size-sm);
    z-index: 1;
    background: rgba(104,85,167,0.6);

    a {
        text-decoration: none;
        color: #fff;
    }

    a:visited {
        text-decoration: none;
        color: #fff;
    }

    a:hover {
        text-decoration: none;
        color: #fff;
    }

    a:active {
        text-decoration: none;
        color: #fff;
    }
}

/* 响应式设计 */
/* @media (max-width: 768px) {
    .x_header {
        padding: var(--size-padding) 20px;
    }

    .x_login_box {
        min-width: 90%;
        width: 90%;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .x_qr_section {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
} */

.x_click_box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f7f9fa;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.x_click_box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        var(--color-primary-light),
        transparent
    );
    transition: 0.5s;
}

.x_click_box:hover::before {
    left: 100%;
}

.x_click_status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.x_click_status img {
    width: 24px;
    height: 24px;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.x_click_text {
    color: #606266;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.x_click_button {
    position: relative;
    padding: 8px 24px;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    color: #606266;
    font-size: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
}

.x_click_button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #9B82FF, #7C4DFF);
    opacity: 0;
    transition: 0.3s;
    z-index: 0;
}

.x_click_button:hover::before {
    opacity: 0.1;
}

.x_button_text {
    position: relative;
    z-index: 1;
}

.x_button_progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, 
        rgba(155,130,255,0.2),
        rgba(124,77,255,0.3)
    );
}

/* 动画效果 */
@keyframes progress-shine {
    0% {
        width: 0;
        background-position: 0% 0%;
    }
    50% {
        width: 100%;
        background: linear-gradient(90deg,
            rgba(155,130,255,0.2),
            rgba(124,77,255,0.3),
            rgba(155,130,255,0.2)
        );
    }
    100% {
        width: 0;
        background-position: 100% 0%;
    }
}

@keyframes verify-shake {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-15deg) scale(1.1);
    }
    75% {
        transform: rotate(15deg) scale(1.1);
    }
}

@keyframes success-dance {
    0%, 100% {
        transform: rotate(-10deg) scale(1.2);
    }
    50% {
        transform: rotate(10deg) scale(1.3);
    }
}

@keyframes success-float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

/* 点击波纹效果 */
.x_click_button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(155,130,255,0.4);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.x_click_button:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0) translate(-50%, -50%);
        opacity: 1;
    }
    100% {
        transform: scale(50) translate(-50%, -50%);
        opacity: 0;
    }
}

/* 验证成功特效 */
.x_verify_confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.x_verify_confetti::before,
.x_verify_confetti::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-burst 1s ease-out forwards;
}

.x_verify_confetti::before {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    left: 20%;
    animation-delay: 0.2s;
}

.x_verify_confetti::after {
    background: linear-gradient(135deg, #9B82FF, #7C4DFF);
    right: 20%;
}

@keyframes confetti-burst {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(0);
        opacity: 1;
        border-radius: 50%;
    }
    50% {
        transform: translate(-20px, -30px) rotate(180deg) scale(1.2);
        opacity: 0.8;
        border-radius: 0%;
    }
    100% {
        transform: translate(-40px, -60px) rotate(360deg) scale(0.2);
        opacity: 0;
        border-radius: 50%;
    }
}

/* 验证框样式 */
.x_verify_group {
    margin: 15px 0;
    transition: var(--transition-base);
}

.x_verify_group.hide {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    display: none;
}

.x_verify_checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border: 1px solid #ebedf0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.x_verify_checkbox::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
        var(--color-primary-light) 0%,
        rgba(155, 130, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.x_verify_checkbox:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px var(--color-primary-light);
}

.x_verify_checkbox:hover::before {
    opacity: 1;
    animation: ripple 1.5s infinite;
}

.x_verify_input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.x_verify_checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #dcdfe6;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.x_verify_checkmark::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.x_verify_checkbox:hover .x_verify_checkmark {
    border-color: var(--color-primary);
    transform: scale(1.1);
}

.x_verify_checkbox:hover .x_verify_checkmark::before {
    left: 100%;
}

.x_verify_input:checked ~ .x_verify_checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    animation: checkbox-pop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.x_verify_checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.x_verify_input:checked ~ .x_verify_checkmark:after {
    display: block;
    animation: check-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.x_verify_text {
    color: #606266;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.x_verify_text::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: left;
}

.x_verify_checkbox:hover .x_verify_text {
    color: var(--color-primary);
    transform: translateX(5px);
}

.x_verify_checkbox:hover .x_verify_text::after {
    transform: scaleX(1);
}

.x_verify_icon {
    width: 24px;
    height: 24px;
    margin-left: auto;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.x_verify_checkbox:hover .x_verify_icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 4px 8px rgba(155, 130, 255, 0.2));
}

.x_verify_input:checked ~ .x_verify_icon {
    animation: robot-celebrate 1.2s ease infinite;
}
@keyframes checkbox-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes check-pop {
    0% {
        transform: rotate(45deg) scale(0);
        opacity: 0;
    }
    50% {
        transform: rotate(45deg) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: rotate(45deg) scale(1);
        opacity: 1;
    }
}

@keyframes robot-celebrate {
    0%, 100% {
        transform: rotate(0deg) translateY(0);
    }
    25% {
        transform: rotate(-15deg) translateY(-4px) scale(1.1);
    }
    50% {
        transform: rotate(0deg) translateY(0) scale(1);
    }
    75% {
        transform: rotate(15deg) translateY(-4px) scale(1.1);
    }
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* 验证成功状态 */
.x_verify_checkbox.success {
    background: linear-gradient(145deg, #f0f9eb, #edf6e5);
    border-color: var(--color-success);
    animation: success-pulse 2s infinite;
}

.x_verify_checkbox.success .x_verify_text {
    color: var(--color-success);
    animation: text-float 2s ease infinite;
}

.x_verify_checkbox.success .x_verify_checkmark {
    background-color: var(--color-success);
    border-color: var(--color-success);
    animation: success-rotate 3s ease infinite;
}

.x_verify_checkbox.success .x_verify_icon {
    animation: success-dance 2s ease infinite;
}

@keyframes success-pulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(103, 194, 58, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(103, 194, 58, 0.4);
    }
}

@keyframes text-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@keyframes success-rotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

.x_verify_group,
.x_captcha_group {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.x_verify_btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.x_verify_checkbox.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

input.error {
    border-color: var(--color-error);
}

input.error:focus {
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

.x_verify_checkbox.success .x_verify_checkmark {
    background-color: #52c41a;
    border-color: #52c41a;
}

.x_verify_checkbox.success .x_verify_checkmark:after {
    border-color: #fff;
}

/* 退出确认框 */
.x_confirm_box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    transition: background-color 0.3s ease;
    visibility: hidden;
}

.x_confirm_box.show {
    background: var(--color-mask);
    visibility: visible;
}

.x_confirm_content {
    position: relative;
    background: var(--color-background);
    padding: var(--size-padding-lg);
    border-radius: var(--size-radius-lg);
    width: 400px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    transition: var(--transition-bounce);
    left: 50%;
    top: 50%;
}

.x_confirm_box.show .x_confirm_content {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.x_confirm_content h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text);
    margin-bottom: 16px;
    text-align: center;
    font-weight: 500;
}

.x_confirm_content p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--size-padding-lg);
    text-align: center;
    line-height: 1.5;
}

.x_confirm_buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.x_confirm_btn {
    padding: 10px 32px;
    border-radius: var(--size-radius);
    font-size: var(--font-size-lg);
    cursor: pointer;
    transition: var(--transition-base);
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text-secondary);
    min-width: 100px;
}

.x_confirm_btn:hover {
    background: #f5f5f5;
    border-color: #d9d9d9;
}

.x_confirm_btn_primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.x_confirm_btn_primary:hover {
    background: #8a6eff;
    border-color: #8a6eff;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .x_confirm_content {
        width: 90%;
        padding: 24px;
        margin: 0;
    }

    .x_confirm_btn {
        padding: 8px 24px;
        min-width: 80px;
    }
}

/* 错误提示 */
.x_error_tip {
    display: none;
    color: var(--color-error);
    font-size: var(--font-size-sm);
    margin-top: 4px;
    padding-left: 4px;
    animation: error-shake 0.3s ease;
}

@keyframes error-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 输入框错误状态 */
.x_input_group input.error {
    border-color: var(--color-error);
    animation: input-shake 0.3s ease;
}

@keyframes input-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.x_nav_toggle {
  display: none;
}

/* 移动端导航蒙层 */
.x_nav_mask {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 98;
    display: none;
}
.x_nav_mask.show {
    display: block;
}

.x_qr_btn {
    width: 100%;
    padding: 15px;
    background: none;
    box-shadow: 0px 6px 12px rgba(107,79,219,0.2);
    border: none;
    border-radius: 23px;
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    cursor: pointer;
    transition: var(--transition-base);
    /* margin-top: 40px; */
    border: 1px solid var(--color-primary);
}

.x_qr_btn:hover {
    transform: translateY(-1px);
}
