/* ==========================================================================
   空间页通用部件样式（全屏按钮 / 底部署名 / 分享 / 建议与反馈）
   与 8 套主题解耦：用中性色，浅色与深色主题下都能看清。
   ========================================================================== */

/* ---------- 全屏（屏保视觉）按钮 ---------- */
.fs-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: background 0.25s, transform 0.25s;
    font-family: inherit;
}

.fs-btn:hover {
    background: rgba(0, 0, 0, 0.62);
    transform: translateY(-1px);
}

.fs-btn i {
    font-size: 14px;
}

/* 手机端只留图标，不占地方 */
@media (max-width: 600px) {
    .fs-btn {
        right: 12px;
        bottom: 12px;
        padding: 10px;
    }

    .fs-btn span {
        display: none;
    }
}

/* ---------- 首字母色块头像（零存储，本地实时绘制） ---------- */
.avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 42px;
    font-weight: 500;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
}

/* ---------- 底部署名（两行） ---------- */
.brand-line {
    margin-top: 4px;
}

.brand-line a,
.brand-line span {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s;
}

.brand-line a:hover {
    text-decoration: underline;
}

/* ---------- 建议与反馈入口（与备案号同一行，靠右） ---------- */
.footer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.report-link {
    color: inherit;
    opacity: 0.55;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s;
}

.report-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ---------- 建议与反馈弹窗 ---------- */
.report-modal,
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 20px;
}

.report-modal.open,
.share-modal.open {
    display: flex;
}

.report-card,
.share-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    color: #1f2430;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.report-card h3,
.share-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 500;
}

.report-card p.hint,
.share-card p.hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: #6b7280;
}

.report-card label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #374151;
}

.report-card select,
.report-card textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d7dbe3;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 12px;
    background: #fff;
    color: #1f2430;
}

.report-card textarea {
    min-height: 120px;
    resize: vertical;
}

.report-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.report-actions button {
    border: 1px solid #d7dbe3;
    background: #fff;
    color: #1f2430;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}

.report-actions button.primary {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

/* ---------- 分享面板（官网 + 我的地址） ---------- */
.share-row {
    margin-bottom: 14px;
}

.share-card h4 {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2430;
}

.share-card p.share-hint {
    margin: 0 0 8px;
    font-size: 12px;
    color: #6b7280;
}

.share-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f4f6fa;
    border: 1px solid #e3e7ef;
    border-radius: 8px;
    padding: 7px 10px;
}

.share-copy code {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-copy button {
    flex: none;
    border: 1px solid #d7dbe3;
    background: #fff;
    color: #4f46e5;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}

.report-thanks {
    font-size: 14px;
    color: #0f766e;
    padding: 10px 0;
}

/* ---------- 全屏态：更接近屏保 ---------- */
:fullscreen body,
body:fullscreen {
    overflow: hidden;
}

:fullscreen .main-container,
body:fullscreen .main-container {
    padding-top: 6vh;
    padding-bottom: 6vh;
}

:fullscreen .clock,
body:fullscreen .clock {
    font-size: clamp(56px, 9vw, 132px);
}

:fullscreen .date,
body:fullscreen .date {
    font-size: clamp(15px, 1.6vw, 22px);
}

:fullscreen .fs-btn,
body:fullscreen .fs-btn {
    right: 26px;
    bottom: 26px;
}

/* ---------- 编辑定制入口（内容最后、署名之上） ---------- */
/* ---------- 编辑定制入口（只留一枚按钮，低调不抢戏） ---------- */
.open-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 34px auto 0;
    max-width: 380px;
}

.open-cta .cta-tip {
    margin: 0;
    font-size: 14px;
    color: inherit;
    text-align: center;
    letter-spacing: 0.3px;
}

.open-cta .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
    color: inherit;
    font-size: 15px;
    line-height: 1;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, background 0.25s;
}

.open-cta .cta-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.55);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.open-cta .cta-btn i {
    font-size: 15px;
    animation: ctaBreath 3.4s ease-in-out infinite;
}

@keyframes ctaBreath {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

/* 手机端：按钮铺满一行，手指好点 */
@media (max-width: 600px) {
    .open-cta {
        margin-top: 28px;
        max-width: 100%;
    }

    .open-cta .cta-btn {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        padding: 14px 20px;
    }
}

/* ---------- 分享官网（使用态右上角，任何一页飘出去都带它） ---------- */
.share-site-btn {
    position: fixed;
    right: 18px;
    top: 18px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: background 0.25s, transform 0.25s;
    font-family: inherit;
}

.share-site-btn:hover {
    background: rgba(0, 0, 0, 0.62);
    transform: translateY(-1px);
}

/* ---------- 收工提示条：告诉主人这是他自己的页面，地址存好 ---------- */
.done-tip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 620px;
    margin: 0 auto 18px;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: opacity 0.45s, transform 0.45s;
}

.done-tip.out {
    opacity: 0;
    transform: translateY(-8px);
}

.done-tip code {
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    word-break: break-all;
}

.done-tip button {
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

/* ---------- 轻提示 ---------- */
.site-toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    z-index: 120;
    transform: translateX(-50%) translateY(12px);
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(20, 22, 30, 0.9);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.site-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 全屏（屏保视觉）时藏起来，画面干净 */
:fullscreen .share-site-btn,
body:fullscreen .share-site-btn {
    display: none;
}

@media (max-width: 600px) {
    .share-site-btn {
        right: 12px;
        top: 12px;
        padding: 10px;
    }

    .share-site-btn span {
        display: none;
    }
}

/* ---------- 联系方式弹窗（电话 / 微信，任何设备都看得清） ---------- */
.contact-pop {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.contact-pop.open {
    display: flex;
}

.contact-pop__mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.contact-pop__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 340px;
    background: #fff;
    color: #1f2430;
    border-radius: 14px;
    padding: 24px 20px 20px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    text-align: center;
    box-sizing: border-box;
}

.contact-pop__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #9aa3b2;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.contact-pop__label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

.contact-pop__value {
    font-size: 22px;
    font-weight: 600;
    color: #1f2430;
    word-break: break-all;
    padding: 14px 12px;
    margin-bottom: 16px;
    background: #f4f6fa;
    border: 1px solid #e3e7ef;
    border-radius: 10px;
    cursor: pointer;
    user-select: all;
    -webkit-user-select: all;
    transition: background 0.2s;
}

.contact-pop__value:active {
    background: #e9edf5;
}

.contact-pop__action {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    background: #4f46e5;
    color: #fff;
}

.contact-pop__action:active {
    background: #4338ca;
}
