/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 420px;
}

/* 登录框样式 */
.auth-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Logo样式 */
.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.logo p {
    font-size: 14px;
    color: #999;
}

/* 表单容器 */
.form-container {
    transition: all 0.3s ease;
}

.form-container.hidden {
    display: none;
}

.form-container h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    text-align: center;
}

/* 表单组 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    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-group input::placeholder {
    color: #bbb;
}

/* 表单选项 */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}

.remember-me,
.agreement {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #666;
}

.remember-me input,
.agreement input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #5a67d8;
}

.agreement a {
    color: #667eea;
    text-decoration: none;
}

.agreement a:hover {
    text-decoration: underline;
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.btn-primary {
    background: #667eea;
    color: #fff;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 社交登录 */
.social-login {
    margin-top: 24px;
}

.divider {
    position: relative;
    text-align: center;
    margin-bottom: 16px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e8e8e8;
}

.divider span {
    position: relative;
    background: #fff;
    padding: 0 16px;
    font-size: 13px;
    color: #999;
}

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f5f7fa;
    color: #333;
    font-size: 14px;
}

.btn-social:hover {
    background: #e8e8e8;
}

.btn-social .icon {
    font-size: 18px;
}

.btn-wechat:hover {
    background: #07c160;
    color: #fff;
}

.btn-qq:hover {
    background: #12b7f5;
    color: #fff;
}

/* 表单底部 */
.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
    color: #666;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 消息提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-20px);
}

.toast.success {
    background: #52c41a;
}

.toast.error {
    background: #ff4d4f;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .auth-box {
        padding: 32px 24px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
}
