* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

/* 核心调整：优化容器尺寸与内边距，控制整体占比 */
.container {
    background: #FFFFFF;
    padding: 2.5rem; /* 使用相对单位，与登录页协调 */
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(108, 117, 125, 0.1);
    width: 100%;
    max-width: 420px; /* 微调最大宽度，避免过宽 */
    border: 1px solid #e9ecef;
    margin: 0 auto; /* 确保居中 */
}

.logo {
    text-align: center;
    margin-bottom: 2rem; /* 统一底部间距 */
}

.logo h1 {
    color: #333333;
    font-size: 1.8rem; /* 调整标题大小，保持克制 */
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.logo p {
    color: #6C757D;
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 1.5rem; /* 统一表单项间距 */
}

.input-field {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-field i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6C757D;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    transition: color 0.3s ease;
}

/* 统一输入框尺寸 */
.input-field input {
    width: 100%;
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    background: #FFFFFF;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #333333;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.input-field input::placeholder {
    color: #adb5bd;
    font-size: 0.95rem;
}

.input-field input:focus {
    border-color: #4A6FA5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

.input-field:focus-within i {
    color: #4A6FA5;
}

.terms {
    display: flex;
    align-items: flex-start; /* 改为顶部对齐，避免多行文字布局问题 */
    margin-bottom: 1.5rem;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.4;
}

.terms input {
    margin-right: 0.5rem;
    margin-top: 0.2rem; /* 微调对齐 */
}

.terms a {
    color: #4A6FA5;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap; /* 防止链接换行 */
}

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

/* 统一按钮样式 */
.btn {
    width: 100%;
    padding: 0.875rem;
    background: #4A6FA5;
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.btn:hover:not(:disabled) {
    background: #3a5a8c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.3);
}

.btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #6C757D;
    font-size: 0.9rem;
}

.login-link a {
    color: #4A6FA5;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
}

.error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.375rem;
    display: none;
    line-height: 1.3;
}

.success {
    color: #28a745;
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
    display: none;
    padding: 0.75rem;
    background-color: #f8fff9;
    border-radius: 4px;
    border: 1px solid #e1f5e1;
}

.password-strength {
    margin-top: 0.375rem;
    font-size: 0.8rem;
    line-height: 1.3;
}

.strength-weak { color: #dc3545; }
.strength-medium { color: #e6a700; }
.strength-strong { color: #28a745; }

/* 响应式设计：确保在不同屏幕下占比依然协调 */
@media (max-width: 768px) {
    .container {
        padding: 2rem;
        max-width: 400px;
    }
    .logo h1 {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }
    .container {
        padding: 1.5rem;
        border-radius: 8px;
    }
    .input-field input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        font-size: 0.9rem;
    }
    .logo h1 {
        font-size: 1.6rem;
    }
}