/* register.css - 注册页面样式 */

/* 重置样式 */
.register-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 注册页面整体样式 */
.register-page {
    width: 100%;
    min-height: calc(100vh - 400px); /* 考虑头部和底部高度 */
    background-color: #f8f9fa;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* 注册页面banner - 修改为与登录页面一致 */
.register-banner {
    position: relative;
    width: 100%;
    height: 300px; /* 改为300px，与登录页面一致 */
    background-image: url('../images/register-banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 备用背景色，如果图片不存在 */
.register-banner:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #08358f 0%, #1a4cb3 50%, #0a3ba8 100%);
    z-index: 1;
}

/* 如果存在背景图片，添加遮罩层 */
.register-banner:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(8, 53, 143, 0.7);
    z-index: 2;
}

.banner-overlay {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 20px;
    max-width: 800px;
}

.banner-text h1 {
    font-size: 3rem; /* 改为3rem，与登录页面一致 */
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-text p {
    font-size: 1.3rem; /* 改为1.3rem，与登录页面一致 */
    opacity: 0.9;
    margin-bottom: 0;
    font-weight: 300; /* 添加与登录页面一致的字体权重 */
}

/* 注册容器 - 修改为最大宽度1400px */
.register-container {
    width: 100%;
    max-width: 1400px; /* 改为1400px */
    margin: -80px auto 60px; /* 调整为-80px，与banner高度匹配 */
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

.register-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 40px;
}

/* 注册表单区域 */
.register-form-container {
    flex: 1;
    min-width: 350px;
    padding: 20px;
}

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

.register-header h2 {
    color: #08358f;
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.register-header p {
    color: #666;
    font-size: 1.1rem;
}

/* 表单部分标题 */
.form-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 25px;
}

.section-title {
    color: #08358f;
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid #08358f;
}

/* 表单样式 */
.register-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.required {
    color: #e74c3c;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.form-group input:focus {
    border-color: #08358f;
    background-color: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(8, 53, 143, 0.1);
}

.form-hint {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* 密码输入框 */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #08358f;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background-color: #e74c3c;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.85rem;
    color: #666;
}

/* 表单错误信息 */
.form-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 20px;
}

/* 协议条款 - 优化布局 */
.agreement {
    margin-top: 25px;
}

.agreement-wrapper {
    max-width: 100%;
    overflow: hidden;
}

.agreement label {
    font-weight: normal;
    font-size: 0.95rem;
    line-height: 1.5;
    display: inline-flex;
    align-items: flex-start;
    cursor: pointer;
    width: auto;
    max-width: 100%;
}

.checkbox-container {
    display: inline-flex;
    align-items: flex-start;
    position: relative;
    padding-left: 30px;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
    width: auto;
    max-width: 100%;
    line-height: 1.4;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #08358f;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-link, .privacy-link {
    color: #08358f;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.terms-link:hover, .privacy-link:hover {
    text-decoration: underline;
}

/* 表单操作按钮 */
.form-actions {
    margin-top: 30px;
    text-align: center;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #08358f 0%, #1a4cb3 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #1a4cb3 0%, #08358f 100%);
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(8, 53, 143, 0.3);
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* 登录链接 */
.login-link-container {
    color: #666;
    font-size: 0.95rem;
    margin-top: 15px;
}

.login-link {
    color: #08358f;
    font-weight: 600;
    text-decoration: none;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: #1a4cb3;
    text-decoration: underline;
}

/* 注册说明区域 */
.register-info {
    flex: 1;
    min-width: 350px;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 10px;
}

.info-box {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.info-box:hover {
    transform: translateY(-5px);
}

.info-icon {
    font-size: 2.5rem;
    color: #08358f;
    margin-bottom: 15px;
}

.info-box h3 {
    color: #08358f;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-box p {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 10px;
}

.info-box ul {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
    padding-left: 20px;
    margin-bottom: 0;
}

.info-box li {
    margin-bottom: 8px;
}

.info-box strong {
    color: #333;
}

/* 响应式设计 */

/* 1200px以下 */
@media screen and (max-width: 1200px) {
    .register-container {
        padding: 0 30px;
    }

    .register-wrapper {
        padding: 30px;
        gap: 30px;
    }
}

/* 992px以下 */
@media screen and (max-width: 992px) {
    .register-banner {
        height: 250px; /* 响应式调整，与登录页面一致 */
    }

    .banner-text h1 {
        font-size: 2.5rem; /* 响应式调整，与登录页面一致 */
    }

    .banner-text p {
        font-size: 1.1rem; /* 响应式调整，与登录页面一致 */
    }

    .register-container {
        margin-top: -60px; /* 响应式调整，与banner高度匹配 */
    }

    .section-title {
        font-size: 1.3rem;
    }
}

/* 768px以下 - 平板 */
@media screen and (max-width: 768px) {
    .register-banner {
        height: 200px; /* 响应式调整，与登录页面一致 */
    }

    .banner-text h1 {
        font-size: 2rem; /* 响应式调整，与登录页面一致 */
    }

    .register-container {
        padding: 0 20px;
        margin-top: -40px; /* 响应式调整，与banner高度匹配 */
        margin-bottom: 40px;
    }

    .register-wrapper {
        padding: 25px;
        gap: 25px;
    }

    .register-form-container,
    .register-info {
        min-width: 100%;
    }

    .register-header h2 {
        font-size: 1.6rem;
    }

    .agreement label {
        font-size: 0.9rem;
    }

    .checkbox-container {
        padding-left: 28px;
    }

    .checkmark {
        height: 18px;
        width: 18px;
    }

    .checkbox-container .checkmark:after {
        left: 6px;
        top: 2px;
        width: 4px;
        height: 9px;
    }
}

/* 600px以下 - 手机大屏幕 */
@media screen and (max-width: 600px) {
    .register-banner {
        height: 180px; /* 响应式调整，与登录页面一致 */
    }

    .banner-text h1 {
        font-size: 1.8rem; /* 响应式调整，与登录页面一致 */
    }

    .banner-text p {
        font-size: 1rem; /* 响应式调整，与登录页面一致 */
    }

    .register-container {
        padding: 0 15px;
        margin-top: -30px; /* 响应式调整，与banner高度匹配 */
    }

    .register-wrapper {
        padding: 20px;
    }

    .form-group input {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 14px;
        font-size: 1rem;
    }

    .info-box {
        padding: 20px;
    }

    .agreement label {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* 480px以下 - 手机小屏幕 */
@media screen and (max-width: 480px) {
    .register-banner {
        height: 150px; /* 响应式调整，与登录页面一致 */
    }

    .banner-overlay {
        padding: 10px;
    }

    .banner-text h1 {
        font-size: 1.5rem; /* 响应式调整，与登录页面一致 */
    }

    .register-container {
        padding: 0 10px;
        margin-top: -20px; /* 响应式调整，与banner高度匹配 */
    }

    .register-wrapper {
        padding: 15px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .form-group label {
        font-size: 1rem;
    }

    .agreement-wrapper {
        line-height: 1.3;
    }

    .agreement label {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .terms-link, .privacy-link {
        font-size: 0.8rem;
    }
}