/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

:root {
    --primary: #0071e3;
    --primary-dark: #0066cc;
    --wechat-green: #07c160;
    --gray-light: #f5f5f7;
    --gray: #86868b;
    --gray-dark: #515154;
    --white: #ffffff;
    --success: #34c759;
    --error: #ff3b30;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4ecfb 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--gray-dark);
}

.container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    height: 820px;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.illustration {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, #2997ff 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.illustration::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
}

.illustration h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-align: center;
    z-index: 2;
}

.illustration p {
    font-size: 1rem;
    text-align: center;
    max-width: 350px;
    line-height: 1.6;
    opacity: 0.9;
    z-index: 2;
}

.illustration-img {
    width: 180px;
    margin-top: 15px;
    z-index: 2;
}

.form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 6px;
}

.form-header p {
    color: var(--gray);
    font-size: 1rem;
}

.input-group {
    margin-bottom: 16px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-dark);
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

.input-group i {
    position: absolute;
    right: 18px;
    top: 40px;
    color: var(--gray);
    font-size: 0.95rem;
}

.sms-container {
    display: flex;
    gap: 10px;
}

.sms-container input {
    flex: 1;
}

.sms-btn {
    width: 110px;
    padding: 14px;
    background: var(--gray-light);
    border: none;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.sms-btn:hover {
    background: #e0e0e0;
}

.btn {
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
    margin-bottom: 12px;
    width: 110px; /* 新增：设置固定宽度 */
    display: block; /* 新增：使按钮居中 */
    margin-left: auto; /* 新增：使按钮居中 */
    margin-right: auto; /* 新增：使按钮居中 */
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-wechat {
    background: var(--wechat-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
}

.btn-wechat:hover {
    background: #06ac52;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.remember input {
    margin-right: 6px;
    width: 16px;
    height: 16px;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.social-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 18px;
}

.divider {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 12px 0;
}

.divider span {
    padding: 0 12px;
    color: var(--gray);
    font-size: 0.95rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--gray);
    font-size: 0.95rem;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

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

.terms {
    font-size: 0.85rem;
    margin-top: 12px;
    color: var(--gray);
    text-align: center;
}

.terms a {
    color: var(--primary);
    text-decoration: none;
}

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

.success-message {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: var(--shadow);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.95rem;
}

.success-message.show {
    opacity: 1;
}

#msg-code {
    position: absolute;
    top: 40px;
    right: 10px;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
        max-width: 500px;
    }
    
    .illustration {
        padding: 15px 20px;
        height: 180px;
    }
    
    .illustration-img {
        width: 300px;
        margin-top: 20px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
    
    .sms-container {
        flex-direction: column;
    }
    
    .sms-btn {
        width: 100%;
    }
    .btn-primary {
        width: 100%; /* 移动端恢复全宽 */
    }
}