body {
    margin: 0;
    padding: 0;
    height: 100vh;
    background-image: url('https://files.sgstudio2025.xyz/bj/bj1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    position: relative;
    cursor: none;
}

.floating-window {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 10;
    width: 400px;
    text-align: center;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease, height 0.5s ease;
}

.logo {
    width: 100%;
    max-width: 200px;
    margin-bottom: 20px;
}

.login-title, .register-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.input-group {
    margin-bottom: 15px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
    font-size: 16px;
}

.verification-group {
    /* label 在上，输入和按钮在下一行的容器 */
}

/* 新增：输入+按钮水平行容器 */
.verification-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.verification-input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
    font-size: 16px;
    min-height: 40px;
}

.verification-button {
    background: linear-gradient(45deg, #8a2be2, #9370db);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    min-width: 90px;
    height: 40px;
    box-sizing: border-box;
}

.verification-button:hover {
    background: linear-gradient(45deg, #7a1ed2, #8360cb);
}

.login-button, .register-button {
    background: linear-gradient(45deg, #8a2be2, #9370db);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background 0.3s;
}

.login-button:hover, .register-button:hover {
    background: linear-gradient(45deg, #7a1ed2, #8360cb);
}

.switch-text {
    text-align: left;
    margin-top: 5px;
    background: linear-gradient(45deg, #8a2be2, #9370db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    text-decoration: underline;
}

.copyright {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

.hide {
    opacity: 0;
    transform: translateY(20px);
}

.register-form {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.register-form.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 新增：让登录表单也支持 show 过渡（与注册表单一致） */
.login-form.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* 自定义鼠标指针 */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
    opacity: 1;
}

.cursor.hover {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: rgba(255, 255, 255, 1);
}

/* 新增：按下时的缩放（优先级由类控制，避免 inline style 冲突） */
.cursor.active {
    transform: translate(-50%, -50%) scale(0.8);
}

/* 如果同时 hover 和 active（鼠标按下时），以 active 为准 */
.cursor.hover.active {
    transform: translate(-50%, -50%) scale(0.8);
}

/* 按钮禁用状态 */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 消息提示样式 */
.message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 新增：用户名检测状态样式 */
.username-status {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    vertical-align: middle;
}
.username-status.available {
    color: #155724;
}
.username-status.taken {
    color: #721c24;
}