/* yuliao 聊天站样式（移动端优先，无外部依赖） */

:root {
    --bg:        #f2f3f7;
    --card:      #ffffff;
    --ink:       #1f2430;
    --ink-soft:  #7c8494;
    --line:      #e6e8ef;
    --brand:     #4a7dff;
    --brand-2:   #7a5cff;
    --bot-bub:   #ffffff;
    --me-bub:    #4a7dff;
    --danger:    #e5484d;
    --ok:        #2f9e44;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
}

/* ---------------- 登录 / 注册 ---------------- */

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(160deg, #eef1ff 0%, #f7f8fc 45%, #f2f3f7 100%);
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--card);
    border-radius: 18px;
    padding: 28px 22px 22px;
    box-shadow: 0 10px 40px rgba(31, 36, 48, .08);
}

.auth-logo {
    margin: 0 0 6px;
    font-size: 26px;
    letter-spacing: .5px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
}

.auth-sub {
    margin: 0 0 20px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 13px;
}

.auth-card label {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--ink-soft);
}

.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="number"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    font-size: 15px;
    color: var(--ink);
    background: #fbfbfe;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.auth-card input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(74, 125, 255, .14);
    background: #fff;
}

.auth-card label.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 14px;
}

.btn-primary {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: opacity .15s;
}

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

.msg { min-height: 20px; margin-top: 10px; font-size: 13px; text-align: center; }
.msg.err { color: var(--danger); }
.msg.ok  { color: var(--ok); }

.auth-foot { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--ink-soft); }
.auth-foot a { color: var(--brand); text-decoration: none; }

/* ---------------- 聊天页 ---------------- */

.chat-body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg);
}

.chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
}

.chat-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bot-name { font-weight: 600; }
.chat-sub { color: var(--ink-soft); font-size: 12px; }

.dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #37b24d;
    box-shadow: 0 0 0 3px rgba(55, 178, 77, .18);
    flex: none;
}

.chat-actions { display: flex; align-items: center; gap: 10px; }
.me { color: var(--ink-soft); font-size: 13px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn-ghost {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-soft);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
}
.btn-ghost:disabled { opacity: .5; }

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px 6px;
    -webkit-overflow-scrolling: touch;
}

.chat-loading { text-align: center; color: var(--ink-soft); font-size: 13px; padding: 20px 0; }

.msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}

.msg-row.from-me { flex-direction: row-reverse; }

.avatar {
    width: 32px; height: 32px; flex: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: #fff;
    background: linear-gradient(135deg, #9aa7c7, #76839f);
}
.from-bot .avatar { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }

.bubble {
    max-width: 74%;
    padding: 9px 12px 6px;
    border-radius: 14px;
    background: var(--bot-bub);
    box-shadow: 0 1px 3px rgba(31, 36, 48, .07);
    word-break: break-word;
    white-space: pre-wrap;
}

.from-me .bubble {
    background: var(--me-bub);
    color: #fff;
}

.bubble .content { line-height: 1.45; }

.bubble .time {
    margin-top: 3px;
    font-size: 11px;
    color: rgba(124, 132, 148, .85);
    text-align: right;
}
.from-me .bubble .time { color: rgba(255, 255, 255, .75); }

/* 正在输入的三点动画 */
.typing .bubble { padding: 12px 14px; }
.typing span {
    display: inline-block;
    width: 6px; height: 6px;
    margin-right: 4px;
    border-radius: 50%;
    background: #b9c1d4;
    animation: blink 1.2s infinite;
}
.typing span.d2 { animation-delay: .2s; }
.typing span.d3 { animation-delay: .4s; }

@keyframes blink {
    0%, 80%, 100% { opacity: .25; transform: translateY(0); }
    40%           { opacity: 1;   transform: translateY(-3px); }
}

.chat-input {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
}

.chat-input textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.4;
    max-height: 120px;
    outline: none;
    background: #fbfbfe;
}

.chat-input textarea:focus { border-color: var(--brand); background: #fff; }

.btn-send {
    flex: none;
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}
.btn-send:disabled { opacity: .6; cursor: default; }

/* ---------------- P1 介绍页（漏斗第一步） ---------------- */

.landing-body {
    min-height: 100dvh;
    background: radial-gradient(120% 80% at 50% 0%, #2a2140 0%, #16131f 55%, #0e0c14 100%);
    color: #f4f2f8;
    overflow-x: hidden;
}

.landing {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 40px 24px calc(40px + env(safe-area-inset-bottom));
    text-align: center;
}

/* 背景那团光晕（纯装饰） */
.landing-glow {
    position: absolute;
    top: -120px;
    width: 420px;
    height: 420px;
    max-width: 120vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 96, 168, .38) 0%, rgba(122, 92, 255, .22) 45%, rgba(0, 0, 0, 0) 70%);
    filter: blur(10px);
    pointer-events: none;
}

.landing-title {
    position: relative;
    margin: 0;
    font-size: 30px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .5px;
    background: linear-gradient(95deg, #ffd9ea, #ff9ec7 40%, #c9a6ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.landing-sub {
    position: relative;
    max-width: 460px;
    font-size: 15px;
    line-height: 1.8;
    color: #b9b3cb;
}

.btn-cta {
    position: relative;
    display: inline-block;
    margin-top: 8px;
    padding: 15px 44px;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(95deg, #ff5f9e, #b15cff);
    box-shadow: 0 10px 30px rgba(255, 95, 158, .35), 0 2px 8px rgba(0, 0, 0, .4);
    animation: ctaPulse 2.4s ease-in-out infinite;
}

.btn-cta:active { transform: scale(.97); }

@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(255, 95, 158, .35), 0 2px 8px rgba(0, 0, 0, .4); }
    50%      { box-shadow: 0 14px 40px rgba(255, 95, 158, .55), 0 2px 8px rgba(0, 0, 0, .4); }
}

.landing-note {
    position: relative;
    max-width: 420px;
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: #8b85a0;
}

/* ---------------- P2 门槛页 ---------------- */

.gate-logo {
    margin: 0 0 6px;
    font-size: 24px;
    letter-spacing: .5px;
    text-align: center;
    background: linear-gradient(90deg, #ff5f9e, #b15cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gate-note {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    font-size: 12px;
    line-height: 1.7;
    color: var(--ink-soft);
    text-align: center;
}
