/* ========== 全局重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

/* ========== 登录/注册卡片 ========== */
.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.4s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.auth-card h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
    color: #1a1a2e;
}
.auth-card .subtitle {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 28px;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    font-weight: 500;
}
.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
}
.form-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
.form-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.form-row .form-group { flex: 1; margin-bottom: 0; }
.captcha-img {
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    border: 1.5px solid #e0e0e0;
    flex-shrink: 0;
}

/* ========== 按钮 ========== */
.btn-primary {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    margin-top: 8px;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.35);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========== 底部链接 ========== */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #888;
}
.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }

/* ========== 记住我 ========== */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 13px;
}
.remember-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    cursor: pointer;
}
.remember-row input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #667eea;
}

/* ========== 提示消息 ========== */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 9999;
    pointer-events: none;
    max-width: 90%;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.error { background: #e74c3c; }
.toast.success { background: #27ae60; }

/* ========== 首页（登录后） ========== */
.dashboard {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 48px;
    width: 100%;
    max-width: 600px;
    text-align: center;
}
.dashboard h1 {
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 12px;
}
.dashboard .welcome {
    color: #667eea;
    font-weight: 700;
}
.dashboard .user-info {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    text-align: left;
}
.dashboard .user-info p {
    padding: 6px 0;
    font-size: 14px;
    color: #555;
}
.dashboard .user-info span {
    color: #1a1a2e;
    font-weight: 600;
}
.btn-logout {
    display: inline-block;
    padding: 10px 28px;
    background: #f0f0f0;
    color: #555;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-logout:hover { background: #e0e0e0; color: #333; }

/* ========== 响应式 ========== */
@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; margin: 16px; }
    .dashboard { padding: 28px 20px; margin: 16px; }
}