body {
    font-family: 'Poppins', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

/* 粒子背景 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.particles .particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0.3;
    animation: float 5s infinite ease-in-out;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-20px) translateX(10px);
    }
    100% {
        transform: translateY(0) translateX(0);
    }
}

/* 登录/注册容器 */
.container {
    width: 100%;
    max-width: 420px;
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px 30px;
    position: relative;
    z-index: 1;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.6s ease-out forwards;
    transform: translateY(20px);
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标题样式 */
h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2rem;
    color: var(--accent-primary);
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
}

/* 表单样式 */
form {
    max-width: 100%;
    margin: 0 auto;
}

/* 输入框容器 */
.input-group {
    position: relative;
    margin-bottom: 25px;
}

/* 输入框图标 */
.input-icon {
    position: absolute;
    left: 15px;
    top: 18px;
    color: var(--text-secondary);
    transition: all 0.3s;
}

/* 输入框样式 */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 15px 15px 15px 45px;
    font-size: 16px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.3s;
    box-sizing: border-box;
}

input[type="text"]:focus, input[type="password"]:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--shadow-color);
    outline: none;
}

input[type="text"]:focus + .input-icon, 
input[type="password"]:focus + .input-icon {
    color: var(--accent-primary);
}

/* 验证码容器 */
.captcha {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    align-items: center;
}

.captcha img {
    height: 46px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid var(--input-border);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.captcha img:hover {
    transform: scale(1.05);
}

input#captcha {
    flex-grow: 1;
    padding-left: 15px;
}

/* 按钮样式 */
button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    cursor: pointer;
    background: var(--button-primary);
    color: var(--button-text);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 5px 15px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-color);
    background: var(--button-hover);
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

button:active::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(50, 50);
        opacity: 0;
    }
}

/* 底部链接 */
.back-link {
    text-align: center;
    margin-top: 25px;
    font-size: 15px;
    color: var(--text-secondary);
}

.back-link a {
    color: var(--accent-primary);
    font-weight: 500;
    transition: color 0.3s;
    margin: 0 5px;
}

.back-link a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* 错误消息 */
.error {
    background-color: rgba(255, 0, 0, 0.1);
    color: #f44336;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    border-left: 3px solid #f44336;
}

.error::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 16px;
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: var(--card-bg);
    box-shadow: 0 5px 15px var(--shadow-color);
    z-index: 100;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

.theme-toggle i {
    font-size: 22px;
    color: var(--accent-primary);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .container {
        width: 90%;
        padding: 25px 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}

/* CSS 变量 */
:root {
    --bg-primary: #0f1624;
    --bg-secondary: #1a2235;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-primary: #00ffff;
    --accent-secondary: #ff007f;
    --border-color: #2a3347;
    --card-bg: #1a2235;
    --input-bg: #232e46;
    --input-border: #39465f;
    --button-primary: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    --button-hover: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    --button-text: #000000;
    --shadow-color: rgba(0, 255, 255, 0.2);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-primary: #0056d6;
    --accent-secondary: #ff007f;
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
    --input-bg: #f5f5f5;
    --input-border: #cccccc;
    --button-primary: linear-gradient(90deg, #0056d6, #0095ff);
    --button-hover: linear-gradient(90deg, #0095ff, #0056d6);
    --button-text: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}