/* 登录按钮样式 */
.login-button {
    position: static;
    margin: 15px 15px 0px;
    width: calc(100% - 30px);
    padding: 8px 0;
    background: transparent;
    border: 1px solid rgba(0, 219, 255, 0.3);
    border-radius: 20px;
    color: #fff;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s;
    font-size: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-button svg {
    width: 16px;
    height: 16px;
}

.login-button:hover {
    opacity: 0.9;
}

.sidebar.collapsed .login-button {
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 10px auto;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar.collapsed .login-button span {
    display: none;
}

/* 登录模态框样式 */
.modal-login {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #000000, #000212, #000634);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
    border: 2px solid rgba(0, 219, 255, 0.5);
    border-radius: 15px;
    color: #fff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    z-index: 1001;
    width: 90%;
    max-width: 400px;
    box-sizing: border-box;
    min-height: 300px;
}

.modal-login.phone-mode {
    min-height: 220px;
}

.modal-login.wechat-mode {
    min-height: 250px;
}

.modal-login.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.4s ease;
}

.modal-login h2 {
    margin-bottom: 15px;
    font-size: 24px;
    color: #00dbff;
    text-shadow: 0 0 7px rgba(0, 219, 255, 0.8);
}

/* 关闭按钮样式 */
.modal-login .close-login-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #00dbff;
    font-size: 20px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-login .close-login-button:hover {
    color: #ff00ff;
}

.modal-login .close-login-button svg {
    width: 20px;
    height: 20px;
}

/* 登录模式容器 */
.login-mode {
    display: none;
    width: 100%;
}

.login-mode.active {
    display: block;
}

#wechat-login {
    display: block;
}

.modal-login .form-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.modal-login input[type="text"],
.modal-login input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(0, 219, 255, 0.5);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
}

.modal-login input[type="text"]:focus,
.modal-login input[type="password"]:focus {
    outline: none;
    border-color: #00dbff;
    box-shadow: 0 0 5px rgba(0, 219, 255, 0.5);
}

.modal-login .input-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.modal-login .input-group input[type="text"] {
    flex: 2;
}

.modal-login .input-group button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
    background: linear-gradient(to right, #00dbff, #ff00ff);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-login .input-group button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-login .buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.modal-login button {
    flex: 1;
    padding: 8px 0;
    font-size: 14px;
    background: linear-gradient(to right, #00dbff, #ff00ff);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-login button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-login .qr-code {
    margin: 10px auto;
    width: 165px;
    height: 165px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    overflow: visible;
}

.modal-login .qr-placeholder {
    width: 165px;
    height: 165px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

/* 微信登录提示文字 */
.modal-login .wechat-tip {
    margin: 0 0 15px;
    font-size: 16px;
    color: #ffffff;
    text-align: center;
}

/* 分割线 */
.modal-login .separator {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 25px 0 0;
    text-align: center;
}

.modal-login .separator::before,
.modal-login .separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 219, 255, 0.3);
}

.modal-login .separator span {
    padding: 0 10px;
    color: rgba(0, 219, 255, 0.6);
    font-size: 14px;
}

/* 切换登录方式按钮 */
.modal-login .toggle-button {
    margin-top: 10px;
    padding: 8px 15px;
    background: transparent;
    border: 1px solid rgba(0, 219, 255, 0.3);
    border-radius: 20px;
    color: #fff;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s;
    font-size: 14px;
    text-align: center;
    width: auto;
    align-self: center;
}

.modal-login .toggle-button:hover {
    opacity: 0.9;
}

.modal-login .message {
    margin-top: 5px;
    font-size: 14px;
    color: #ff4444;
}

/* 我的模态框样式 */
.modal-profile {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #000000, #000212, #000634);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
    border: 2px solid rgba(0, 219, 255, 0.5);
    border-radius: 15px;
    color: #fff;
    padding: 20px;
    text-align: left;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    z-index: 1001;
    width: 90%;
    max-width: 400px;
    box-sizing: border-box;
}

.modal-profile.active {
    display: block;
    animation: fadeInModal 0.4s ease;
}

/* 关闭按钮样式 */
.modal-profile .close-profile-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #00dbff;
    font-size: 20px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-profile .close-profile-button:hover {
    color: #ff00ff;
}

.modal-profile .close-profile-button svg {
    width: 20px;
    height: 20px;
}

/* 新增：头像和昵称的容器 */
.modal-profile .profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.modal-profile .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.modal-profile h2 {
    font-size: 24px;
    color: #00dbff;
    text-shadow: 0 0 7px rgba(0, 219, 255, 0.8);
    margin: 0;
}

.modal-profile p {
    margin: 5px 0;
    font-size: 14px;
    text-align: left;
}

.modal-profile p span button {
    background: none;
    border: 1px solid rgba(0, 219, 255, 0.3);
    border-radius: 20px;
    color: #00dbff;
    padding: 5px 10px;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}

.modal-profile p span button:hover {
    color: #ff00ff;
    background-color: rgba(0, 219, 255, 0.1);
}

.modal-profile button#logout {
    margin-top: 15px;
    padding: 6px 12px;
    width: auto;
    font-size: 14px;
    background: linear-gradient(to right, #ff4444, #ff00ff);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.modal-profile button#logout:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 自定义确认模态框样式 */
.modal-confirm {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #000000, #000212, #000634);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
    border: 2px solid rgba(0, 219, 255, 0.5);
    border-radius: 15px;
    color: #fff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    z-index: 1002;
    width: 90%;
    max-width: 300px;
    box-sizing: border-box;
    min-height: 200px;
    padding-top: 40px; /* 增加顶部内边距，整体下移内容 */
    justify-content: flex-start; /* 调整为从顶部开始排列，避免居中 */
}

.modal-confirm.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.4s ease;
}

.modal-confirm h2 {
    margin-bottom: 15px;
    font-size: 24px;
    color: #00dbff;
    text-shadow: 0 0 7px rgba(0, 219, 255, 0.8);
}

.modal-confirm p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #fff;
}

.modal-confirm .buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.modal-confirm button {
    flex: 1;
    padding: 8px 0;
    font-size: 14px;
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-confirm #confirm-yes {
    background: linear-gradient(to right, #00dbff, #ff00ff);
}

.modal-confirm #confirm-no {
    background: linear-gradient(to right, #ff4444, #ff00ff);
}

.modal-confirm button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-confirm .close-confirm-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #00dbff;
    font-size: 20px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-confirm .close-confirm-button:hover {
    color: #ff00ff;
}

.modal-confirm .close-confirm-button svg {
    width: 20px;
    height: 20px;
}

/* 绑定微信模态框样式 */
.modal-bind-wechat {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #000000, #000212, #000634);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
    border: 2px solid rgba(0, 219, 255, 0.5);
    border-radius: 15px;
    color: #fff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    z-index: 1002;
    width: 90%;
    max-width: 300px;
    box-sizing: border-box;
    min-height: 250px;
}

.modal-bind-wechat.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.4s ease;
}

.modal-bind-wechat h2 {
    margin-bottom: 15px;
    font-size: 24px;
    color: #00dbff;
    text-shadow: 0 0 7px rgba(0, 219, 255, 0.8);
}

.modal-bind-wechat .wechat-tip {
    margin: 0 0 15px;
    font-size: 16px;
    color: #ffffff;
    text-align: center;
}

.modal-bind-wechat .qr-code {
    margin: 10px auto;
    width: 165px;
    height: 165px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    overflow: visible;
}

.modal-bind-wechat .qr-placeholder {
    width: 165px;
    height: 165px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

.modal-bind-wechat .message {
    margin-top: 5px;
    font-size: 14px;
    color: #ff4444;
}

.modal-bind-wechat .close-bind-wechat-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #00dbff;
    font-size: 20px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-bind-wechat .close-bind-wechat-button:hover {
    color: #ff00ff;
}

.modal-bind-wechat .close-bind-wechat-button svg {
    width: 20px;
    height: 20px;
}

/* 绑定手机模态框样式 */
.modal-bind-phone {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #000000, #000212, #000634);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
    border: 2px solid rgba(0, 219, 255, 0.5);
    border-radius: 15px;
    color: #fff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    z-index: 1002;
    width: 90%;
    max-width: 400px;
    box-sizing: border-box;
    min-height: 220px;
}

.modal-bind-phone.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.4s ease;
}

.modal-bind-phone h2 {
    margin-bottom: 15px;
    font-size: 24px;
    color: #00dbff;
    text-shadow: 0 0 7px rgba(0, 219, 255, 0.8);
}

.modal-bind-phone .form-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.modal-bind-phone input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(0, 219, 255, 0.5);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
}

.modal-bind-phone input[type="text"]:focus {
    outline: none;
    border-color: #00dbff;
    box-shadow: 0 0 5px rgba(0, 219, 255, 0.5);
}

.modal-bind-phone .input-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.modal-bind-phone .input-group input[type="text"] {
    flex: 2;
}

.modal-bind-phone .input-group button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
    background: linear-gradient(to right, #00dbff, #ff00ff);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-bind-phone .input-group button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-bind-phone .buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.modal-bind-phone button {
    flex: 1;
    padding: 8px 0;
    font-size: 14px;
    background: linear-gradient(to right, #00dbff, #ff00ff);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-bind-phone button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-bind-phone .message {
    margin-top: 5px;
    font-size: 14px;
    color: #ff4444;
}

.modal-bind-phone .close-bind-phone-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #00dbff;
    font-size: 20px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-bind-phone .close-bind-phone-button:hover {
    color: #ff00ff;
}

.modal-bind-phone .close-bind-phone-button svg {
    width: 20px;
    height: 20px;
}

/* 新增：绑定失败提示模态框样式 */
.modal-bind-error {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #000000, #000212, #000634);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
    border: 2px solid rgba(0, 219, 255, 0.5);
    border-radius: 15px;
    color: #fff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    z-index: 1003;
    width: 90%;
    max-width: 300px;
    box-sizing: border-box;
    min-height: 150px;
    padding-top: 40px; /* 增加顶部内边距，整体下移内容 */
    justify-content: flex-start; /* 调整为从顶部开始排列，避免居中 */
}

.modal-bind-error.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.4s ease;
}

.modal-bind-error .message {
    margin-bottom: 20px;
    font-size: 16px;
    color: #ff4444;
}

.modal-bind-error button {
    padding: 8px 0;
    font-size: 14px;
    background: linear-gradient(to right, #ff4444, #ff00ff);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 120px;
}

.modal-bind-error button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-bind-error .close-bind-error-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #00dbff;
    font-size: 20px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-bind-error .close-bind-error-button:hover {
    color: #ff00ff;
}

.modal-bind-error .close-bind-error-button svg {
    width: 20px;
    height: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-login, .modal-profile, .modal-confirm, .modal-bind-wechat, .modal-bind-phone, .modal-bind-error {
        width: 80%;
        padding: 15px;
    }

    /* 登录模态框 */
    .modal-login h2 {
        font-size: 20px;
    }

    .modal-login .wechat-tip {
        font-size: 14px;
    }

    .modal-login .toggle-button {
        font-size: 14px;
        padding: 6px 12px;
    }

    .modal-login .separator span {
        font-size: 14px;
    }

    .modal-login input[type="text"],
    .modal-login input[type="password"] {
        font-size: 14px;
    }

    .modal-login button {
        font-size: 14px;
    }

    .modal-login .qr-code,
    .modal-login .qr-placeholder {
        width: 150px;
        height: 180px;
    }

    .modal-login .qr-placeholder {
        font-size: 14px;
    }

    .modal-login .message {
        font-size: 14px;
    }

    .modal-login .close-login-button {
        font-size: 18px;
    }

    /* 个人资料模态框 */
    .modal-profile h2 {
        font-size: 20px;
    }

    .modal-profile p {
        font-size: 14px;
    }

    .modal-profile button#logout {
        font-size: 14px;
    }

    .modal-profile .close-profile-button {
        font-size: 18px;
    }

    .modal-profile .avatar {
        width: 60px;
        height: 60px;
    }

    /* 确认模态框 */
    .modal-confirm h2 {
        font-size: 20px;
    }

    .modal-confirm p {
        font-size: 14px;
    }

    .modal-confirm button {
        font-size: 14px;
    }

    .modal-confirm .close-confirm-button {
        font-size: 18px;
    }

    /* 绑定微信模态框 */
    .modal-bind-wechat h2 {
        font-size: 20px;
    }

    .modal-bind-wechat .wechat-tip {
        font-size: 14px;
    }

    .modal-bind-wechat .qr-code,
    .modal-bind-wechat .qr-placeholder {
        width: 150px;
        height: 180px;
    }

    .modal-bind-wechat .qr-placeholder {
        font-size: 14px;
    }

    .modal-bind-wechat .message {
        font-size: 14px;
    }

    .modal-bind-wechat .close-bind-wechat-button {
        font-size: 18px;
    }

    /* 绑定手机模态框 */
    .modal-bind-phone h2 {
        font-size: 20px;
    }

    .modal-bind-phone input[type="text"] {
        font-size: 14px;
    }

    .modal-bind-phone button {
        font-size: 14px;
    }

    .modal-bind-phone .message {
        font-size: 14px;
    }

    .modal-bind-phone .close-bind-phone-button {
        font-size: 18px;
    }

    /* 绑定失败提示模态框 */
    .modal-bind-error .message {
        font-size: 14px;
    }

    .modal-bind-error button {
        font-size: 14px;
    }

    .modal-bind-error .close-bind-error-button {
        font-size: 18px;
    }
}

/* 动画 */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 可选：如果需要完全移除而非隐藏 */
.json-formatter-container {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}