/* =========================================================
   user/auth.css  —  Qni歌P曲库「认证页」全新视觉（Aurora Light）
   浅色玻璃感：柔和渐变背景 + 纯白卡片 + 青/靛强调色
   保留全部旧类名，登录 / 注册 / 找回密码 自动套用。
   ========================================================= */

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #1f2937;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0fdfa 45%, #ede9fe 100%);
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* 柔和光斑 */
body::before, body::after {
    content: ''; position: fixed; border-radius: 50%;
    filter: blur(90px); z-index: 0; pointer-events: none; opacity: .55;
}
body::before {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(45,212,191,.55), transparent 70%);
    top: -120px; right: -90px;
    animation: auroraFloat 20s ease-in-out infinite;
}
body::after {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(129,140,248,.5), transparent 70%);
    bottom: -150px; left: -120px;
    animation: auroraFloat 24s ease-in-out infinite reverse;
}
@keyframes auroraFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(24px,-26px) scale(1.08); }
}

/* 居中布局 */
body.u-center { display: flex; align-items: center; justify-content: center; padding: 28px 16px; }
.u-narrow { width: 100%; max-width: 430px; margin: 0 auto; position: relative; z-index: 1; }

/* ---------- 白色卡片 ---------- */
.u-card {
    background: #ffffff;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 28px;
    padding: 34px 28px 30px;
    box-shadow: 0 24px 60px rgba(31, 41, 99, .14);
    text-align: center;
}
.u-card--center { text-align: center; }
.u-auth-card { animation: cardIn .6s cubic-bezier(.22,1,.36,1) both; }
@keyframes cardIn {
    from { opacity: 0; transform: translateY(26px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 品牌 Logo（星球） ---------- */
.u-planet { display: inline-flex; align-items: center; justify-content: center; position: relative; animation: planetFloat 3.4s ease-in-out infinite; }
.u-planet-core {
    width: 76px; height: 76px; border-radius: 50%;
    background: linear-gradient(135deg, #14b8a6, #6366f1);
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; color: #fff;
    box-shadow: 0 10px 28px rgba(99, 102, 241, .4);
    border: 3px solid #fff;
}
.u-planet-ring {
    position: absolute; width: 98px; height: 98px;
    border: 2px solid rgba(99,102,241,.35); border-radius: 50%;
    top: -11px; left: -11px; animation: ringRotate 12s linear infinite;
}
@keyframes ringRotate { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
@keyframes planetFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- 标题 ---------- */
.u-auth-title {
    font-size: 26px; font-weight: 800; line-height: 1.3; margin: 16px 0 6px;
    background: linear-gradient(120deg, #0f766e 0%, #4f46e5 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.u-auth-sub { color: #64748b; font-size: 13.5px; letter-spacing: .3px; }
.u-auth-divider {
    height: 3px; width: 60px; margin: 18px auto 26px; border-radius: 3px;
    background: linear-gradient(90deg, #2dd4bf, #818cf8);
}

/* ---------- 消息提示 ---------- */
.u-msg { padding: 12px 18px; border-radius: 14px; margin-bottom: 18px; font-size: 13px; font-weight: 600; text-align: center; }
.u-msg--success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.u-msg--error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

/* ---------- 表单 ---------- */
.u-form-group { margin-bottom: 18px; text-align: left; animation: fadeUp .5s ease both; }
.u-form-group:nth-child(1) { animation-delay: .05s; }
.u-form-group:nth-child(2) { animation-delay: .11s; }
.u-form-group:nth-child(3) { animation-delay: .17s; }
.u-form-group:nth-child(4) { animation-delay: .23s; }
.u-form-group:nth-child(5) { animation-delay: .29s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.u-label { display: block; margin-bottom: 8px; font-weight: 600; color: #334155; font-size: 13.5px; letter-spacing: .3px; }
.u-required { color: #ef4444; margin-left: 2px; }

/* 图标输入框 */
.field { position: relative; }
.field__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 16px; opacity: .5; pointer-events: none; }
.field .u-input, .field--grow .u-input { padding-left: 46px; }

.u-input {
    width: 100%; padding: 14px 16px;
    border: 1px solid #e2e8f0; border-radius: 14px;
    background: #f8fafc; color: #1f2937; font-size: 15px;
    font-family: inherit; outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.u-input::placeholder { color: #94a3b8; }
.u-input:focus { border-color: #2dd4bf; background: #fff; box-shadow: 0 0 0 4px rgba(45,212,191,.18); }
.field.has-error { box-shadow: 0 0 0 2px rgba(239,68,68,.4); border-radius: 14px; }

/* 验证码行 + 发送按钮 */
.u-code-row { display: flex; gap: 10px; align-items: stretch; }
.field--grow { flex: 1; min-width: 0; }
.u-code-btn {
    flex: 0 0 auto; white-space: nowrap; padding: 0 16px; border: none; border-radius: 14px; cursor: pointer;
    background: linear-gradient(135deg, #2dd4bf, #6366f1); color: #fff;
    font-size: 14px; font-weight: 600; font-family: inherit;
    transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
    box-shadow: 0 6px 16px rgba(99,102,241,.3);
}
.u-code-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(99,102,241,.4); }
.u-code-btn:active:not(:disabled) { transform: scale(.97); }
.u-code-btn:disabled { opacity: .6; cursor: not-allowed; background: linear-gradient(135deg, #94a3b8, #cbd5e1); box-shadow: none; }

/* ---------- 标签页（找回密码页可能用到） ---------- */
.u-tabs { position: relative; display: flex; gap: 0; background: #f1f5f9; border-radius: 14px; padding: 5px; margin-bottom: 24px; }
.u-tab {
    flex: 1; padding: 12px 0; border: none; border-radius: 11px; cursor: pointer;
    background: transparent; color: #64748b; font-size: 14px; font-weight: 600;
    font-family: inherit; position: relative; z-index: 2; transition: color .25s ease;
}
.u-tab.active { color: #fff; background: linear-gradient(135deg, #14b8a6, #6366f1); box-shadow: 0 6px 16px rgba(99,102,241,.35); }

/* ---------- 按钮 ---------- */
.u-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 15px 22px; border: none; border-radius: 999px;
    font-size: 16px; font-weight: 700; cursor: pointer;
    font-family: inherit; text-decoration: none; white-space: nowrap; position: relative; overflow: hidden;
    transition: transform .18s ease, box-shadow .2s ease;
}
.u-btn--block { display: flex; width: 100%; margin-top: 6px; }
.u-btn--primary { background: linear-gradient(135deg, #14b8a6, #6366f1); color: #fff; box-shadow: 0 10px 26px rgba(99,102,241,.38); }
.u-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(99,102,241,.5); }
.u-btn--primary:active { transform: scale(.98); }
.u-btn--primary::after {
    content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
    transform: skewX(-20deg); transition: none;
}
.u-btn--primary:hover::after { animation: shine .8s ease; }
@keyframes shine { to { left: 130%; } }

/* ---------- 底部链接 ---------- */
.u-links { text-align: center; margin-top: 24px; display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.u-links a { color: #6366f1; text-decoration: none; font-size: 13px; font-weight: 600; transition: color .2s; }
.u-links a:hover { color: #0f766e; }

/* ---------- 实时提示 ---------- */
.u-hint { min-height: 16px; margin: 6px 2px 0; font-size: 12px; line-height: 1.4; color: #94a3b8; }
.u-hint--ok { color: #10b981; }
.u-hint--error { color: #ef4444; }
.u-hint--loading { color: #6366f1; }

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
    .u-card { padding: 28px 20px 26px; border-radius: 24px; }
    .u-auth-title { font-size: 23px; }
    .u-narrow { padding: 0; }
}
@media (max-width: 360px) {
    body.u-center { padding: 20px 12px; }
    .u-planet-core { width: 66px; height: 66px; font-size: 34px; }
    .u-planet-ring { width: 86px; height: 86px; top: -10px; left: -10px; }
}
