/* ============================================================
 * deepcat v7.9.42 样式模块
 * 1. 首屏加载动画（bootLoader：cc_cat.gif + 粉色渐变进度条）
 * 2. 大窗口文档弹窗（doc-modal：更新日志 / 用户协议 / 隐私政策）
 * 3. 个人中心：更新日志/协议链接 + 存活计时器
 * 浅色/深色均适配
 * ============================================================ */

/* ============ 1. 首屏加载动画 ============ */
#bootLoader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #f7f7f8;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.45s ease;
}

#bootLoader.hide {
    opacity: 0;
    pointer-events: none;
}

.boot-loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 76vw;
}

.boot-loader-gif {
    width: 120px;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(255, 111, 157, 0.18);
}

.boot-loader-bar {
    width: min(240px, 64vw);
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 111, 157, 0.16);
    overflow: hidden;
    position: relative;
}

.boot-loader-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff9a9e, #ff6b9d, #ff8fa3, #ff5e8a, #ff9a9e);
    background-size: 200% 100%;
    animation: bootFill 2.6s cubic-bezier(0.22, 1, 0.36, 1) forwards, bootShimmer 1.4s linear infinite;
    transition: width 0.4s ease;
}

@keyframes bootFill {
    from { width: 0; }
    to { width: 90%; }
}

@keyframes bootShimmer {
    from { background-position: 0% 0; }
    to { background-position: -200% 0; }
}

.boot-loader-text {
    font-size: 13px;
    color: #ff6b9d;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.boot-loader-sub {
    font-size: 11px;
    color: #b9babb;
}

[data-theme="dark"] #bootLoader {
    background: #0f0f0f;
}

[data-theme="dark"] .boot-loader-sub {
    color: #7d7f85;
}

/* ============ 2. 大窗口文档弹窗 ============ */
.doc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 4vw;
}

.doc-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.doc-modal {
    width: min(640px, 92vw);
    max-height: 86vh;
    background: var(--bg-primary, #ffffff);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    transform: translateY(18px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.doc-modal-overlay.show .doc-modal {
    transform: none;
}

.doc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
    flex-shrink: 0;
    background: var(--bg-primary, #ffffff);
}

.doc-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1f1f1f);
}

.doc-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-tertiary, #efeff1);
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    color: var(--text-secondary, #6b6b6b);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}

.doc-modal-close:active {
    opacity: 0.7;
    transform: scale(0.92);
}

.doc-modal-body {
    padding: 16px 18px 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    color: var(--text-primary, #1f1f1f);
    font-size: 14px;
    line-height: 1.7;
}

/* 更新日志排版 */
.doc-modal-body h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 18px 0 8px;
    color: var(--text-primary, #1f1f1f);
}

.doc-modal-body h3:first-child {
    margin-top: 0;
}

.doc-modal-body blockquote {
    background: var(--bg-tertiary, #efeff1);
    border-left: 3px solid #ff8fa3;
    border-radius: 0 8px 8px 0;
    margin: 10px 0;
    padding: 8px 12px;
    color: var(--text-secondary, #6b6b6b);
    font-size: 13px;
}

.doc-modal-body blockquote div {
    margin: 2px 0;
}

.doc-modal-body hr {
    border: none;
    border-top: 1px dashed var(--border-color, #f0f0f0);
    margin: 16px 0;
}

.doc-modal-body .cl-item {
    margin: 6px 0 6px 0;
    padding-left: 14px;
    position: relative;
}

.doc-modal-body .cl-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a9e, #ff6b9d);
}

.doc-modal-body .cl-item.cl-l2 {
    margin-left: 16px;
}

.doc-modal-body .cl-item.cl-l2::before {
    width: 5px;
    height: 5px;
    background: #ff8fa3;
    opacity: 0.85;
}

.doc-modal-body .cl-item.cl-l3 {
    margin-left: 32px;
}

.doc-modal-body .cl-item.cl-l3::before {
    width: 4px;
    height: 4px;
    background: #ffb3c0;
    opacity: 0.9;
}

.doc-modal-body p {
    margin: 6px 0;
}

.doc-modal-body code {
    background: var(--bg-tertiary, #efeff1);
    color: #e5484d;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 12.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.doc-modal-body strong {
    font-weight: 600;
}

/* 协议排版 */
.doc-modal-body .legal-body p {
    margin: 8px 0;
    text-align: justify;
}

.doc-modal-body .legal-body h3 {
    margin: 18px 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1f1f1f);
    border-left: 3px solid #ff8fa3;
    padding-left: 8px;
}

.doc-modal-body .legal-body a {
    color: #ff6b9d;
    text-decoration: none;
}

/* ============ 3. 个人中心：链接 + 计时器 ============ */
.profile-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.profile-links a {
    color: var(--text-secondary, #6b6b6b);
    font-size: 12px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--bg-tertiary, #efeff1);
    transition: all 0.2s ease;
}

.profile-links a:active {
    background: rgba(255, 111, 157, 0.18);
    color: #ff6b9d;
    transform: scale(0.95);
}

.profile-links-sep {
    color: var(--text-tertiary, #b9babb);
    font-size: 12px;
    line-height: 1;
}

.profile-uptime {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary, #6b6b6b);
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}

.profile-uptime .uptime-heart {
    color: #ff6b9d;
}
