/* ===== 认证页（登录 / 注册 / 找回密码）· 色块便当皮肤 =====
   三个页面共用本文件，页面里只放结构与脚本，改皮肤只改这里。 */

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

:root {
    --f: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --ink: #22201a;
    --ink-soft: #5c574b;
    --muted: #8f897c;
    --line: #e9e3d5;
    --field: #fbfaf6;
    --green: #1f6b46;
    --lemon: #ffe86b;
}

body {
    font-family: var(--f);
    background: #f4f1e9;
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    position: relative;
    overflow-x: hidden;
}

/* ===== 背景色块 ===== */
.bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.block { position: absolute; border-radius: 22px; }
.block.b1 { width: 176px; height: 176px; background: var(--lemon); top: -48px; left: -32px; animation: bob 9s ease-in-out infinite; }
.block.b2 { width: 138px; height: 138px; background: #b8f0cd; bottom: -36px; left: 24%; animation: bob 7s ease-in-out infinite; }
.block.b3 { width: 190px; height: 190px; background: #ded0ff; top: 44%; right: -50px; animation: bob 8.5s ease-in-out infinite; }
.block.b4 { width: 78px; height: 78px; background: #ffd6a8; bottom: 11%; left: 5%; border-radius: 18px; animation: bob 6s ease-in-out infinite; }

@keyframes bob {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-14px) rotate(1.6deg); }
}
@keyframes pop {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to { opacity: 1; transform: none; }
}
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes sweep { to { left: 150%; } }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ===== 卡片 ===== */
.card {
    position: relative;
    z-index: 2;
    width: 1040px;
    max-width: 100%;
    min-height: 540px;
    display: grid;
    grid-template-columns: 440px 1fr;
    border-radius: 26px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #efe9dc;
    box-shadow: 0 30px 60px rgba(120, 100, 40, .11);
    animation: pop .6s cubic-bezier(.2, .8, .2, 1) both;
}

/* ===== 左：品牌 + 大标题 ===== */
.side {
    padding: 40px 36px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 30px;
    background: linear-gradient(165deg, #ffe86b 0%, #ffd6a8 55%, #c9f0dc 100%);
    color: #2f2a1c;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-ico {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #111; color: var(--lemon);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .06em; color: var(--ink); }

.hero { animation: rise .6s ease both; }
.hero h1 {
    font-size: 68px;
    line-height: 1.04;
    font-weight: 700;
    letter-spacing: -.03em;
    color: #1c1a14;
}
.hero .en {
    margin-top: 18px;
    font-size: 14px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--green);
    font-weight: 700;
}

/* ===== 右：表单 ===== */
.form { padding: 54px 52px 44px; display: flex; flex-direction: column; justify-content: center; }
.form-head { margin-bottom: 30px; }
h2.big { font-size: 29px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }

.fieldset, form > .form-group, form > .form-row { animation: rise .5s ease both; }
.fieldset > *:nth-child(2) { animation-delay: .05s; }
.fieldset > *:nth-child(3) { animation-delay: .1s; }
.fieldset > *:nth-child(4) { animation-delay: .15s; }
.fieldset > *:nth-child(5) { animation-delay: .2s; }

.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row .form-group { margin-bottom: 16px; }

label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }

input {
    width: 100%;
    height: 48px;
    font-family: var(--f);
    font-size: 14.5px;
    color: var(--ink);
    background: var(--field);
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: 0 15px;
    outline: none;
    transition: .18s;
}
input::placeholder { color: #bdb7a8; }
input:focus {
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(31, 107, 70, .1);
}

.code-row { display: flex; gap: 9px; }
.code-row input { flex: 1; }
.code-btn {
    font-family: var(--f);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    cursor: pointer;
    transition: .18s;
    border: 1.5px solid var(--line);
    background: var(--field);
    color: var(--green);
}
.code-btn:hover:not(:disabled) { border-color: var(--green); background: rgba(31, 107, 70, .07); }
.code-btn:disabled { opacity: .5; cursor: not-allowed; color: var(--muted); }

.login-btn {
    margin-top: 10px;
    width: 100%;
    height: 52px;
    border: none;
    cursor: pointer;
    font-family: var(--f);
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: 16px;
    color: var(--lemon);
    background: #111;
    position: relative;
    overflow: hidden;
    transition: transform .18s, box-shadow .18s;
}
.login-btn span { position: relative; z-index: 2; }
.login-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    z-index: 1;
    background: linear-gradient(100deg, transparent, rgba(255, 232, 107, .34), transparent);
    transform: skewX(-18deg);
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(0, 0, 0, .22); }
.login-btn:hover::after { animation: sweep .75s ease; }
.login-btn:active { transform: translateY(0) scale(.99); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.login-error, .login-success {
    display: none;
    font-size: 13px;
    margin-top: 12px;
    line-height: 1.5;
}
.login-error { color: #c0392b; }
.login-success { color: var(--green); }
.login-error.show, .login-success.show { display: block; }

.form-footer {
    margin-top: 20px;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.form-footer a {
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: .16s;
}
.form-footer a:hover { border-bottom-color: var(--green); }

/* ===== 响应式 ===== */
@media (max-width: 960px) {
    body { padding: 18px 14px; align-items: flex-start; }
    .card { grid-template-columns: 1fr; min-height: 0; }
    .side { padding: 30px 26px; gap: 22px; }
    .hero h1 { font-size: 46px; }
    .form { padding: 32px 26px 34px; }
    .block.b3 { display: none; }
}

@media (max-width: 520px) {
    .hero h1 { font-size: 38px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
}
