:root {
    --uap-primary: #4f46e5;
    --uap-primary-hover: #4338ca;
    --uap-primary-light: #eef2ff;
    --uap-text: #111827;
    --uap-text-secondary: #64748b;
    --uap-border: #e2e8f0;
    --uap-error: #dc2626;
    --uap-success: #059669;
    --uap-radius: 12px;
}

body.uap-fullpage-body,
body.uap-fullpage-body * {
    box-sizing: border-box;
}

body.uap-fullpage-body {
    margin: 0;
    color: var(--uap-text);
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.5;
}

.uap-fullpage-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    background: linear-gradient(145deg, #f8fafc 0%, #eef2ff 100%);
    background-position: center;
    background-size: cover;
}

.uap-fullpage-wrapper.has-background { background-color: #0f172a; }
.uap-fullpage-overlay { position: absolute; inset: 0; z-index: 0; background: #0f172a; }
.uap-fullpage-content { position: relative; z-index: 1; width: 100%; max-width: 420px; }

.uap-form-container {
    width: 100%;
    max-width: 420px;
    padding: 30px 32px;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .1);
}

.uap-form-title {
    margin: 0 0 22px;
    color: var(--uap-text);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.uap-form-desc { margin: -8px 0 24px; color: var(--uap-text-secondary); font-size: 14px; }
.uap-field { margin: 0 0 14px; }
.uap-field label { display: block; margin: 0 0 5px; color: #334155; font-size: 14px; font-weight: 600; }
.uap-field label .required { color: var(--uap-error); }

.uap-input,
input.uap-input {
    display: block;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--uap-border);
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: var(--uap-text);
    font: inherit;
    font-size: 15px;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.uap-input:hover { border-color: #cbd5e1; }
.uap-input:focus { border-color: var(--uap-primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.uap-input.error { border-color: var(--uap-error); }
.uap-input.success { border-color: var(--uap-success); }
.uap-field-hint { display: block; margin-top: 3px; color: var(--uap-text-secondary); font-size: 12px; line-height: 1.4; }
.uap-field-hint:empty { display: none; }
.uap-field-hint.error { color: var(--uap-error); }
.uap-field-hint.success { color: var(--uap-success); }

.uap-checkbox-field label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; cursor: pointer; }
.uap-checkbox-field input { width: 16px; height: 16px; margin: 0; accent-color: var(--uap-primary); }

.uap-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.uap-button-primary { background: var(--uap-primary); color: #fff; box-shadow: 0 8px 18px rgba(79, 70, 229, .2); }
.uap-button-primary:hover { background: var(--uap-primary-hover); color: #fff; transform: translateY(-1px); }
.uap-button-block { width: 100%; }
.uap-button:disabled { cursor: not-allowed; opacity: .68; transform: none; }
.uap-button .spinner { width: 16px; height: 16px; margin-right: 8px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: uap-auth-spin .7s linear infinite; }
@keyframes uap-auth-spin { to { transform: rotate(360deg); } }

.uap-message { display: none; margin: 0 0 20px; padding: 12px 14px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; }
.uap-message.success { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.uap-message.error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.uap-message.warning { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.uap-message a { color: inherit; font-weight: 650; }

.uap-form-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 22px; font-size: 14px; }
.uap-form-links a { color: var(--uap-primary); text-decoration: none; }
.uap-form-links a:hover { color: var(--uap-primary-hover); text-decoration: underline; }

.uap-social-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: #94a3b8; font-size: 13px; }
.uap-social-divider::before,
.uap-social-divider::after { content: ""; flex: 1; height: 1px; background: var(--uap-border); }
.uap-social-divider span { white-space: nowrap; }
.uap-social-login-title { display: none; }
.uap-social-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.uap-social-btn {
    display: inline-flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--uap-border);
    border-radius: 50%;
    background: #fff;
    color: #334155;
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.uap-social-btn:hover { border-color: var(--uap-primary); background: #fff; color: #0f172a; box-shadow: 0 5px 14px rgba(15, 23, 42, .1); transform: translateY(-2px); }
.uap-social-btn img { width: 24px; height: 24px; object-fit: contain; }

.uap-password-wrap { position: relative; }
.uap-password-wrap .uap-input { padding-right: 48px; }
.uap-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    outline: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transform: translateY(-50%);
}
.uap-password-toggle:hover { background: #f1f5f9; color: #475569; }
.uap-password-toggle svg { display: block; width: 18px; height: 18px; }

@media (max-width: 600px) {
    .uap-fullpage-wrapper { align-items: flex-start; padding: 24px 14px; }
    .uap-fullpage-content { max-width: 100%; }
    .uap-form-container { padding: 26px 20px; border-radius: 15px; }
    .uap-form-title { margin-bottom: 22px; font-size: 23px; }
    .uap-social-buttons { gap: 9px; }
}
