:root {
    --bg-page: #f0f4f9;
    --text-main: #020f30;
    --text-sub: #475569;
    --input-bg: #f5f6f9;
    --card-shadow: 0 34px 44px -20px rgba(185, 206, 234, 0.25);
    --required: #ea5939;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    background-color: var(--bg-page);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #000;
}

.page {
    flex: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

.page-bg {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: url("../images/bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.content-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
    padding-bottom: 40px;
}

.register-card {
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 580px;
    max-width: 100%;
}

.register-title {
    width: 100%;
    text-align: center;
    font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800 !important;
    font-size: 36px !important;
    line-height: 1.364 !important;
    color: var(--text-main) !important;
}

.form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.field-label {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.21;
    color: #000;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.required-mark {
    color: var(--required);
}

.label-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.label-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.label-icon img {
    width: 20px;
    height: 20px;
    display: block;
}

.input-shell {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    width: 100%;
    height: 48px;
    border-radius: 8px;
    position: relative;
    background: var(--input-bg);
}

.input-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(164deg, rgba(226, 230, 255, 1) 24%, rgba(255, 234, 227, 1) 95%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.input-shell input,
.input-shell select {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 14px;
    font-family: "PingFang SC", system-ui, sans-serif;
    color: #000;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.input-shell select {
    padding-right: 24px;
    cursor: pointer;
}

.input-shell input::placeholder {
    color: #7d91a1;
    opacity: 1;
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select-arrow img {
    width: 16px;
    height: 16px;
    display: block;
}

.grid-3 {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.grid-2 {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.agreement-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.checkbox-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "PingFang SC", system-ui, sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: rgba(0, 0, 0, 0.9);
}

.checkbox-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
}

.checkbox-icon img {
    width: 16px;
    height: 16px;
    display: block;
}

.checkbox-wrap span a {
    color: #03a1ea;
    text-decoration: none;
}

.checkbox-wrap span a:hover {
    text-decoration: underline;
}

.actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    width: 100%;
    margin-top: 16px;
}

.btn-primary-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 180px;
    height: 48px;
    border-radius: 32px;
    border: none;
    background-image: linear-gradient(90deg, #03a1ea 0%, #205baf 100%);
    color: #ffffff;
    font-family: "Noto Sans SC", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary-v2:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary-v2 img {
    width: 20px;
    height: 20px;
}

.btn-get-code {
    background: linear-gradient(90deg, #52c41a 0%, #389e0d 100%) !important;
}

.back-link {
    font-size: 16px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
}

.back-link:hover {
    color: var(--text-main);
}

.footer-v2 {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 24px 16px;
    margin-top: auto;
}

.footer-line {
    width: 100%;
    max-width: 1040px;
    height: 1px;
    background-color: #cbd5e1;
    margin: 0 auto 16px;
}

.footer-text {
    text-align: center;
    font-size: 12px !important;
    color: var(--text-sub);
    line-height: 1.6;
}

.footer-text a {
    color: inherit;
    text-decoration: none;
}

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

/* Password Toggle Style */
.password-container {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #7d91a1;
    display: flex;
    align-items: center;
    z-index: 2;
}

/* Modal styles preserved from login-new-v2.css */
.modal-v2-password {
    width: 450px;
    max-width: calc(100vw - 48px);
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0px 34px 44px -20px rgba(185, 206, 234, 0.25);
    padding: 32px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    margin: auto;
    position: relative;
}

.modal-v2-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-v2-title {
    flex: 1;
    font-family: Nunito, system-ui, sans-serif;
    font-weight: 800;
    font-size: 32px;
    text-align: center;
    color: #020F30;
}

.modal-v2-close {
    position: absolute !important;
    top: 0px !important;
    right: 0px !important;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-v2-close img {
    width: 24px;
    height: 24px;
}

.modal-v2-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-v2-field {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-v2-label {
    font-family: Inter, system-ui, sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: #000000;
}

.modal-v2-input-wrap {
    width: 100%;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(164deg, rgba(226, 230, 255, 1) 24%, rgba(255, 234, 227, 1) 95%);
}

.modal-v2-input {
    width: 100%;
    height: 44px;
    border-radius: 7px;
    border: 0;
    padding: 0 12px;
    background: #F5F6F9;
    font-family: "PingFang SC", system-ui, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #0F172A;
    outline: none;
}

/* School Search Modal Custom Styles */
.u-dialog-section-school {
    display: none;
    align-items: center;
    justify-content: center;
}

.u-dialog-section-school.u-dialog-open {
    display: flex !important;
}

.school-modal-wrap {
    min-height: 580px;
    margin: auto !important;
}

.school-list-container-v2 {
    width: 100%;
    background: #F5F6F9;
    border-radius: 8px;
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

.school-list-container-v2::-webkit-scrollbar {
    width: 6px;
}

.school-list-container-v2::-webkit-scrollbar-track {
    background: transparent;
}

.school-list-container-v2::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.school-option-v2 {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    padding: 11px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    transition: all 0.2s;
}

.school-option-v2:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.school-option-v2.selected {
    background-image: linear-gradient(90deg, #03a1ea 0%, #205baf 100%);
    border-color: transparent;
    color: #ffffff;
    font-weight: 500;
}

.modal-v2-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .register-card {
        padding: 32px 20px;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .actions-row {
        flex-direction: column;
        gap: 16px;
    }
}



/* Toast 容器 */
#toast-container {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100002;
    /* 确保在最上层 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    /* 允许点击穿透 */
}

/* 单个 Toast */
.toast {
    min-width: 250px;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 50px;
    color: #fff;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 居中文本 */
    text-align: center;
    /* 居中文本 */
    pointer-events: auto;
    /* 允许 Toast 接收事件 */
}

/* 成功 Toast */
.toast.success {
    box-shadow: 5px 5px 20px 0 rgba(0, 0, 0, 0.4);
    background-image: linear-gradient(#00ff00, #009245);
}

/* 错误 Toast */
.toast.error {
    background-image: linear-gradient(#ff6474, #e01c4c);
    box-shadow: 5px 5px 20px 0 rgba(0, 0, 0, 0.4);
}

/* 信息 Toast */
.toast.info {
    background-image: linear-gradient(#31cdee, #0962a4);
    box-shadow: 5px 5px 20px 0 rgba(0, 0, 0, 0.4);
}

/* 淡出效果 */
.toast.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* 移动端隐藏footer */
@media (max-width: 767px) {
    .u-footer {
        display: none !important;
    }
}