* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 100%);
    font-family: 'Inter', sans-serif;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(110, 180, 220, 0.08) 0%, rgba(200, 225, 245, 0.05) 100%);
    pointer-events: none;
    z-index: 0;
}

body.bd-style {
    background: #ffffff url(../images/login_bg.png) repeat;
}

.register-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 20px 40px -12px rgba(0, 30, 60, 0.15), 0 1px 2px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

/* 顶部样式 - 清新渐变色 */
.form-header {
    position: relative;
    background: linear-gradient(105deg, #2d9cdb 0%, #56c0e8 50%, #7bd5f5 100%);
    padding: 2rem 2.5rem 1.8rem;
    color: white;
    overflow: hidden;
}

.form-header::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -10%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255,255,245,0.2) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.form-header::after {
    content: "";
    position: absolute;
    bottom: -40px;
    left: -20px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,245,0.12) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.header-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 2px, transparent 2px, transparent 12px);
    pointer-events: none;
}

.header-content {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 2;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    border-radius: 60px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.title-text h1 {
    font-weight: 700;
    font-size: 1.9rem;
    letter-spacing: -0.3px;
    color: white;
    margin-bottom: 0.2rem;
}

.title-text .sub {
    font-size: 0.8rem;
    opacity: 0.88;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-extra {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    border-radius: 2rem;
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.25);
}

.header-divider {
    margin-top: 1.2rem;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.2), transparent);
}

/* 表单主体 */
.form-body {
    padding: 2rem 2.5rem 2.2rem;
    background: #ffffff;
}

.form-row {
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.form-group {
    flex: 1;
    min-width: 180px;
    position: relative;
}

.full-width {
    width: 100%;
}

label {
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    color: #222222;
}

label i {
    color: #5ba3d9;
    width: 1.2rem;
    font-size: 0.9rem;
}

.required-star {
    color: #e8635a;
    margin-left: 2px;
}

input, select {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    border: 1.5px solid #e2edf7;
    border-radius: 14px;
    background: #fdfdfe;
    transition: all 0.2s ease;
    outline: none;
    color: #1a4d70;
    font-family: 'Inter', monospace;
}

input:focus, select:focus {
    border-color: #5ba3d9;
    box-shadow: 0 0 0 3px rgba(91, 163, 217, 0.12);
    background: #ffffff;
}

/* 身份选择按钮组 */
.role-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    background: #f5f7fb;
    border-radius: 48px;
}

.role-btn {
    flex: 1;
    text-align: center;
    padding: 0.7rem 1rem;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    color: #6c86a3;
    background: transparent;
    border: none;
}

.role-btn.active {
    background: #3b7cbf;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 124, 191, 0.25);
}

.role-btn:not(.active):hover {
    background: #eef2f8;
    color: #3b7cbf;
}

/* 密码小眼睛 */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-wrapper input {
    padding-right: 2.8rem;
}
.toggle-password {
    position: absolute;
    right: 14px;
    cursor: pointer;
    color: #9bb7d0;
    font-size: 1rem;
    transition: color 0.2s;
    background: transparent;
    z-index: 1;
}
.toggle-password:hover {
    color: #4a9ad0;
}

/* 手机号 + 验证码 行 */
.mobile-row {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.mobile-field, .verify-field {
    flex: 1;
}

.send-code-btn {
    padding: 0.8rem 1rem;
    background: #eef4fa;
    border: 1.5px solid #d6e4f0;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #2c7cb6;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.send-code-btn:hover:not(:disabled) {
    background: #e3edf6;
    border-color: #9ac2df;
}
.send-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.location-row {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.location-row .form-group {
    flex: 1;
}

.error-message {
    font-size: 0.7rem;
    color: #e87c6a;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-error {
    border-color: #f0b7ae;
    background-color: #fff9f8;
}
.input-success {
    border-color: #9bc4a0;
    background-color: #f6fcf5;
}

.info-badge {
    background: #eef6fb;
    border-radius: 16px;
    padding: 0.7rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #2c7cb6;
    border-left: 4px solid #5ba3d9;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1rem 0 1rem;
}
.checkbox-group input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #5ba3d9;
}
.checkbox-group label {
    margin: 0;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    color: #3d6b94;
}
.checkbox-group a {
    color: #2c7cb6;
    text-decoration: none;
    font-weight: 600;
}
.checkbox-group a:hover {
    text-decoration: underline;
}

.login-prompt {
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: #5c85aa;
    border-bottom: 1px solid #e5eef7;
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-prompt i {
    color: #5ba3d9;
}
.login-prompt a {
    color: #2c7cb6;
    font-weight: 700;
    text-decoration: none;
}
.login-prompt a:hover {
    text-decoration: underline;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 40px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-primary {
    background: #3b8fc2;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 143, 194, 0.2);
}
.btn-primary:hover {
    background: #2f7aa8;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(59, 143, 194, 0.25);
}

.btn-secondary {
    background: #f5f9fe;
    color: #5a84aa;
    border: 1px solid #d6e4f0;
}
.btn-secondary:hover {
    background: #ecf3fa;
    border-color: #bdd3e8;
}

select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%237ba5c0" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.student-fields, .parent-fields {
    transition: all 0.3s ease;
}

.parent-fields {
    display: none;
}

.password-strength {
    font-size: 0.7rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.strength-weak { color: #e8a08e; }
.strength-medium { color: #e8b56e; }
.strength-strong { color: #8bc48a; }

@media (max-width: 680px) {
    .form-header { padding: 1.5rem; }
    .form-body { padding: 1.5rem; }
    .title-text h1 { font-size: 1.5rem; }
    .icon-badge { width: 50px; height: 50px; font-size: 1.5rem; }
    .button-group { justify-content: center; }
    .btn { flex: 1; justify-content: center; }
    .mobile-row { flex-direction: column; }
}