/* AI轻量弹窗 */
.ai-mask {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9998;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .35);
    display: none;
}

.ai-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 9999;

    width: 980px;
    max-width: 88vw;
    max-height: 86vh;

    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .28);
    display: none;
    overflow: hidden;
    font-size: 15px;
    color: #333;
}

.ai-dialog-header {
    height: 50px;
    line-height: 50px;
    padding: 0 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
    font-size: 20px;
    font-weight: bold;
}

.ai-dialog-body {
    padding: 20px 26px 56px;
    max-height: calc(86vh - 51px);
    overflow-y: auto;
    line-height: 1.9;
    box-sizing: border-box;
    overscroll-behavior: contain;
}

.ai-section-title {
    font-weight: bold;
    color: #b22222;
    margin-bottom: 8px;
    font-size: 16px;
}

.ai-dialog-close {
    float: right;
    font-size: 22px;
    color: #999;
    text-decoration: none;
    cursor: pointer;
}

.ai-dialog-close:hover {
    color: #333;
}

.ai-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #ddd;
}

.ai-section:last-child {
    border-bottom: none;
}

.ai-tag,
.ai-id,
.ai-entity {
    display: inline-block;
    padding: 2px 8px;
    margin: 3px 5px 3px 0;
    background: #f3f6fb;
    border: 1px solid #d9e2f2;
    border-radius: 12px;
    color: #24508a;
    line-height: 20px;
}

/* 情感分析徽章 */
.ai-sentiment {
    display: inline-block;
    position: relative;
    padding: 3px 13px 3px 24px;
    margin-left: 4px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: bold;
    line-height: 22px;
    vertical-align: middle;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.ai-sentiment:before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
}

/* 正面 */
.ai-sentiment-positive {
    color: #1f7a3a;
    border: 1px solid #bfe5cb;
    background: linear-gradient(180deg, #f2fff6 0%, #e4f8ea 100%);
}

.ai-sentiment-positive:before {
    background: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, .55);
}

/* 中性 */
.ai-sentiment-neutral {
    color: #7a5a12;
    border: 1px solid #eadca8;
    background: linear-gradient(180deg, #fffdf3 0%, #fff5d6 100%);
}

.ai-sentiment-neutral:before {
    background: #d6a400;
    box-shadow: 0 0 6px rgba(214, 164, 0, .45);
}

/* 负面 */
.ai-sentiment-negative {
    color: #a33a2b;
    border: 1px solid #efc2ba;
    background: linear-gradient(180deg, #fff7f5 0%, #fde8e5 100%);
}

.ai-sentiment-negative:before {
    background: #d9534f;
    box-shadow: 0 0 6px rgba(217, 83, 79, .45);
}

.ai-link-list {
    margin: 0;
    padding-left: 20px;
}

.ai-empty,
.ai-loading,
.ai-error {
    padding: 20px;
    text-align: center;
    color: #777;
}

/* 智能导读入口 */
.ai-guide-link {
    /*
    display: inline-block;
    */
    display: none;
    margin-left: 8px;
    padding: 3px 10px 3px 6px;
    line-height: 20px;
    border: 1px solid #d6e6ff;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    color: #1f5fa8 !important;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none !important;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(31, 95, 168, .12);
}

.ai-guide-link:hover {
    color: #fff !important;
    border-color: #2f7fd3;
    background: linear-gradient(180deg, #3c91e6 0%, #1f69bd 100%);
    box-shadow: 0 2px 8px rgba(31, 95, 168, .28);
}

.ai-guide-icon {
    display: inline-block;
    margin-right: 5px;
    padding: 0 4px;
    height: 16px;
    line-height: 16px;
    border-radius: 8px;
    background: #1f69bd;
    color: #fff;
    font-size: 11px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    vertical-align: 1px;
}

.ai-guide-link:hover .ai-guide-icon {
    background: #fff;
    color: #1f69bd;
}

.ai-guide-card {
    padding: 16px 18px;
    margin-bottom: 18px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.ai-guide-label {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 10px;
    border-radius: 12px;
    background: #1f69bd;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}

.ai-guide-text {
    font-size: 17px;
    line-height: 1.9;
    color: #1f3552;
    font-weight: bold;
}

.ai-number-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ai-number-card {
    flex: 1;
    min-width: 150px;
    padding: 14px 12px;
    border-radius: 10px;
    border: 1px solid #e0e7f2;
    background: #f8fbff;
    text-align: center;
}

.ai-number-value {
    font-size: 22px;
    font-weight: bold;
    color: #1f69bd;
    line-height: 1.4;
}

.ai-number-label {
    margin-top: 4px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.ai-number-desc {
    margin-top: 4px;
    font-size: 12px;
    color: #777;
}

.ai-highlight-list,
.ai-point-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.ai-highlight-list li,
.ai-point-list li {
    position: relative;
    padding: 6px 0 6px 20px;
    line-height: 1.8;
}

.ai-highlight-list li:before,
.ai-point-list li:before {
    content: "";
    position: absolute;
    left: 4px;
    top: 17px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1f69bd;
}

.ai-fact-list {
    border: 1px solid #edf0f5;
    border-radius: 8px;
    overflow: hidden;
}

.ai-fact-row {
    display: flex;
    border-bottom: 1px solid #edf0f5;
}

.ai-fact-row:last-child {
    border-bottom: none;
}

.ai-fact-label {
    width: 110px;
    padding: 9px 12px;
    background: #f7f9fc;
    color: #666;
    font-weight: bold;
}

.ai-fact-value {
    flex: 1;
    padding: 9px 12px;
    color: #333;
}

.ai-text-card {
    padding: 12px 14px;
    border-radius: 8px;
    background: #fafafa;
    border-left: 4px solid #1f69bd;
    line-height: 1.9;
}

.ai-meta-box {
    display: table;
    width: 100%;
}

.ai-meta-row {
    display: table-row;
}

.ai-meta-label {
    display: table-cell;
    width: 90px;
    padding: 7px 0;
    color: #666;
    font-weight: bold;
}

.ai-meta-value {
    display: table-cell;
    padding: 7px 0;
}

.ai-tag-wrap .ai-tag {
    margin-bottom: 5px;
}

.ai-entity-row {
    margin-bottom: 8px;
}

.ai-entity-label {
    display: inline-block;
    min-width: 60px;
    color: #666;
    font-weight: bold;
}

.ai-timeline {
    padding-left: 8px;
}

.ai-timeline-item {
    position: relative;
    padding: 0 0 12px 18px;
    border-left: 2px solid #dbeafe;
}

.ai-timeline-item:before {
    content: "";
    position: absolute;
    left: -5px;
    top: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1f69bd;
}

.ai-timeline-time {
    font-weight: bold;
    color: #1f69bd;
}

.ai-timeline-event {
    color: #333;
    line-height: 1.8;
}

.ai-bottom-space {
    height: 24px;
}

.ai-details {
    margin-top: 14px;
    margin-bottom: 28px;
    border: 1px solid #e5eaf2;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.ai-details summary {
    position: relative;
    padding: 10px 14px 10px 34px;
    cursor: pointer;
    font-weight: bold;
    color: #1f69bd;
    background: #f7f9fc;
    list-style: none;
}

.ai-details summary::-webkit-details-marker {
    display: none;
}

.ai-details summary::marker {
    content: "";
}

.ai-details summary:before {
    content: "▶";
    position: absolute;
    left: 14px;
    top: 10px;
    color: #1f69bd;
    font-size: 14px;
}

.ai-details[open] summary {
    border-bottom: 1px solid #e5eaf2;
}

.ai-details[open] summary:before {
    content: "▼";
}

.ai-details-body {
    padding: 16px 18px 18px;
}

body.ai-modal-open {
    overflow: hidden;
}