/* ============================================================
 * 三核创效 · 全生态平台 (cylxd-platform) — P1 前台样式
 * 排行榜 / 战绩卡中心 / 朋友圈激励上传区
 * 与现有 user-center.css 无缝衔接（紫蓝渐变 #667eea → #764ba2）
 * ============================================================ */

/* ── 排行榜 ────────────────────────────── */
.cylxd-rank-wrap { margin: 24px 0; }

.cylxd-rank-hero {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    border-radius: 16px;
    padding: 28px 30px;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}
.cylxd-rank-hero h2 { margin: 0 0 6px; font-size: 26px; font-weight: 700; color: #fff; }
.cylxd-rank-hero p { margin: 0; font-size: 13px; opacity: 0.85; }

.cylxd-rank-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.cylxd-rank-tab {
    padding: 8px 18px;
    border: 1px solid #e2e6f0;
    border-radius: 24px;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}
.cylxd-rank-tab:hover { border-color: #667EEA; color: #667EEA; }
.cylxd-rank-tab.active {
    background: linear-gradient(135deg, #667EEA, #764BA2);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.cylxd-rank-panel { display: none; }
.cylxd-rank-panel.active { display: block; animation: cylxdFadeIn 0.25s ease; }

.cylxd-rank-sub {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
    padding-left: 4px;
}

.cylxd-rank-list { display: flex; flex-direction: column; gap: 8px; }

.cylxd-rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(51, 51, 51, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cylxd-rank-row:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(102, 126, 234, 0.15); }
.cylxd-rank-row.top {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.10), rgba(102, 126, 234, 0.06));
    border-left: 4px solid #F9A825;
}

.cylxd-rank-no {
    font-size: 20px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    color: #667EEA;
}
.cylxd-rank-row.top .cylxd-rank-no { color: #F9A825; font-size: 24px; }

.cylxd-rank-info { flex: 1; min-width: 0; }
.cylxd-rank-name { font-size: 15px; font-weight: 600; color: #333; }
.cylxd-rank-me {
    display: inline-block;
    background: linear-gradient(135deg, #667EEA, #764BA2);
    color: #fff;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: 2px;
}
.cylxd-rank-meta { font-size: 12px; color: #999; margin-top: 3px; }

.cylxd-rank-score {
    font-size: 16px;
    font-weight: 700;
    color: #667EEA;
    white-space: nowrap;
}

.cylxd-rank-empty {
    text-align: center;
    padding: 48px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(51, 51, 51, 0.06);
}
.cylxd-rank-empty-icon { font-size: 42px; }
.cylxd-rank-empty p { margin: 8px 0 0; color: #666; font-size: 15px; }
.cylxd-rank-empty-tip { font-size: 12px !important; color: #aaa !important; }

.cylxd-rank-login-tip {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    color: #888;
}
.cylxd-rank-login-tip a { color: #667EEA; font-weight: 600; }

@keyframes cylxdFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── 战绩卡中心 ────────────────────────── */
.cylxd-poster-center { margin: 24px 0; }

.cylxd-poster-head { margin-bottom: 16px; }
.cylxd-poster-head h3 { margin: 0 0 4px; font-size: 20px; color: #333; }
.cylxd-poster-sub { font-size: 13px; color: #999; }

.cylxd-poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.cylxd-poster-loading { color: #999; font-size: 14px; text-align: center; padding: 24px; }

.cylxd-poster-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(51, 51, 51, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cylxd-poster-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(102, 126, 234, 0.18); }

.cylxd-poster-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
}
.cylxd-poster-type {
    font-size: 12px;
    font-weight: 600;
    color: #667EEA;
    background: #fff;
    border-radius: 12px;
    padding: 3px 12px;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.25);
}
.cylxd-poster-time { font-size: 12px; color: #999; }

.cylxd-poster-card-body { padding: 18px 16px 8px; flex: 1; }
.cylxd-poster-card-title { font-size: 17px; font-weight: 600; color: #333; }
.cylxd-poster-card-sub { font-size: 13px; color: #888; margin-top: 6px; }

.cylxd-poster-card-foot { padding: 12px 16px 16px; }

.cylxd-btn-download {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667EEA, #764BA2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.cylxd-btn-download:hover { opacity: 0.92; transform: translateY(-1px); }
.cylxd-btn-download:disabled { opacity: 0.6; cursor: not-allowed; }

.cylxd-poster-empty {
    text-align: center;
    padding: 48px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(51, 51, 51, 0.06);
}
.cylxd-poster-empty-icon { font-size: 42px; }
.cylxd-poster-empty p { margin: 8px 0 0; color: #666; }
.cylxd-poster-empty-tip { font-size: 12px !important; color: #aaa !important; }

/* ── 朋友圈激励 ────────────────────────── */
.cylxd-share-upload { margin: 20px 0; }

/* 打卡被后台核减的警示条 */
.cylxd-share-warn {
    background: #FFF3E0;
    border: 1px solid #FFB300;
    border-left: 4px solid #FF8F00;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.6;
    color: #B26A00;
}
.cylxd-share-warn strong { color: #E65100; }

/* 站内通知弹框（核减提醒 / 账号禁用） */
.cylxd-notif-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.cylxd-notif-box {
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.cylxd-notif-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; color: #333; }
.cylxd-notif-item {
    border: 1px solid #f1e6d0;
    background: #FFFBF2;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.cylxd-notif-head { margin-bottom: 6px; font-size: 14px; color: #333; }
.cylxd-notif-tag {
    display: inline-block;
    background: #ff9800;
    color: #fff;
    font-size: 11px;
    border-radius: 8px;
    padding: 1px 7px;
    margin-right: 6px;
    vertical-align: 1px;
}
.cylxd-notif-tag-ban { background: #e74c3c; }
.cylxd-notif-body { font-size: 13px; line-height: 1.7; color: #5d4037; white-space: pre-line; word-break: break-word; }
.cylxd-notif-time { font-size: 11px; color: #aaa; margin-top: 6px; }
.cylxd-notif-ok {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    background: #2f7cf6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}
.cylxd-notif-ok:hover { background: #2563eb; }

.cylxd-share-status {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(51, 51, 51, 0.07);
}

.cylxd-share-tier { margin-bottom: 16px; }
.cylxd-share-tier:last-of-type { margin-bottom: 0; }

.cylxd-share-tier-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}
.cylxd-share-state { font-size: 12px; color: #F9A825; font-weight: 600; }

.cylxd-share-bar {
    height: 8px;
    border-radius: 8px;
    background: #eef0f7;
    overflow: hidden;
}
.cylxd-share-bar i {
    display: block;
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #667EEA, #764BA2);
    transition: width 0.4s ease;
}

.cylxd-share-detail { font-size: 12px; color: #999; margin-top: 6px; }

.cylxd-btn-apply {
    margin-top: 10px;
    padding: 8px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #27AE60, #2ECC71);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.cylxd-btn-apply:hover { opacity: 0.9; }
.cylxd-btn-apply:disabled { background: #b5c0cf; cursor: not-allowed; opacity: 1; }

.cylxd-guidance-apply { margin-top: 8px; }

.cylxd-share-used { margin-top: 10px; font-size: 13px; color: #27AE60; font-weight: 600; }

.cylxd-share-order { margin-top: 8px; padding: 7px 10px; background: #f2f6ff; border: 1px solid #dfe7fb; border-radius: 6px; font-size: 13px; color: #4a5fce; }

.cylxd-share-uploader { margin-top: 18px; border-top: 1px dashed #e2e6f0; padding-top: 16px; }

.cylxd-share-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed #c5cdf0;
    border-radius: 12px;
    padding: 18px;
    color: #667EEA;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.cylxd-share-file-label:hover { border-color: #667EEA; background: rgba(102, 126, 234, 0.04); }

/* ── 响应式 ────────────────────────────── */
@media (max-width: 640px) {
    .cylxd-poster-grid { grid-template-columns: 1fr; }
    .cylxd-rank-row { flex-wrap: wrap; }
    .cylxd-rank-score { margin-left: auto; }
    .cylxd-rank-tab { flex: 1 1 40%; text-align: center; }
    .cylxd-rank-hero { padding: 20px; }
}

/* ── AI 周记评估 — 暂不上线 ────────────────── */
/*
.cylxd-ai-review-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9d5ff;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
}
.cylxd-ai-score-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f3e8ff;
}
.cylxd-ai-score {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
}
.cylxd-ai-score-unit {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    opacity: 0.7;
}
.cylxd-ai-score-label {
    font-size: 13px;
    color: #7c3aed;
    font-weight: 600;
}
.cylxd-ai-section {
    margin-bottom: 16px;
}
.cylxd-ai-section:last-child {
    margin-bottom: 0;
}
.cylxd-ai-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #6d28d9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cylxd-ai-section-body {
    font-size: 14px;
    line-height: 1.75;
    color: #374151;
}
.cylxd-ai-raw {
    white-space: pre-wrap;
    word-break: break-word;
    background: #faf5ff;
    border-radius: 8px;
    padding: 14px;
    font-size: 13px;
}
.cylxd-ai-suggestions {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: none;
}
.cylxd-ai-suggestions li {
    position: relative;
    padding: 8px 12px 8px 0;
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
    border-bottom: 1px dashed #f3e8ff;
}
.cylxd-ai-suggestions li:last-child {
    border-bottom: none;
}
.cylxd-ai-suggestions li::before {
    content: '▸';
    position: absolute;
    left: -14px;
    color: #8b5cf6;
    font-weight: 700;
}
.cylxd-ai-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}
.cylxd-ai-msg--err {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.cylxd-ai-msg--ok {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
*/

/* ── 站内消息中心（信息通道） ────────────────── */
.cylxd-inbox-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}

.cylxd-inbox-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 18px 0;
    padding: 10px 16px;
    border-radius: 10px;
    background: linear-gradient(90deg, #fef3c7, #fffbeb);
    border: 1px solid #fde68a;
    font-size: 13px;
    color: #92400e;
}
.cylxd-inbox-banner b { font-size: 15px; }
.cylxd-inbox-banner a {
    color: #b45309;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}
.cylxd-inbox-banner a:hover { text-decoration: underline; }

.cylxd-inbox-wrap { padding: 8px 0; }
.cylxd-inbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.cylxd-inbox-toolbar h2 { margin: 0; font-size: 20px; }
.cylxd-inbox-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #888;
}
.cylxd-inbox-actions-bar b { color: #dc2626; font-size: 15px; }
.cylxd-inbox-count b { color: #dc2626; font-size: 15px; }

.cylxd-inbox-list { display: flex; flex-direction: column; gap: 10px; }

.cylxd-inbox-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #eef0f6;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.cylxd-inbox-item:hover {
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.12);
    border-color: #d8ddf0;
}
.cylxd-inbox-item.cylxd-inbox-unread {
    background: #f6f8ff;
    border-color: #c9d4f7;
}

.cylxd-inbox-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #f5f6fa;
    border-radius: 10px;
}

.cylxd-inbox-main { flex: 1 1 auto; min-width: 0; }
.cylxd-inbox-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.cylxd-inbox-head strong { font-size: 14px; color: #1f2937; }
.cylxd-inbox-tag {
    display: inline-block;
    padding: 1px 8px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 11px;
    line-height: 18px;
    white-space: nowrap;
}
.cylxd-inbox-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    display: inline-block;
    margin-left: auto;
}
.cylxd-inbox-body {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 6px;
}
.cylxd-inbox-foot { font-size: 12px; color: #9ca3af; }
.cylxd-inbox-time { color: #9ca3af; }

.cylxd-inbox-actions { flex: 0 0 auto; display: flex; align-items: center; }
.cylxd-inbox-del {
    border: none;
    background: transparent;
    font-size: 15px;
    cursor: pointer;
    opacity: 0.35;
    padding: 4px;
    transition: opacity 0.2s ease;
}
.cylxd-inbox-del:hover { opacity: 1; }

.cylxd-inbox-empty {
    padding: 48px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    background: #fafbfe;
    border: 1px dashed #e2e6f0;
    border-radius: 12px;
}

.cylxd-inbox-loadmore {
    text-align: center;
    margin-top: 14px;
}
.cylxd-inbox-loadmore .button { cursor: pointer; }
