* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    overscroll-behavior: none;
    background: #fff;
    position: fixed;
    inset: 0;
}

.page {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    background: url('/bazjapp.png') no-repeat center top;
    background-size: cover;
}

.content {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 1;
    width: calc(100% - 48px);
    max-width: 400px;
    padding: 0;
}

.page--login .content {
    top: calc(36vh - 185px);
}

.page--login .page-title,
.page--register .page-title {
    font-size: 21px;
    color: #1e3a8a;
    font-weight: 800;
    text-align: center;
    width: 100%;
}

.page--login .page-title {
    margin-top: 50px;
}

.page--register .page-title {
    margin-top: 130px;
}

.page--register .content {
    top: calc(36vh - 175px);
}

.page--login #authForm,
.page--register #authForm {
    margin-top: 72px;
}

.page--login .form-group,
.page--register .form-group {
    margin-bottom: 10px;
}

.page--login .btn-primary,
.page--register .btn-primary {
    background: #c4b5fd;
    box-shadow: 0 4px 14px rgba(196, 181, 253, 0.45);
}

.page--register .agreement {
    margin: 4px 0 14px;
}

.page-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1a3a6b;
    margin-bottom: 0;
    letter-spacing: 0.04em;
}

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

.form-label {
    display: block;
    font-size: 15px;
    color: #000;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-label .req {
    color: #e53935;
    margin-left: 2px;
}

.input-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    padding: 0 14px;
    height: 48px;
    box-shadow: 0 1px 6px rgba(30, 80, 160, 0.05);
    border: 1px solid rgba(220, 230, 245, 0.8);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap:focus-within {
    border-color: #6ba3f0;
    box-shadow: 0 2px 16px rgba(30, 100, 200, 0.15);
}

.input-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #9eb8d8;
}

.input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    background: transparent;
    padding: 0 10px;
    min-width: 0;
}

.input-wrap input::placeholder {
    color: #999;
}

.toggle-pwd {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #9eb8d8;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-pwd svg {
    width: 20px;
    height: 20px;
}

.forgot-link {
    display: block;
    text-align: right;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    margin: -6px 0 20px;
}

.forgot-link:active {
    color: #1565d8;
}

.btn-primary {
    display: block;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 24px;
    background: #b5a8dc;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.15em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(155, 143, 217, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:active {
    transform: scale(0.98);
}

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

.nav-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 15px;
    color: #1565d8;
    text-decoration: none;
    font-weight: 500;
}

.nav-link:active {
    opacity: 0.7;
}

.footer-tip {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 20px;
    text-align: center;
    font-size: 13px;
    color: #4a90d9;
    z-index: 2;
}

.agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0 22px;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.agreement input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #1565d8;
}

.agreement a {
    color: #1565d8;
    text-decoration: none;
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    max-width: 80%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 360px) {
    .content {
        width: calc(100% - 32px);
    }

    .page--login .content {
        top: calc(34vh - 185px);
    }

    .page--register .content {
        top: calc(34vh - 175px);
    }

    .page--login #authForm,
    .page--register #authForm {
        margin-top: 64px;
    }

    .page-title {
        font-size: 24px;
    }

    .page--login .page-title {
        font-size: 17px;
        margin-top: 50px;
    }

    .page--register .page-title {
        font-size: 17px;
        margin-top: 130px;
    }

    .page--login .form-group,
    .page--register .form-group {
        margin-bottom: 8px;
    }

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

@media (min-height: 780px) {
    .page--login .content {
        top: 115px;
    }

    .page--register .content {
        top: 125px;
    }

    .page--login #authForm,
    .page--register #authForm {
        margin-top: 80px;
    }
}
