/* =====================================================
   首页 · 心动匹配（游戏页）
   ===================================================== */

/* ---------- 顶部导航 ---------- */
.topbar {
    position: sticky;
    top: 8px;
    z-index: 60;
    max-width: 1200px;
    margin: 10px auto;
    padding: 9px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(14px);
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(233, 30, 99, .14);
    border: 1px solid rgba(255, 255, 255, .8);
}
.topbar .brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--pink-deep);
    font-weight: 700;
    font-size: 1.02rem;
    white-space: nowrap;
}
.top-links { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.top-links a {
    text-decoration: none;
    color: var(--ink);
    font-size: .84rem;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
    transition: background .25s, color .25s;
}
.top-links a:hover { background: linear-gradient(120deg, var(--pink), var(--purple)); color: #fff; }

/* ---------- 主舞台三栏 ---------- */
.stage {
    max-width: 1200px;
    margin: 14px auto 0;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    gap: 16px;
    align-items: start;
    position: relative;
    z-index: 1;
}

/* 嘉宾侧栏 */
.guest-side {
    background: rgba(255, 255, 255, .68);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(233, 30, 99, .12);
    padding: 16px 14px;
    position: sticky;
    top: 70px;
}
.side-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(233, 30, 99, .15);
}
.side-icon { font-size: 1.2rem; }
.side-head h3 { font-size: 1rem; color: var(--pink-deep); flex: 1; }
.side-count { font-style: normal; font-size: .72rem; color: var(--ink-light); }

.guest-list { display: flex; flex-direction: column; gap: 7px; max-height: 520px; overflow-y: auto; padding-right: 2px; }
.g-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .85);
    border: 1px solid rgba(233, 30, 99, .14);
    border-radius: 12px;
    padding: 9px 12px;
    font-size: .86rem;
    color: #5c3a54;
    animation: guestIn .5s ease;
}
@keyframes guestIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
#female-side .g-card { animation-name: guestInR; }
@keyframes guestInR { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.g-card .g-avatar {
    width: 30px; height: 30px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: .95rem;
    background: linear-gradient(140deg, #cfe5ff, #e3d5ff);
}
#female-side .g-avatar { background: linear-gradient(140deg, #ffd6e7, #ffe9cf); }
.g-card .g-nick { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-card.me { border-color: var(--pink); background: linear-gradient(120deg, rgba(255, 143, 171, .18), rgba(181, 123, 234, .18)); }
.g-card.me .g-nick { font-weight: 700; color: var(--pink-deep); }
.g-empty { text-align: center; color: var(--ink-light); font-size: .8rem; padding: 18px 0; }

/* ---------- 中间游戏区 ---------- */
.stage-center { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.game-heart {
    position: relative;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(181, 123, 234, .22), transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 143, 171, .25), transparent 55%),
        rgba(255, 255, 255, .68);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(233, 30, 99, .14);
    padding: 30px 26px 26px;
    overflow: hidden;
}
/* 飞向中心的爱心 */
.fly-heart {
    position: absolute;
    font-size: 18px;
    opacity: 0;
    pointer-events: none;
    animation: flyToHeart 2.6s ease-in forwards;
}
@keyframes flyToHeart {
    0% { opacity: 0; }
    15% { opacity: .9; }
    100% { opacity: 0; }
}

.heart-core {
    width: 96px; height: 96px;
    margin: 0 auto 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.4rem;
    filter: drop-shadow(0 8px 22px rgba(233, 30, 99, .5));
    animation: coreBeat 1.6s ease-in-out infinite;
}
@keyframes coreBeat {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.18); }
    45% { transform: scale(.97); }
    60% { transform: scale(1.1); }
}
.gh-title {
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 1.6rem;
    letter-spacing: .18em;
    background: linear-gradient(90deg, var(--pink), var(--purple), var(--pink));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 5s linear infinite;
}
.gh-sub { margin-top: 6px; color: var(--ink-light); font-size: .84rem; }
.gh-countdown {
    margin: 14px auto 4px;
    font-family: Georgia, serif;
    font-size: 1.7rem;
    color: var(--pink);
    letter-spacing: .18em;
    text-shadow: 0 2px 12px rgba(233, 30, 99, .25);
}
.gh-countdown small { font-size: .78rem; color: var(--ink-light); letter-spacing: .1em; }

.gh-panel { margin-top: 16px; }
.gh-tip { margin-top: 10px; font-size: .76rem; color: var(--ink-light); }
.welcome { font-size: .95rem; color: var(--ink); }
.welcome b { color: var(--pink-deep); }

.btn-qq {
    font-size: 1rem;
    padding: 12px 40px;
    background: linear-gradient(120deg, #12b7f5, #3c8ce7);
    box-shadow: 0 8px 22px rgba(18, 183, 245, .4);
}
.btn-qq:hover { box-shadow: 0 12px 28px rgba(18, 183, 245, .55); }
.btn-out { margin-top: 10px; font-size: .76rem; padding: 5px 14px; }

/* 入住表单 */
.join-form {
    text-align: left;
    margin: 14px auto 0;
    max-width: 560px;
    background: rgba(255, 240, 245, .55);
    border: 1px dashed rgba(233, 30, 99, .3);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.jf-row { display: flex; gap: 10px; }
.jf-gender { flex: 1; }
.jf-gender input { display: none; }
.jf-gender span {
    display: block;
    text-align: center;
    padding: 11px 0;
    border-radius: 12px;
    border: 1.5px solid rgba(233, 30, 99, .28);
    background: rgba(255, 255, 255, .85);
    font-size: .9rem;
    cursor: pointer;
    transition: all .25s;
    user-select: none;
}
.jf-gender:hover span { border-color: var(--pink); transform: translateY(-1px); }
.jf-gender input:checked + span,
.jf-gender.active span {
    background: linear-gradient(120deg, var(--pink), var(--purple));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(233, 30, 99, .38);
    animation: jfPop .35s ease;
}
@keyframes jfPop { 0% { transform: scale(.94); } 55% { transform: scale(1.05); } 100% { transform: scale(1); } }
.jf-sec { font-size: .8rem; color: var(--pink-deep); font-weight: 700; letter-spacing: .08em; margin-top: 4px; }
.jf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jf-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .76rem; color: var(--ink-light); }
.jf-grid input {
    width: 100%;
    font-size: .88rem;
    padding: 8px 10px;
    border: 1.5px solid rgba(233, 30, 99, .22);
    border-radius: 10px;
    background: rgba(255, 255, 255, .9);
    outline: none;
}
.jf-grid input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(233, 30, 99, .12); }
.jf-range { display: flex; align-items: center; gap: 5px; }
.jf-range input { flex: 1; min-width: 0; }
.join-form .btn-main { margin-top: 6px; }

/* 我的资料卡（已入住） */
.my-card {
    margin: 12px auto 0;
    max-width: 480px;
    background: rgba(255, 255, 255, .85);
    border: 1px solid rgba(233, 30, 99, .2);
    border-radius: 16px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 14px;
    text-align: left;
    font-size: .84rem;
}
.my-card span { color: var(--ink-light); }
.my-card b { color: var(--pink-deep); font-weight: 600; }
#panel-wait .btn-ghost { margin: 4px; }

/* ---------- 匹配结果 ---------- */
.match-sec {
    background: rgba(255, 255, 255, .68);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(233, 30, 99, .12);
    padding: 18px 20px 20px;
}
.match-title {
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 1.15rem;
    color: var(--pink-deep);
    letter-spacing: .12em;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(233, 30, 99, .14);
}
.match-list { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.m-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(120deg, rgba(255, 214, 231, .5), rgba(243, 231, 255, .5));
    border: 1px solid rgba(233, 30, 99, .18);
    border-radius: 16px;
    padding: 13px 16px;
    animation: matchIn .6s ease;
}
@keyframes matchIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.m-card.mine { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(233, 30, 99, .1); }
/* 牵手成功的匹配：金色高亮，永远置顶显示 */
.m-card.sat {
    border-color: var(--gold);
    background: linear-gradient(120deg, rgba(240, 217, 140, .28), rgba(255, 214, 231, .38));
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .16);
}
.m-card.sat .m-love { filter: drop-shadow(0 0 6px rgba(212, 175, 55, .6)); }
.m-card.sat .m-tag.mine-tag { background: linear-gradient(120deg, var(--gold), #f0d060); color: #5c3a54; }
.m-card .m-love { font-size: 1.3rem; animation: beat 1.4s ease-in-out infinite; flex: none; }
.m-card .m-names { flex: 1; min-width: 0; }
.m-card .m-names b { color: var(--pink-deep); font-size: .98rem; }
.m-card .m-names i { font-style: normal; color: var(--gold); margin: 0 4px; }
.m-card .m-time { font-size: .7rem; color: var(--ink-light); margin-top: 3px; }
.m-card .m-tag {
    font-size: .62rem;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    color: var(--ink-light);
    flex: none;
}
.m-card .m-tag.mine-tag { background: linear-gradient(120deg, var(--pink), var(--purple)); color: #fff; }
.m-card .m-tag.sat-tag {
    background: linear-gradient(120deg, var(--gold), #f0d060);
    color: #5c3a54;
    animation: beat 1.6s ease-in-out infinite;
}
.m-card .btn-main, .m-card .btn-ghost { flex: none; }
.m-card .btn-main.btn-sm2 { padding: 7px 16px; font-size: .8rem; }
.m-card .m-contact { flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.m-card .m-contact b { color: var(--pink-deep); font-size: .9rem; letter-spacing: .05em; }
.m-card .m-contact a { font-size: .78rem; color: #12b7f5; text-decoration: none; font-weight: 600; }
.m-card .m-contact a:hover { text-decoration: underline; }
.m-card .m-status { font-size: .8rem; color: var(--ink-light); flex: none; }
.m-card .m-status.ok { color: var(--pink); font-weight: 700; }
.m-empty { text-align: center; color: var(--ink-light); font-size: .84rem; padding: 22px 0; }

/* ---------- 统计区 ---------- */
.stats-sec {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}
.stats-head { text-align: center; margin-bottom: 14px; }
.stats-head .section-icon { font-size: 1.6rem; display: block; animation: floaty 3.4s ease-in-out infinite; }
.stats-head h3 { font-family: "STKaiti", "KaiTi", serif; font-size: 1.3rem; color: var(--pink-deep); letter-spacing: .14em; }
.stats-cards {
    background: rgba(255, 255, 255, .68);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(233, 30, 99, .12);
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.8fr 1.2fr;
    gap: 14px;
}
.st-card {
    background: rgba(255, 255, 255, .85);
    border: 1px solid rgba(233, 30, 99, .15);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
}
.st-card b { font-size: 2rem; color: var(--pink); font-family: Georgia, serif; line-height: 1.2; }
.st-card > span { font-size: .76rem; color: var(--ink-light); }
.st-hours-title { font-size: .78rem; color: var(--pink-deep); font-weight: 700; margin-bottom: 6px; }

/* 最近 7 天每日匹配柱状图 */
.st-wbars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 96px;
    width: 100%;
}
.st-wbars .wb {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    height: 100%;
    justify-content: flex-end;
}
.st-wbars .wb i {
    width: 100%;
    min-height: 4px;
    border-radius: 4px 4px 0 0;
    background: rgba(233, 30, 99, .16);
    position: relative;
    transition: height .6s ease;
}
.st-wbars .wb.has i { background: linear-gradient(180deg, var(--purple), var(--pink)); }
.st-wbars .wb.today i { background: linear-gradient(180deg, var(--gold), var(--pink)); }
.st-wbars .wb.has i::after {
    content: attr(data-n);
    position: absolute;
    top: -15px; left: 50%;
    transform: translateX(-50%);
    font-size: .64rem;
    color: var(--pink);
    font-style: normal;
    font-weight: 700;
}
.st-wbars .wb em {
    font-style: normal;
    font-size: .6rem;
    color: var(--ink-light);
    white-space: nowrap;
}
.st-wbars .wb.today em { color: var(--pink-deep); font-weight: 700; }

/* 今日小时分布 */
.st-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 74px;
    width: 100%;
}
.st-bars i {
    flex: 1;
    min-height: 2px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, var(--purple), var(--pink));
    position: relative;
    transition: height .6s ease;
}
.st-bars i.has::after {
    content: attr(data-n);
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    font-size: .6rem;
    color: var(--pink);
    font-style: normal;
}
.st-bars i:nth-child(6n+1) { background: linear-gradient(180deg, var(--gold), var(--pink)); }
.st-pairs { display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; max-height: 84px; overflow-y: auto; width: 100%; }
.st-pair-chip {
    font-size: .78rem;
    color: #5c3a54;
    background: linear-gradient(120deg, rgba(255, 143, 171, .2), rgba(181, 123, 234, .2));
    border: 1px solid rgba(233, 30, 99, .16);
    border-radius: 999px;
    padding: 4px 12px;
}
.st-none { font-style: normal; color: var(--ink-light); font-size: .78rem; }

/* ---------- 小屋的意义 ---------- */
.meaning-sec {
    max-width: 900px;
    margin: 26px auto 0;
    padding: 0 16px 40px;
    position: relative;
    z-index: 1;
}
.meaning-card {
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 214, 231, .5), transparent 60%),
        rgba(255, 255, 255, .72);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 26px;
    box-shadow: 0 10px 34px rgba(233, 30, 99, .15);
    padding: 44px 34px;
}
.mf-icon { font-size: 2.6rem; animation: floaty 3.4s ease-in-out infinite; }
.meaning-card h3 {
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 1.7rem;
    color: var(--pink-deep);
    letter-spacing: .22em;
    margin: 8px 0 4px;
}
.mf-quote {
    font-family: "STKaiti", "KaiTi", serif;
    color: #a06b98;
    margin-bottom: 20px;
}
.mf-text {
    text-align: left;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mf-text p { line-height: 2; font-size: .92rem; color: #5c3a54; text-indent: 2em; }
.mf-text b { color: var(--pink-deep); }
.mf-btn { margin-top: 26px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
    display: none;
    position: fixed; inset: 0; z-index: 100;
    background: rgba(40, 10, 30, .55);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-mask.open { display: flex; }
.qq-modal, .view-modal {
    position: relative;
    width: 360px;
    max-width: 92vw;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    text-align: center;
    animation: modalIn .35s ease;
}
.view-modal { padding: 26px; background: linear-gradient(165deg, #fff, #fff5f8); }
@keyframes modalIn { from { transform: scale(.88); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- QQ 授权弹窗（仿 QQ 互联官方风格） ---- */
.qq-modal { padding: 0 26px 22px; }
.qqm-banner {
    margin: 0 -26px 18px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #12b7f5, #0d8ddb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.05rem;
    letter-spacing: .08em;
}
.qqm-penguin { font-size: 1.5rem; animation: penguinFloat 3s ease-in-out infinite; }
@keyframes penguinFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.qqm-avatar {
    width: 74px; height: 74px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem;
    background: linear-gradient(140deg, #e8f6ff, #d5ecff);
    border: 3px solid #12b7f5;
    box-shadow: 0 0 0 5px rgba(18, 183, 245, .12);
    transition: all .3s;
}
.qqm-avatar.ok { background: linear-gradient(140deg, #c9f7dd, #a5efc8); border-color: #2ecc8f; }
.qqm-title { font-size: .98rem; color: #2c3e50; font-weight: 600; margin-bottom: 10px; }
.qqm-scope {
    font-size: .76rem;
    color: #7f8c9b;
    line-height: 1.9;
    background: #f4f9fe;
    border: 1px solid #e3f0fa;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 14px;
}
.qqm-scope span { display: inline-block; margin: 0 8px; color: #12b7f5; }
.qq-modal form { display: flex; flex-direction: column; gap: 10px; }
.qq-modal input {
    padding: 12px 16px;
    border: 1.5px solid #cfe6f5;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    text-align: center;
    letter-spacing: .08em;
    transition: border-color .25s, box-shadow .25s;
}
.qq-modal input::placeholder { letter-spacing: .05em; color: #b0c4d4; }
.qq-modal input:focus { border-color: #12b7f5; box-shadow: 0 0 0 3px rgba(18, 183, 245, .16); }
.btn-qq-auth {
    border: none;
    cursor: pointer;
    padding: 12px 0;
    font-size: .98rem;
    font-weight: 700;
    letter-spacing: .28em;
    text-indent: .28em;
    color: #fff;
    background: linear-gradient(135deg, #12b7f5, #0d8ddb);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(18, 183, 245, .4);
    transition: transform .25s, filter .25s;
}
.btn-qq-auth:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-qq-auth:active { transform: scale(.97); }
.qqm-law { margin-top: 12px; font-size: .68rem; color: #a5b4c2; }
.qqm-law a { color: #12b7f5; text-decoration: none; }
.qqm-close {
    position: absolute; top: 10px; right: 14px;
    font-size: 1.6rem; color: rgba(255, 255, 255, .85); background: none; border: none; cursor: pointer; line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.qqm-close:hover { color: #fff; }
.vm-head { font-size: 1.1rem; font-weight: 700; color: var(--pink-deep); margin-bottom: 12px; }
.vm-row {
    display: flex; justify-content: space-between;
    background: rgba(255, 240, 245, .7);
    border-radius: 10px; padding: 10px 16px;
    font-size: .92rem;
}
.vm-row span { color: var(--ink-light); }
.vm-row b { color: var(--pink-deep); }
.vm-actions { display: flex; gap: 10px; margin-top: 14px; }
.vm-actions button { flex: 1; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .stage { grid-template-columns: 1fr; }
    .guest-side { position: static; }
    .guest-list { flex-direction: row; flex-wrap: wrap; max-height: none; }
    .g-card { flex: 1; min-width: 130px; }
    .stats-cards { grid-template-columns: 1fr 1fr; }
    .st-week, .st-hours, .st-last { grid-column: span 2; }
}
@media (max-width: 640px) {
    .topbar { border-radius: 16px; }
    .top-links { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
    .top-links::-webkit-scrollbar { display: none; }
    .top-links a { flex: none; font-size: .78rem; padding: 6px 10px; }
    .jf-grid { grid-template-columns: 1fr; }
    .jf-row { flex-direction: column; }
    .m-card { flex-wrap: wrap; }
    .m-card .m-contact { align-items: flex-start; }
    .stats-cards { grid-template-columns: 1fr; }
    .st-week, .st-hours, .st-last { grid-column: span 1; }
    .meaning-card { padding: 30px 18px; }
}
