/* =========================================================
   user/auth.css  —  Qni歌P曲库「认证页」全新视觉风格
   极光渐变背景 + 白色玻璃拟态卡片 + 图标输入框 + 滑动标签页
   独立文件，不依赖 user.css 的薄荷绿体系。
   ========================================================= */

/* ---------- 基础重置 ---------- */
* { 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, #6d28d9 0%, #4f46e5 42%, #0ea5e9 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(80px);
    z-index: 0;
    pointer-events: none;
    opacity: .6;
}
body::before {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(236,72,153,.65), transparent 70%);
    top: -140px; right: -100px;
    animation: auroraFloat 18s ease-in-out infinite;
}
body::after {
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(56,189,248,.6), transparent 70%);
    bottom: -160px; left: -120px;
    animation: auroraFloat 22s ease-in-out infinite reverse;
}
@keyframes auroraFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(26px, -30px) scale(1.1); }
}

/* 居中布局 */
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: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 30px;
    padding: 34px 28px 30px;
    box-shadow: 0 24px 60px rgba(31, 16, 71, .38);
    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, #8b5cf6, #ec4899);
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; color: #fff;
    box-shadow: 0 10px 28px rgba(139, 92, 246, .5);
    border: 2px solid rgba(255, 255, 255, .55);
}
.u-planet-ring {
    position: absolute; width: 98px; height: 98px;
    border: 2px solid rgba(255, 255, 255, .45); 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: 27px; font-weight: 800; line-height: 1.3; margin: 16px 0 6px;
    background: linear-gradient(120deg, #ffffff 0%, #fbcfe8 55%, #bae6fd 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 1px 1px rgba(255,255,255,.15);
}
.u-auth-sub { color: rgba(255, 255, 255, .82); font-size: 13.5px; letter-spacing: .4px; }
.u-auth-divider {
    height: 3px; width: 60px; margin: 18px auto 26px; border-radius: 3px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
}

/* ---------- 消息提示 ---------- */
.u-msg {
    padding: 12px 18px; border-radius: 16px; margin-bottom: 18px;
    font-size: 13px; font-weight: 600; text-align: center;
    backdrop-filter: blur(8px);
}
.u-msg--success { background: rgba(16,185,129,.18); border: 1px solid rgba(16,185,129,.6); color: #d1fae5; }
.u-msg--error   { background: rgba(239,68,68,.18); border: 1px solid rgba(239,68,68,.6); color: #fee2e2; }

/* ---------- 表单 ---------- */
.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: #fff; font-size: 13.5px; letter-spacing: .3px; }
.u-required { color: #fca5a5; margin-left: 2px; }

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

.u-input {
    width: 100%; padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .45); border-radius: 15px;
    background: rgba(255, 255, 255, .92); 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: #9ca3af; }
.u-input:focus {
    border-color: #c084fc;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(192, 132, 252, .28);
}

/* ---------- 验证码行 + 发送按钮 ---------- */
.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: 15px; cursor: pointer;
    background: linear-gradient(135deg, #0ea5e9, #2563eb); 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(37, 99, 235, .35);
}
.u-code-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(37, 99, 235, .5); }
.u-code-btn:active:not(:disabled) { transform: scale(.97); }
.u-code-btn:disabled { opacity: .6; cursor: not-allowed; background: linear-gradient(135deg, #93c5e8, #a5b4d4); box-shadow: none; }

/* ---------- 标签页（登录） ---------- */
.u-tabs {
    position: relative; display: flex; gap: 0;
    background: rgba(255, 255, 255, .18); border-radius: 15px;
    padding: 5px; margin-bottom: 24px;
}
.u-tab {
    flex: 1; padding: 12px 0; border: none; border-radius: 11px; cursor: pointer;
    background: transparent; color: rgba(255,255,255,.85); font-size: 14px; font-weight: 600;
    font-family: inherit; position: relative; z-index: 2; transition: color .25s ease;
}
.u-tab.active { color: #fff; }
.u-tabs__slider {
    position: absolute; top: 5px; bottom: 5px; left: 5px;
    width: calc(50% - 5px); border-radius: 11px; z-index: 1;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    box-shadow: 0 6px 16px rgba(139, 92, 246, .45);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
}
.u-tabs[data-active="code"] .u-tabs__slider { transform: translateX(100%); }

/* ---------- 按钮 ---------- */
.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, #8b5cf6, #ec4899); color: #fff;
    box-shadow: 0 10px 26px rgba(236, 72, 153, .45);
}
.u-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(236, 72, 153, .6); }
.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 0.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: rgba(255,255,255,.88); text-decoration: none; font-size: 13px; font-weight: 500; transition: color .2s, text-shadow .2s; }
.u-links a:hover { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,.6); }

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
    .u-card { padding: 28px 20px 26px; border-radius: 26px; }
    .u-auth-title { font-size: 24px; }
    .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; }
}
