/* ================================================================================
   登录 / 注册 — 居中卡片
   ================================================================================ */

.sg-auth-body {
    margin: 0;
}

.sg-auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: #080c1c;
    overflow: hidden;
    box-sizing: border-box;
}

/* 与首页 Hero 一致的背景层 */
.sg-auth-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sg-auth-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(64, 158, 255, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 60% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
}

.sg-auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: sg-auth-orb-drift 12s ease-in-out infinite;
}

.sg-auth-orb-1 {
    width: 420px;
    height: 420px;
    top: -80px;
    right: -60px;
    background: rgba(64, 158, 255, 0.22);
}

.sg-auth-orb-2 {
    width: 300px;
    height: 300px;
    bottom: 40px;
    left: -80px;
    background: rgba(124, 58, 237, 0.18);
    animation-delay: -4s;
}

.sg-auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 80%);
}

@keyframes sg-auth-orb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -16px) scale(1.06); }
}

.sg-auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px 36px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
}

.sg-auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.sg-auth-logo a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #303133;
}

.sg-auth-logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #409eff, #7c3aed);
    box-shadow: 0 4px 14px rgba(64, 158, 255, 0.35);
    color: #fff;
}

.sg-auth-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #303133;
}

.sg-auth-card-head {
    text-align: center;
    margin-bottom: 28px;
}

.sg-auth-card-head h1 {
    font-size: 24px;
    font-weight: 700;
    color: #303133;
    margin: 0 0 8px;
}

.sg-auth-card-head p {
    font-size: 14px;
    color: #909399;
    margin: 0;
    line-height: 1.6;
}

.sg-auth-form .sg-form-item {
    margin-bottom: 18px;
}

.sg-auth-form .sg-form-item label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #606266;
    margin-bottom: 8px;
}

.sg-auth-form .sg-form-item input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 15px;
    color: #303133;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.sg-auth-form .sg-form-item input::placeholder {
    color: #c0c4cc;
}

.sg-auth-form .sg-form-item input:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.15);
}

.sg-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 8px;
}

.sg-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #606266;
    cursor: pointer;
    user-select: none;
}

.sg-checkbox input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #409eff;
    cursor: pointer;
}

.sg-checkbox a {
    color: #409eff;
    text-decoration: none;
}

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

.sg-auth-link {
    color: #409eff;
    text-decoration: none;
}

.sg-auth-link:hover {
    text-decoration: underline;
}

.sg-auth-btn {
    width: 100%;
    height: 44px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.sg-auth-btn:hover:not(:disabled) {
    background: #66b1ff;
}

.sg-auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sg-auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: #909399;
}

.sg-auth-footer a {
    color: #409eff;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

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

.sg-auth-back-home {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #909399;
    text-decoration: none;
}

.sg-auth-back-home:hover {
    color: #409eff;
}

/* 注册页字段稍多，略紧凑 */
.sg-auth-form-compact .sg-form-item {
    margin-bottom: 14px;
}

.sg-auth-form-compact .sg-form-item input {
    height: 42px;
}

/* 长辈模式 */
.sg-elder-mode .sg-auth-card-head h1 {
    font-size: 28px;
}

.sg-elder-mode .sg-auth-form .sg-form-item label,
.sg-elder-mode .sg-auth-form .sg-form-item input,
.sg-elder-mode .sg-auth-btn {
    font-size: 18px;
}

.sg-elder-mode .sg-auth-form .sg-form-item input {
    height: 50px;
}

@media (max-width: 480px) {
    .sg-auth-card {
        padding: 32px 24px 28px;
    }

    .sg-auth-card-head h1 {
        font-size: 22px;
    }
}
