/* ============================================================
   登录页 · 晴天（白底极简版）
   对应设计稿：圆头像 + 晴天 + 账号/密码下划线 + 黑色圆角按钮
   头像自带缓慢自转，外圈光环反向旋转
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100%;
    background: #ffffff;
    color: #111114;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
                 "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: calc(30px + env(safe-area-inset-top)) 24px calc(26px + env(safe-area-inset-bottom));
}

.wrap {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    animation: wrap-in .55s cubic-bezier(.22, .8, .28, 1) both;
}

@keyframes wrap-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- 头像：圆形 + 自转 + 外圈光环 ---------- */
.avatar-wrap {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 0 auto 0;
    border-radius: 50%;
    isolation: isolate;
}

/* 外圈：会转的渐变光弧（中间掏空成环） */
.avatar-ring {
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(from 0deg,
        rgba(17, 17, 20, 0)    0deg,
        rgba(17, 17, 20, .05)  50deg,
        rgba(88, 104, 255, .85) 130deg,
        rgba(17, 17, 20, .70) 215deg,
        rgba(88, 104, 255, .25) 290deg,
        rgba(17, 17, 20, 0)    360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
    animation: ring-spin 3.6s linear infinite;
    will-change: transform;
}

/* 环外柔光，跟着一起呼吸 */
.avatar-halo {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(closest-side, rgba(88, 104, 255, .16), rgba(88, 104, 255, 0) 72%);
    animation: halo-pulse 3.6s ease-in-out infinite;
}

.avatar {
    position: relative;
    z-index: 1;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    overflow: hidden;
    background: #0d0d10;
    box-shadow: 0 12px 30px rgba(10, 12, 24, .22), 0 2px 6px rgba(10, 12, 24, .10);
}

/* 照片本体：缓慢自转 */
.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: 50% 50%;
    animation: avatar-spin 16s linear infinite;
    will-change: transform;
}

@keyframes avatar-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes ring-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

@keyframes halo-pulse {
    0%, 100% { opacity: .55; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
    .avatar img, .avatar-ring, .avatar-halo, .wrap { animation: none !important; }
}

/* ---------- 品牌名 ---------- */
.brand-name {
    margin: 40px 0 0;
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: .08em;
    color: #111114;
    line-height: 1.1;
}

/* ---------- 输入区 ---------- */
.field {
    position: relative;
    margin-top: 44px;
}

.field + .field {
    margin-top: 34px;
}

.field::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #dedee2;
    transition: background-color .22s ease, height .22s ease;
}

.field:focus-within::after {
    background: #111114;
    height: 2px;
}

.input-field {
    display: block;
    width: 100%;
    height: 46px;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 20px;
    font-weight: 400;
    color: #111114;
    padding: 0 0 10px;
    border-radius: 0;
    -webkit-appearance: none;
            appearance: none;
}

.input-field::placeholder {
    color: #bfbfc4;
    font-weight: 400;
}

.input-field:-webkit-autofill {
    -webkit-text-fill-color: #111114;
    transition: background-color 9999s ease-in-out 0s;
}

.forgot-link {
    display: block;
    text-align: right;
    margin-top: 10px;
    font-size: 13px;
    color: #b4b4b9;
    text-decoration: none;
}

.forgot-link:active {
    color: #6a6a70;
}

/* ---------- 按钮 ---------- */
.login-btn {
    display: block;
    width: 100%;
    height: 58px;
    margin-top: 26px;
    border: 0;
    border-radius: 16px;
    background: #111114;
    color: #ffffff;
    font-family: inherit;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .06em;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(10, 12, 24, .20);
    transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease;
    -webkit-appearance: none;
            appearance: none;
}

.login-btn:hover {
    box-shadow: 0 14px 30px rgba(10, 12, 24, .26);
}

.login-btn:active {
    transform: scale(.985);
    opacity: .9;
}

.login-btn:disabled {
    opacity: .6;
    cursor: default;
}

/* ---------- 联系方式 ---------- */
.tg-line {
    margin-top: 26px;
    text-align: center;
    font-size: 14px;
    color: #a2a2a8;
    letter-spacing: .02em;
}

.tg-line a {
    color: #111114;
    font-weight: 600;
    text-decoration: none;
}

/* ---------- 小屏微调 ---------- */
@media (max-height: 700px) {
    .brand-name { margin-top: 30px; font-size: 27px; }
    .field { margin-top: 34px; }
    .field + .field { margin-top: 26px; }
    .avatar-wrap, .avatar { width: 92px; height: 92px; }
    .login-btn { height: 54px; margin-top: 22px; }
}

@media (max-height: 600px) {
    .avatar-wrap, .avatar { width: 76px; height: 76px; }
    .brand-name { margin-top: 22px; font-size: 24px; }
    .field { margin-top: 26px; }
    .field + .field { margin-top: 20px; }
    .login-btn { height: 50px; }
    .tg-line { margin-top: 18px; }
}
