/* ===== 登录 / 注册 弹窗 ===== */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #f4f5f7;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}
.auth-modal[hidden] { display: none; }

.auth-topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 54px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #ff5a4c;
    color: #fff;
}

.auth-back,
.auth-close {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.auth-back svg,
.auth-close svg { width: 22px; height: 22px; stroke: #fff; }

.auth-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    position: relative;
    height: 22px;
}
.auth-title span {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.auth-modal[data-mode="login"]    .auth-title span[data-title="login"],
.auth-modal[data-mode="register"] .auth-title span[data-title="register"] {
    opacity: 1;
}

.auth-modal[data-mode="login"] .auth-back { visibility: hidden; }

.auth-modal[hidden] { display: none; }

/* 品牌区 - 随模式平滑收缩 */
.auth-brand {
    text-align: center;
    overflow: hidden;
    max-height: 180px;
    padding: 26px 0 16px;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
}
.auth-modal[data-mode="register"] .auth-brand {
    max-height: 0;
    padding: 0;
    opacity: 0;
}
.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7d77a, #b8842a 70%, #8c5f16);
    box-shadow: 0 4px 12px rgba(184, 132, 42, 0.25);
    margin-bottom: 10px;
}
.logo-mark svg { width: 28px; height: 28px; }
.logo-en {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 5px;
    color: #b8842a;
}
.logo-cn {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 5px;
    margin-top: 2px;
    color: #b8842a;
}

.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 18px 0 22px;
    position: relative;
}
.auth-tab {
    font-size: 15px;
    color: #666;
    padding: 6px 4px 10px;
    position: relative;
    transition: color 0.2s ease;
}
.auth-tab::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    bottom: 0;
    width: 70px;
    height: 2px;
    background: #ff4d4f;
    border-radius: 2px;
    transition: transform 0.25s ease;
}
.auth-modal[data-mode="login"]    .auth-tab[data-mode="login"],
.auth-modal[data-mode="register"] .auth-tab[data-mode="register"] {
    color: #ff4d4f;
    font-weight: 500;
}
.auth-modal[data-mode="login"]    .auth-tab[data-mode="login"]::after,
.auth-modal[data-mode="register"] .auth-tab[data-mode="register"]::after {
    transform: translateX(-50%) scaleX(1);
}

/* 横向滑动舞台 */
.auth-stage {
    flex: 1;
    overflow: hidden;
}
.auth-panels {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-panel {
    width: 100%;
    flex: 0 0 100%;
    min-width: 0;
    padding: 0 22px 30px;
    box-sizing: border-box;
}
.auth-modal[data-mode="register"] .auth-panels {
    transform: translateX(-100%);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-register .auth-form { gap: 4px; }

.auth-hint {
    font-size: 12px;
    color: #9aa0a6;
    padding: 4px 4px 8px;
}

.auth-field {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 28px;
    padding: 0 16px;
    height: 46px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee;
}
.auth-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-icon svg { width: 20px; height: 20px; }

.auth-field input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    min-width: 0;
}
.auth-field input::placeholder { color: #bbb; }

.captcha-canvas {
    flex: 0 0 auto;
    margin-left: 10px;
    width: 80px;
    height: 32px;
    cursor: pointer;
    background: #fff;
}

.auth-submit {
    margin-top: 12px;
    height: 46px;
    border-radius: 4px;
    background: #ff5a4c;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    border: 0;
    cursor: pointer;
    letter-spacing: 4px;
    width: 100%;
}
.auth-submit:active { background: #e64a3d; }

.panel-register .auth-submit {
    margin-top: 18px;
    letter-spacing: 6px;
}

.auth-link {
    font-size: 13px;
    color: #8a8a8a;
    margin-top: 10px;
    padding-left: 4px;
    align-self: flex-start;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.auth-agree {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-top: 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e3e4e6;
}
.auth-agree input { display: none; }
.auth-agree input:not(:checked) + .agree-box {
    background: #fff;
    border: 1px solid #ccc;
}
.auth-agree input:not(:checked) + .agree-box::after { display: none; }

.auth-service {
    position: fixed;
    right: calc(50% - 230px);
    bottom: 110px;
    z-index: 3;
}
@media (max-width: 480px) {
    .auth-service { right: 16px; }
}

/* =========================================================
   下面是早期独立 register.html 的样式。现在 register.html 是
   <meta refresh> 到 index.html?mode=register 的空壳,实际用的
   是上面的 .auth-* 体系。这块保留以防有人滚回旧 HTML。
   ========================================================= */
.reg-app {
    background: #f4f5f7;
    padding-bottom: 40px;
    min-height: 100vh;
}

.reg-header {
    position: relative;
    background: #ff5a4c;
    color: #fff;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reg-header h1 {
    font-size: 17px;
    font-weight: 500;
}
.reg-back {
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reg-back svg { width: 24px; height: 24px; }

.reg-tabs {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 22px 0 28px;
    background: transparent;
    position: relative;
}
.reg-tab {
    font-size: 15px;
    color: #666;
    padding: 6px 4px 10px;
    position: relative;
}
.reg-tab.active { color: #ff4d4f; }
.reg-tab.active::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 70px;
    height: 2px;
    background: #ff4d4f;
    border-radius: 2px;
}

.reg-form {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reg-hint {
    font-size: 12px;
    color: #9aa0a6;
    padding: 6px 4px 12px;
}

.reg-agree {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-top: 16px;
}
.reg-agree input { display: none; }
.agree-box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: #ff5a4c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.agree-box::after {
    content: "";
    width: 8px;
    height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translate(0, -1px) rotate(-45deg);
}
.reg-agree input:not(:checked) + .agree-box {
    background: #fff;
    border: 1px solid #ccc;
}
.reg-agree input:not(:checked) + .agree-box::after { display: none; }
.agree-link { color: #3c9dff; }

.reg-hr {
    border: 0;
    border-top: 1px solid #e3e4e6;
    margin: 16px 0 14px;
}

.reg-submit {
    margin-top: 6px;
    height: 48px;
    border-radius: 4px;
    background: #ff5a4c;
    color: #fff;
    font-size: 16px;
    border: 0;
    cursor: pointer;
    letter-spacing: 6px;
}
.reg-submit:active { background: #e64a3d; }

.reg-service {
    position: fixed;
    right: calc(50% - 230px);
    bottom: 130px;
}
@media (max-width: 480px) {
    .reg-service { right: 16px; }
}
