/* ========================================================
 * 文风改写工具样式
 * 主色调：紫色/靛蓝 (#4f46e5 / #7c3aed)
 * ======================================================== */

/* ========== 容器 ========== */
.wsr-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.wsr-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.wsr-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 28px;
}

.toolbar-btn {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #4f46e5;
    transition: all 0.2s;
    white-space: nowrap;
}

.toolbar-btn:hover:not(:disabled) {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 主操作按钮 - 金色渐变 + 光晕 */
.toolbar-btn-primary {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #7c3aed;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(253, 160, 133, 0.45);
    border: none;
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #fdd835 0%, #fb8c00 100%);
    box-shadow: 0 4px 14px rgba(253, 160, 133, 0.65);
    transform: translateY(-1px);
    filter: brightness(1.04);
}

/* ========== 主内容区三栏布局 ========== */
.wsr-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f8fafc;
}

/* ========== 左侧历史面板 ========== */
.wsr-history-panel {
    width: 220px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.wsr-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.wsr-history-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.wsr-history-clear-btn {
    background: #fff0f0;
    border: none;
    color: #ef4444;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s;
    line-height: 1;
}

.wsr-history-clear-btn:hover {
    background: #fde8e8;
}

.wsr-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.wsr-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 12px;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}

.wsr-history-empty span:first-child {
    font-size: 22px;
}

.wsr-history-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: wsrFadeIn 0.2s ease;
}

@keyframes wsrFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wsr-history-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(2px);
}

.wsr-history-item.active {
    background: #ede9fe;
    border-color: #7c3aed;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.15);
}

.wsr-history-item:focus {
    outline: 2px solid #a78bfa;
    outline-offset: 1px;
    border-color: #a78bfa;
}

.wsr-history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #fde8e8;
    color: #ef4444;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.wsr-history-item:hover .wsr-history-item-delete {
    opacity: 1;
}

.wsr-history-item-delete:hover {
    background: #ef4444;
    color: white;
}

.wsr-history-item-preview {
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
    padding-right: 20px;
}

.wsr-history-item-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* 历史时间行 - 独立CSS类，支持亮色/暗色 */
.wsr-history-time {
    color: #b0bec5;
    font-size: 11px;
}

.wsr-history-style-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    background: #ede9fe;
    color: #7c3aed;
    white-space: nowrap;
}

/* ========== 中间输入面板 ========== */
.wsr-input-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
    min-width: 300px;
    border-right: 1px solid #e2e8f0;
}

.wsr-input-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 6px;
}

.wsr-input-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.wsr-input-hint {
    font-size: 11px;
    color: #94a3b8;
}

.wsr-input-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.wsr-input-text-wrapper textarea {
    flex: 1;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    border: none;
    outline: none;
    resize: none;
    background: #fafafa;
    color: #374151;
    transition: background 0.2s;
    min-height: 0;
}

.wsr-input-text-wrapper textarea:focus {
    background: #ffffff;
}

/* 输入校验失败状态 - 红色左边框 + 淡红背景 */
.wsr-input-text-wrapper textarea.is-error {
    background: #fff5f5;
    border-left: 3px solid #ef4444;
    outline: none;
}

.wsr-input-text-wrapper textarea::placeholder {
    color: #9ca3af;
    line-height: 1.8;
}

.wsr-char-count {
    padding: 6px 20px;
    font-size: 11px;
    color: #9ca3af;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: right;
    flex-shrink: 0;
}

.wsr-char-count.warn {
    color: #f59e0b;
    font-weight: 500;
}

/* ========== 文风 & 程度配置区 ========== */
.wsr-style-config {
    flex-shrink: 0;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wsr-config-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.wsr-config-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    padding-top: 5px;
    min-width: 48px;
}

.wsr-style-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
}

.wsr-style-btn {
    padding: 5px 9px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    font-weight: 500;
}

.wsr-style-btn:hover {
    background: #ede9fe;
    border-color: #a78bfa;
    color: #6d28d9;
    transform: translateY(-1px);
}

.wsr-style-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: #7c3aed;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

.wsr-degree-btn-group {
    display: flex;
    gap: 5px;
}

.wsr-degree-btn {
    padding: 5px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    transition: all 0.18s;
    font-weight: 500;
}

.wsr-degree-btn:hover {
    background: #ede9fe;
    border-color: #a78bfa;
    color: #6d28d9;
    transform: translateY(-1px);
}

.wsr-degree-btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.wsr-degree-hint {
    font-size: 11px;
    color: #94a3b8;
    align-self: center;
    font-style: italic;
    flex: 1;
    min-width: 0;
}

/* 主要改写按钮 */
.wsr-rewrite-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
    letter-spacing: 0.8px;
}

.wsr-rewrite-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
    filter: brightness(1.05);
}

.wsr-rewrite-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.wsr-rewrite-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ========== 右侧结果面板 ========== */
.wsr-result-panel {
    width: 44%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

.wsr-result-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.wsr-result-panel-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.wsr-result-style-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: #ede9fe;
    color: #7c3aed;
}

.wsr-result-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

/* ========== 空状态 ========== */
.wsr-empty-hint {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
    padding: 40px 20px;
    animation: wsrEmptyPulse 3s ease-in-out infinite;
}

@keyframes wsrEmptyPulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

.wsr-empty-icon {
    font-size: 48px;
    opacity: 0.65;
}

.wsr-empty-sub {
    font-size: 12px;
    color: #cbd5e1;
}

/* ========== Loading 状态 ========== */
.wsr-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 20px;
    min-height: 300px;
}

.wsr-loading-spin {
    width: 38px;
    height: 38px;
    border: 3px solid #e2e8f0;
    border-top-color: #7c3aed;
    border-right-color: #a78bfa;
    border-radius: 50%;
    animation: wsrSpin 0.7s linear infinite;
}

@keyframes wsrSpin {
    to { transform: rotate(360deg); }
}

.wsr-loading-text {
    font-size: 14px;
    color: #64748b;
}

/* ========== 错误状态 ========== */
.wsr-error-area {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    padding: 14px 16px;
    color: #c53030;
    font-size: 13px;
    line-height: 1.6;
}

.wsr-retry-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 12px;
    background: white;
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.wsr-retry-btn:hover {
    background: #ef4444;
    color: white;
}

/* 错误区域内语义化子元素类 */
.wsr-error-icon {
    margin-right: 4px;
    font-style: normal;
}

.wsr-error-msg {
    color: #c53030;
    font-size: 13px;
    line-height: 1.6;
}

/* ========== 改写结果渲染区 ========== */
.wsr-rewrite-result {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: wsrFadeIn 0.3s ease;
}

/* 摘要块 */
.wsr-summary-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #c4b5fd;
    border-left: 4px solid #7c3aed;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(124, 58, 237, 0.08);
}

.wsr-summary-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.wsr-tag-style {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    background: #7c3aed;
    color: white;
}

.wsr-tag-degree {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 8px;
    background: #4f46e5;
    color: white;
}

.wsr-summary-text {
    font-size: 13px;
    color: #4c1d95;
    line-height: 1.6;
    margin: 0;
}

/* 改写后文本块 */
.wsr-rewritten-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-left: 4px solid #6366f1;
    padding-left: 12px;
}

.wsr-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.wsr-block-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.wsr-block-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 字数徽章 - 灰色小号，紧邻复制按钮左侧 */
.wsr-word-count-badge {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
}

.wsr-copy-inline-btn {
    padding: 4px 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 11px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.wsr-copy-inline-btn:hover {
    background: #7c3aed;
    border-color: #7c3aed;
    color: white;
}

.wsr-rewritten-text-box {
    background: #faf5ff;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.85;
    color: #1e1b4b;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
}

/* 主要改动块 */
.wsr-changes-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-left: 4px solid #f59e0b;
    padding-left: 12px;
}

.wsr-changes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wsr-changes-list li {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.wsr-changes-list li::before {
    content: "•";
    color: #f59e0b;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 1px;
}

/* 文风技巧块 */
.wsr-tips-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-left: 4px solid #10b981;
    padding-left: 12px;
    margin-bottom: 0;
}

.wsr-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wsr-tips-list li {
    font-size: 12px;
    color: #374151;
    line-height: 1.6;
    padding: 7px 12px;
    background: #f0fdf4;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.wsr-tips-list li::before {
    content: "💡";
    flex-shrink: 0;
    font-size: 12px;
}

/* 最后一个结果区块无底部间距 */
.wsr-tips-block:last-child,
.wsr-changes-block:last-child,
.wsr-rewritten-block:last-child {
    margin-bottom: 0;
}

/* ========== 弹窗 ========== */
.wsr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.wsr-modal.show {
    display: flex;
}

@keyframes wsrModalIn {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wsr-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 760px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    animation: wsrModalIn 0.2s ease-out;
}

.wsr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    flex-shrink: 0;
}

.wsr-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.wsr-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wsr-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.wsr-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.wsr-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.wsr-example-card {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.wsr-example-card:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.14);
    transform: translateY(-3px);
}

.wsr-example-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wsr-example-style-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
    background: #ede9fe;
    color: #7c3aed;
}

.wsr-example-card-preview {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== Toast 提示 ========== */
.wsr-copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(79, 70, 229, 0.92);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 999999;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.wsr-copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 统一滚动条 ========== */
.wsr-history-list::-webkit-scrollbar,
.wsr-result-content::-webkit-scrollbar,
.wsr-rewritten-text-box::-webkit-scrollbar,
.wsr-input-text-wrapper textarea::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.wsr-history-list::-webkit-scrollbar-track,
.wsr-result-content::-webkit-scrollbar-track,
.wsr-rewritten-text-box::-webkit-scrollbar-track,
.wsr-input-text-wrapper textarea::-webkit-scrollbar-track {
    background: transparent;
}

.wsr-history-list::-webkit-scrollbar-thumb,
.wsr-result-content::-webkit-scrollbar-thumb,
.wsr-rewritten-text-box::-webkit-scrollbar-thumb,
.wsr-input-text-wrapper textarea::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.wsr-history-list::-webkit-scrollbar-thumb:hover,
.wsr-result-content::-webkit-scrollbar-thumb:hover,
.wsr-rewritten-text-box::-webkit-scrollbar-thumb:hover,
.wsr-input-text-wrapper textarea::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* ========== 字数对比显示（原文 → 改写后） ========== */
.wsr-char-compare {
    font-size: 11px;
    font-weight: 600;
    color: #6d28d9;
    background: #ede9fe;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* ========== 改动数量标签（语义中性） ========== */
.wsr-count-tag {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ========== 历史面板数量角标 ========== */
.wsr-history-count-badge {
    display: inline-block;
    min-width: 16px;
    height: 16px;
    background: #7c3aed;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    text-align: center;
    line-height: 16px;
    padding: 0 4px;
    vertical-align: middle;
    margin-left: 2px;
    transition: all 0.2s;
}

.wsr-history-count-badge:empty {
    display: none;
}

/* ========== 历史条目程度标签 ========== */
.wsr-history-degree-tag {
    font-size: 10px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0369a1;
    white-space: nowrap;
}

/* ========== 历史条目改写字数 ========== */
.wsr-history-rewrite-count {
    font-size: 10px;
    color: #9ca3af;
    white-space: nowrap;
}

/* ========== 示例弹窗程度徽章 ========== */
.wsr-example-degree-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
    background: #e0f2fe;
    color: #0369a1;
    white-space: nowrap;
}

/* ========== 暗黑模式适配 ========== */
@media (prefers-color-scheme: dark) {
    .wsr-history-time {
        color: #475569;
    }
}
