/* ==========================================================
   前台公共样式：活动页 /bar、报名页 /bar/join
   ========================================================== */

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: #120d0a; color: #f6ece2; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- 公共提示 ---------- */
.toast {
    position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
    max-width: 78%; padding: 13px 20px; border-radius: 12px;
    background: rgba(30, 20, 14, .96); border: 1px solid rgba(255, 138, 30, .3);
    color: #ffe9d5; font-size: 14px; text-align: center; line-height: 1.5;
    z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s;
}
.toast.on { opacity: 1; }

/* 调试面板会遮挡底部按钮，前台页面隐藏 */
#think_page_trace, #think_page_trace_open, #think_page_trace_tab { display: none !important; }

/* ==========================================================
   活动页 /bar
   ========================================================== */
.app { max-width: 750px; margin: 0 auto; position: relative; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

/* ---------- 顶部 banner 轮播 ---------- */
.hero { position: relative; background: #0b0806; overflow: hidden; }
.swiper { position: relative; width: 100%; overflow: hidden; }
.swiper-track { display: flex; width: 100%; transition: transform .45s ease; will-change: transform; }
.slide { flex: 0 0 100%; width: 100%; height: 62vw; max-height: 460px; min-height: 240px; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.slide-empty {
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 138, 30, .5) 0%, rgba(255, 91, 46, 0) 45%),
        radial-gradient(circle at 80% 70%, rgba(255, 70, 30, .42) 0%, rgba(255, 70, 30, 0) 50%),
        linear-gradient(135deg, #2a1409 0%, #160c07 55%, #25100a 100%);
}
.slide-empty span {
    font-size: 22px; letter-spacing: 6px; color: #ffcf9b;
    text-shadow: 0 0 18px rgba(255, 138, 30, .75);
}

.hero-mask {
    position: absolute; left: 0; right: 0; bottom: 0; height: 70%;
    background: linear-gradient(to top, #120d0a 2%, rgba(18, 13, 10, .75) 38%, rgba(18, 13, 10, 0) 100%);
    pointer-events: none;
}
.hero-title { position: absolute; left: 20px; right: 20px; bottom: 20px; }
.hero-title .eyebrow {
    display: inline-block; font-size: 11px; letter-spacing: 3px; color: #ffb066;
    border: 1px solid rgba(255, 138, 30, .5); border-radius: 20px;
    padding: 3px 12px; margin-bottom: 10px; background: rgba(255, 138, 30, .1);
}
.hero-title h1 {
    font-size: 26px; line-height: 1.35; font-weight: 700;
    color: #fff4e8; text-shadow: 0 2px 14px rgba(0, 0, 0, .6);
}
.dots { position: absolute; right: 20px; bottom: 26px; display: flex; gap: 6px; }
.dots i {
    width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .32);
    transition: all .25s; display: block;
}
.dots i.on { width: 16px; border-radius: 3px; background: #ff8a1e; }

/* ---------- 内容卡片 ---------- */
.content { padding: 18px 16px 8px; }
.card {
    position: relative;
    background: linear-gradient(160deg, #1e1713 0%, #171110 100%);
    border: 1px solid rgba(255, 138, 30, .16);
    border-radius: 16px;
    padding: 18px 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sec-no {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px; font-style: italic; font-weight: 700;
    color: rgba(255, 138, 30, .85);
}
.sec-head h2 { font-size: 17px; font-weight: 600; color: #ffe9d5; white-space: nowrap; }
.sec-line { flex: 1; height: 1px; background: linear-gradient(to right, rgba(255, 138, 30, .45), rgba(255, 138, 30, 0)); }

.rich { font-size: 15px; line-height: 1.85; color: #ddd0c4; word-break: break-word; }
.rich p { margin: 0 0 10px; }
.rich p:last-child { margin-bottom: 0; }
.rich img { width: 100%; border-radius: 10px; margin: 10px 0; }
.rich br { line-height: 1.85; }
.rich ul, .rich ol { padding-left: 20px; margin-bottom: 10px; }

.addr-box { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 138, 30, .08); border: 1px dashed rgba(255, 138, 30, .35); }
.addr-box svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; fill: #ff9a3c; }
.addr-box p { font-size: 14.5px; color: #f2e2d4; line-height: 1.55; }
.addr-box + .addr-box { margin-top: 10px; }

.member-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.member-head span { font-size: 13px; color: #a2938a; }
.member-head b { color: #ff9a3c; font-size: 16px; font-weight: 700; margin: 0 3px; }
.avatars { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: #fff;
    background: linear-gradient(135deg, #ff9a3c, #e14d21);
    box-shadow: 0 0 0 2px rgba(255, 138, 30, .18);
    font-weight: 600;
}
.avatar:nth-child(3n+2) { background: linear-gradient(135deg, #ffb347, #c9761b); }
.avatar:nth-child(3n+3) { background: linear-gradient(135deg, #f2703c, #9c2f14); }
.empty-join { font-size: 13.5px; color: #8d8078; padding: 6px 0; }

/* ---------- 底部操作 ---------- */
.bar-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: flex; gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(18, 13, 10, .92);
    border-top: 1px solid rgba(255, 138, 30, .18);
    backdrop-filter: blur(10px);
}
.bar-actions .inner { display: flex; gap: 12px; width: 100%; max-width: 750px; margin: 0 auto; }
.btn {
    flex: 1; height: 48px; border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16.5px; font-weight: 600; letter-spacing: 1px;
    border: none; cursor: pointer;
}
.btn-primary {
    flex: 1.2;
    color: #2b1204;
    background: linear-gradient(135deg, #ffb347 0%, #ff7a18 55%, #ff5b2e 100%);
    box-shadow: 0 6px 18px rgba(255, 122, 24, .38);
    animation: breathe 2.4s ease-in-out infinite;
}
.btn-ghost {
    color: #ffb066;
    background: rgba(255, 138, 30, .08);
    border: 1px solid rgba(255, 138, 30, .55);
}
@keyframes breathe {
    0%, 100% { box-shadow: 0 6px 18px rgba(255, 122, 24, .32); }
    50% { box-shadow: 0 6px 26px rgba(255, 122, 24, .6); }
}

/* ---------- 复制失败弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, .7); padding: 24px; }
.modal.on { display: flex; }
.modal-box { width: 100%; max-width: 420px; background: #1e1713; border: 1px solid rgba(255, 138, 30, .3); border-radius: 16px; padding: 20px; }
.modal-box h3 { font-size: 16px; margin-bottom: 10px; color: #ffe9d5; }
.modal-box p { font-size: 13px; color: #a2938a; margin-bottom: 12px; }
.modal-box input { width: 100%; height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 138, 30, .35); background: #120d0a; color: #ffcf9b; font-size: 13px; margin-bottom: 14px; }
.modal-box textarea { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid rgba(255, 138, 30, .35); background: #120d0a; color: #ffcf9b; font-size: 13px; line-height: 1.6; margin-bottom: 14px; resize: none; font-family: inherit; }
.modal-box .modal-btn { height: 42px; width: 100%; border-radius: 21px; border: none; background: linear-gradient(135deg, #ffb347, #ff5b2e); color: #2b1204; font-size: 15px; font-weight: 600; }

/* ---------- 空状态 ---------- */
.empty-page { padding: 80px 24px; text-align: center; }
.empty-page h2 { font-size: 19px; color: #ffe9d5; margin-bottom: 10px; }
.empty-page p { font-size: 14px; color: #a2938a; line-height: 1.8; }
.empty-page .flame { font-size: 40px; margin-bottom: 18px; color: #ff8a1e; }

@media (min-width: 560px) {
    .hero-title h1 { font-size: 30px; }
    .content { padding: 22px 22px 10px; }
    .slide { height: 420px; }
}

/* ==========================================================
   报名页 /bar/join
   ========================================================== */
.wrap {
    max-width: 640px; margin: 0 auto;
    min-height: 100vh;
    padding: 0 18px calc(24px + env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 85% 0%, rgba(255, 122, 24, .16) 0%, rgba(255, 122, 24, 0) 42%),
        radial-gradient(circle at 0% 100%, rgba(255, 91, 46, .12) 0%, rgba(255, 91, 46, 0) 45%);
}

/* ---------- 顶部 ---------- */
.head { padding: 26px 0 18px; }
.back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13.5px; color: #b9a99d; margin-bottom: 18px;
}
.back svg { width: 16px; height: 16px; fill: #b9a99d; }
.head h1 { font-size: 23px; font-weight: 700; color: #fff4e8; letter-spacing: .5px; }
.head p { font-size: 13.5px; color: #a2938a; margin-top: 6px; }
.head .tag {
    display: inline-block; margin-top: 12px; font-size: 11.5px; letter-spacing: 1px;
    color: #ffb066; border: 1px solid rgba(255, 138, 30, .45);
    background: rgba(255, 138, 30, .09); border-radius: 20px; padding: 3px 11px;
}

/* ---------- 表单 ---------- */
.form-card {
    background: linear-gradient(160deg, #1e1713 0%, #171110 100%);
    border: 1px solid rgba(255, 138, 30, .16);
    border-radius: 18px;
    padding: 20px 16px 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.field { margin-bottom: 18px; }
.field > label {
    display: block; font-size: 13.5px; color: #d8c8bb; margin-bottom: 8px;
}
.field > label em { color: #ff7a18; font-style: normal; margin-left: 3px; }
.field input[type="text"], .field input[type="tel"], .field input[type="number"], .field select, .field textarea {
    width: 100%; border: 1px solid rgba(255, 255, 255, .1);
    background: #100c0a; color: #f6ece2;
    border-radius: 12px; padding: 12px 14px;
    font-size: 15px; outline: none;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
}
.field input::placeholder, .field textarea::placeholder { color: #5f544c; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: rgba(255, 138, 30, .65);
    box-shadow: 0 0 0 3px rgba(255, 138, 30, .12);
}
.field select { appearance: none; -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #8a7b70 50%), linear-gradient(135deg, #8a7b70 50%, transparent 50%);
    background-position: calc(100% - 20px) 20px, calc(100% - 14px) 20px;
    background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
.field .hint { font-size: 12px; color: #7b6d63; margin-top: 6px; }

/* 蜜罐字段：正常用户看不到，脚本自动填写时会被服务端拦截 */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 性别选项 ---------- */
.chips { display: flex; gap: 10px; }
.chip {
    flex: 1; text-align: center; padding: 11px 0;
    border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
    background: #100c0a; color: #cbbbb0; font-size: 14.5px;
    cursor: pointer; transition: all .2s;
}
.chip.on {
    border-color: rgba(255, 138, 30, .8);
    background: rgba(255, 138, 30, .16);
    color: #ffcf9b;
    box-shadow: 0 0 0 3px rgba(255, 138, 30, .1);
}

.submit-btn {
    width: 100%; height: 50px; margin-top: 6px; border: none; cursor: pointer;
    border-radius: 25px; font-size: 17px; font-weight: 700; letter-spacing: 1.5px;
    color: #2b1204;
    background: linear-gradient(135deg, #ffb347 0%, #ff7a18 55%, #ff5b2e 100%);
    box-shadow: 0 8px 22px rgba(255, 122, 24, .38);
    transition: transform .15s, opacity .2s;
}
.submit-btn:active { transform: scale(.98); }
.submit-btn:disabled { opacity: .6; }
.foot-note { text-align: center; font-size: 12px; color: #6f635a; margin-top: 14px; }

/* ---------- 成功页 ---------- */
.success { display: none; padding: 40px 0 10px; text-align: center; }
.success.on { display: block; }
.success .icon {
    width: 82px; height: 82px; margin: 0 auto 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 35% 30%, #ffb347, #ff5b2e);
    box-shadow: 0 0 34px rgba(255, 122, 24, .5);
}
.success .icon svg { width: 38px; height: 38px; fill: #2b1204; }
.success h2 { font-size: 23px; color: #fff4e8; margin-bottom: 10px; }
.success p { font-size: 14px; color: #a2938a; line-height: 1.9; }
.success .btns { display: flex; gap: 12px; margin-top: 28px; }
.success .btns a {
    flex: 1; height: 46px; border-radius: 23px; display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 600;
}
.success .btns a.ghost { color: #ffb066; border: 1px solid rgba(255, 138, 30, .55); background: rgba(255, 138, 30, .08); }
.success .btns a.primary { color: #2b1204; background: linear-gradient(135deg, #ffb347, #ff5b2e); }

/* ---------- 无活动 ---------- */
.no-bar { padding: 60px 0; text-align: center; }
.no-bar h2 { font-size: 18px; color: #ffe9d5; margin-bottom: 10px; }
.no-bar p { font-size: 14px; color: #a2938a; }
.no-bar a { display: inline-block; margin-top: 20px; color: #ffb066; font-size: 14.5px; }
