/* 登录注册页面通用样式 */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }

/* 主题 */
body.theme-light {
    --bg-body: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-card: #ffffff;
    --text-main: #222;
    --text-sub: #666;
    --border: #e3e6ea;
    --input-bg: #ffffff;
    --accent: #4fc3f7;
}
body.theme-dark {
    --bg-body: linear-gradient(135deg, #0f1419 0%, #1a2028 100%);
    --bg-card: #1a2028;
    --text-main: #e6e9ec;
    --text-sub: #8a96a3;
    --border: #2a3340;
    --input-bg: #2a3340;
    --accent: #4fc3f7;
}
body {
    background: var(--bg-body);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 {
    margin: 0;
    font-size: 26px;
    color: var(--accent);
    font-weight: 600;
}
.auth-header p {
    margin: 6px 0 0;
    color: var(--text-sub);
    font-size: 14px;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-sub);
    font-weight: 500;
}
.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,195,247,0.2);
}
.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-sub);
    font-size: 11px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-sub);
    font-size: 14px;
}
.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .auth-card { padding: 22px; }
    .auth-header h1 { font-size: 22px; }
}
