/* ======================== 接待流程工具 - 主题色：商务蓝 + 接待金 ======================== */
:root {
    --rp-primary: #3b6eb5;
    --rp-primary-light: #5a8fd4;
    --rp-primary-dark: #2a5490;
    --rp-accent: #c8964e;
    --rp-accent-light: #e0b876;
    --rp-warm: #e07b54;
    --rp-bg: #f4f6fa;
    --rp-card-bg: #ffffff;
    --rp-text: #2d3748;
    --rp-text-secondary: #718096;
    --rp-border: #e2e8f0;
    --rp-hover: #edf2f7;
    --rp-shadow: rgba(59, 110, 181, 0.08);
    --rp-radius: 12px;
    --rp-radius-sm: 8px;
    --rp-success: #48bb78;
    --rp-timeline: #3b6eb5;
}

/* ======================== 暗黑模式 ======================== */
body.dark {
    --rp-primary: #5a8fd4;
    --rp-primary-light: #3b6eb5;
    --rp-primary-dark: #7ab0f0;
    --rp-accent: #e0b876;
    --rp-accent-light: #c8964e;
    --rp-warm: #e07b54;
    --rp-bg: #1a202c;
    --rp-card-bg: #2d3748;
    --rp-text: #e2e8f0;
    --rp-text-secondary: #a0aec0;
    --rp-border: #4a5568;
    --rp-hover: #374151;
    --rp-shadow: rgba(0, 0, 0, 0.3);
    --rp-success: #68d391;
    --rp-timeline: #5a8fd4;
}

/* 暗黑模式平滑过渡 */
body, body.dark {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.rp-container, .rp-toolbar, .rp-history-panel, .rp-input-panel, .rp-result-panel,
.rp-input-body, .rp-result-body, .panel-header, .history-panel-header, .rp-result-header,
.rp-textarea, .rp-input, .rp-tips-box, .rp-scene-option, .rp-level-option,
.history-search input, .history-item, .example-card, .rp-modal, .rp-error-card {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* ======================== 主容器 ======================== */
.rp-container {
    background: var(--rp-bg);
    border-radius: var(--rp-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 12px var(--rp-shadow);
}

.rp-container.fullscreen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

/* ======================== 工具栏 ======================== */
.rp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--rp-primary) 0%, #2a5490 60%, var(--rp-accent) 100%);
    border-bottom: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 110, 181, 0.3);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.toolbar-title {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    margin-right: 8px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.toolbar-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.9);
    color: var(--rp-primary-dark);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toolbar-btn-primary {
    background: #fff;
    color: var(--rp-primary-dark);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.toolbar-btn-primary:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toolbar-btn-active {
    background: rgba(255,255,255,0.25);
    color: #fff;
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.4);
}

.toolbar-btn-active:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
    transform: translateY(-1px);
}

.toolbar-btn-cancel {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    font-weight: 600;
}

.toolbar-btn-cancel:hover:not(:disabled) {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
}

/* ======================== 三栏布局 ======================== */
.rp-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* 左栏 - 历史记录 */
.rp-history-panel {
    width: 220px;
    min-width: 220px;
    background: var(--rp-card-bg);
    border-right: 1px solid var(--rp-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--rp-border);
    background: linear-gradient(to bottom, var(--rp-card-bg), var(--rp-bg));
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--rp-text);
}

.history-count {
    font-size: 11px;
    color: var(--rp-text-secondary);
    margin-left: 4px;
}

.history-clear-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.history-clear-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.history-search {
    padding: 8px 10px;
    border-bottom: 1px solid var(--rp-border);
}

.history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--rp-border);
    border-radius: 6px;
    font-size: 12px;
    background: var(--rp-bg);
    color: var(--rp-text);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.history-search input:focus {
    border-color: var(--rp-primary);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.history-empty {
    text-align: center;
    color: var(--rp-text-secondary);
    font-size: 12px;
    padding: 30px 10px;
    line-height: 1.8;
}

.history-item {
    padding: 10px 12px;
    border-radius: var(--rp-radius-sm);
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.history-item:hover {
    background: var(--rp-hover);
    border-color: var(--rp-border);
}

.history-item.active {
    background: rgba(59, 110, 181, 0.1);
    border-color: var(--rp-primary);
    border-left: 3px solid var(--rp-primary);
}

.history-item.active .history-item-title {
    color: var(--rp-primary);
    font-weight: 600;
}

.history-item-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--rp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.history-item-meta {
    font-size: 10px;
    color: var(--rp-text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item-scene {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--rp-primary);
    color: #fff;
    opacity: 0.8;
}

.history-item-delete {
    display: none;
    background: none;
    border: none;
    color: #ef4444;
    font-size: 12px;
    cursor: pointer;
    padding: 0 4px;
}

.history-item:hover .history-item-delete {
    display: inline-block;
}

/* 中栏 - 输入面板 */
.rp-input-panel {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--rp-border);
}

.panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--rp-border);
    background: linear-gradient(to bottom, var(--rp-card-bg), var(--rp-bg));
}

.panel-header h3 {
    margin: 0 0 2px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--rp-text);
}

.panel-tip {
    font-size: 11px;
    color: var(--rp-accent);
    font-style: italic;
}

.rp-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--rp-bg);
}

/* 字段组 */
.rp-field-group {
    margin-bottom: 16px;
}

.rp-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--rp-text-secondary);
    display: block;
    margin-bottom: 8px;
}

.required-mark {
    color: #ef4444;
    font-style: normal;
}

/* 场景选择 */
.rp-scene-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rp-scene-option {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--rp-border);
    background: var(--rp-card-bg);
    color: var(--rp-text);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.rp-scene-option:hover {
    border-color: var(--rp-primary);
    background: rgba(59, 110, 181, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59, 110, 181, 0.12);
}

.rp-scene-option.selected {
    background: var(--rp-primary);
    color: #fff;
    border-color: var(--rp-primary);
}

.rp-scene-option.selected::before {
    content: '\2713 ';
    font-weight: 700;
    font-size: 11px;
}

.rp-scene-icon {
    font-size: 14px;
}

/* 规格选择 */
.rp-level-options {
    display: flex;
    gap: 8px;
}

.rp-level-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--rp-radius-sm);
    border: 2px solid var(--rp-border);
    background: var(--rp-card-bg);
    color: var(--rp-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.rp-level-option:hover {
    border-color: var(--rp-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(200, 150, 78, 0.12);
}

.rp-level-option.selected {
    border-color: var(--rp-primary);
    background: linear-gradient(135deg, rgba(59,110,181,0.08), rgba(200,150,78,0.06));
    color: var(--rp-primary);
    box-shadow: 0 2px 8px rgba(59, 110, 181, 0.12);
}

.rp-level-option.selected::after {
    content: ' \2713';
    font-weight: 700;
    color: var(--rp-primary);
    margin-left: 4px;
}

.rp-level-icon {
    font-size: 14px;
}

/* 输入框 */
.rp-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--rp-border);
    border-radius: var(--rp-radius-sm);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    background: var(--rp-card-bg);
    color: var(--rp-text);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    min-height: 80px;
}

.rp-textarea-sm {
    min-height: 56px;
}

.rp-textarea:focus {
    border-color: var(--rp-primary);
    box-shadow: 0 0 0 3px rgba(59, 110, 181, 0.12);
}

.rp-textarea::placeholder {
    color: var(--rp-text-secondary);
    opacity: 0.7;
}

.rp-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--rp-border);
    border-radius: var(--rp-radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--rp-card-bg);
    color: var(--rp-text);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.rp-input:focus {
    border-color: var(--rp-primary);
    box-shadow: 0 0 0 3px rgba(59, 110, 181, 0.12);
}

.rp-input::placeholder {
    color: var(--rp-text-secondary);
    opacity: 0.7;
}

.rp-char-counter {
    text-align: right;
    font-size: 11px;
    color: var(--rp-text-secondary);
    margin-top: 4px;
}

/* 使用提示 */
.rp-tips-box {
    background: var(--rp-card-bg);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius-sm);
    padding: 12px 14px;
    margin-top: 8px;
}

.rp-tips-box p {
    margin: 0 0 6px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--rp-accent);
}

.rp-tips-box ul {
    margin: 0;
    padding-left: 18px;
}

.rp-tips-box li {
    font-size: 11px;
    color: var(--rp-text-secondary);
    line-height: 1.7;
}

/* ======================== 右栏 - 结果面板 ======================== */
.rp-result-panel {
    flex: 1.2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--rp-card-bg);
}

.rp-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--rp-border);
    background: linear-gradient(to bottom, var(--rp-card-bg), var(--rp-bg));
}

.rp-result-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--rp-text);
}

.result-level-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--rp-primary);
    color: #fff;
}

.rp-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--rp-bg);
}

/* 占位提示 */
.result-placeholder {
    text-align: center;
    padding: 60px 20px;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.placeholder-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--rp-primary);
    margin: 0 0 12px 0;
}

.placeholder-desc {
    font-size: 12px;
    color: var(--rp-text-secondary);
    margin: 4px 0;
    line-height: 1.6;
}

.placeholder-shortcut {
    display: inline-block;
    margin-top: 14px;
    padding: 4px 14px;
    font-size: 11px;
    color: var(--rp-text-secondary);
    background: var(--rp-card-bg);
    border: 1px solid var(--rp-border);
    border-radius: 6px;
    opacity: 0.75;
}

/* 加载动画 - 三点波动 */
.result-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.loading-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--rp-primary);
    animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.16s; background: var(--rp-accent); }
.loading-dot:nth-child(3) { animation-delay: 0.32s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; }
}

.loading-text {
    font-size: 14px;
    color: var(--rp-primary);
    margin: 0 0 6px 0;
    font-weight: 500;
}

.loading-sub {
    font-size: 12px;
    color: var(--rp-text-secondary);
    margin: 0;
}

/* ======================== 结果内容样式 ======================== */
.result-content {
    line-height: 1.7;
    color: var(--rp-text);
    font-size: 14px;
}

.result-content .rp-result {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-content .rp-section {
    margin-bottom: 16px;
    padding: 16px 18px;
    background: var(--rp-card-bg);
    border-radius: var(--rp-radius);
    border-left: 4px solid var(--rp-primary);
    box-shadow: 0 1px 4px var(--rp-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-content .rp-section:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px var(--rp-shadow);
}

.result-content .rp-section h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: var(--rp-primary);
}

.result-content .rp-section h5 {
    margin: 10px 0 6px 0;
    font-size: 13px;
    color: var(--rp-accent);
}

.result-content .rp-section p {
    margin: 6px 0;
    line-height: 1.8;
}

.result-content .rp-section ul {
    padding-left: 20px;
    margin: 6px 0;
}

.result-content .rp-section li {
    margin-bottom: 6px;
    line-height: 1.7;
    list-style: none;
    position: relative;
    padding-left: 16px;
}

.result-content .rp-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rp-accent);
}

.result-content .checklist-section li::before {
    background: var(--rp-success);
}

.result-content .etiquette-section li::before {
    background: #9b59b6;
}

.result-content .emergency-section li::before {
    background: var(--rp-warm);
}

/* 各区块特色边框色 */
.result-content .overview-section {
    border-left-color: var(--rp-primary);
}

.result-content .timeline-section {
    border-left-color: var(--rp-accent);
}

.result-content .checklist-section {
    border-left-color: var(--rp-success);
}

.result-content .etiquette-section {
    border-left-color: #9b59b6;
}

.result-content .emergency-section {
    border-left-color: var(--rp-warm);
}

.result-content .closing-section {
    border-left-color: var(--rp-primary);
    background: rgba(59, 110, 181, 0.04);
}

.result-content .rp-closing {
    font-style: italic;
    color: var(--rp-primary);
    font-weight: 500;
}

/* 概览网格 */
.result-content .rp-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.result-content .rp-overview-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    background: var(--rp-bg);
    border-radius: 6px;
}

.result-content .rp-label {
    font-size: 11px;
    color: var(--rp-text-secondary);
    font-weight: 600;
}

.result-content .rp-value {
    font-size: 13px;
    color: var(--rp-text);
    font-weight: 500;
}

/* 时间线样式 */
.result-content .rp-timeline {
    position: relative;
    padding-left: 20px;
}

.result-content .rp-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--rp-primary), var(--rp-accent));
    border-radius: 1px;
}

.result-content .rp-timeline-item {
    position: relative;
    margin-bottom: 16px;
    padding-left: 16px;
}

.result-content .rp-timeline-item::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rp-primary);
    border: 2px solid var(--rp-card-bg);
    box-shadow: 0 0 0 2px var(--rp-primary);
}

.result-content .rp-time-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--rp-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
}

.result-content .rp-timeline-content {
    background: var(--rp-bg);
    border-radius: var(--rp-radius-sm);
    padding: 12px 14px;
}

.result-content .rp-timeline-content h5 {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: var(--rp-text);
    font-weight: 600;
}

.result-content .rp-timeline-content p {
    margin: 0;
    font-size: 12px;
    color: var(--rp-text-secondary);
    line-height: 1.7;
}

/* 错误提示 */
#rpResultError {
    text-align: center;
    padding: 20px;
    color: #ef4444;
    font-size: 13px;
}

.rp-error-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 32px;
    background: var(--rp-card-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--rp-radius);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

.rp-error-card .error-icon {
    font-size: 28px;
}

.rp-error-card .error-msg {
    font-size: 13px;
    color: #ef4444;
    font-weight: 500;
}

.rp-error-card .error-hint {
    font-size: 11px;
    color: var(--rp-text-secondary);
}

.error-retry-btn {
    margin-top: 6px;
    padding: 6px 18px;
    border: none;
    border-radius: 6px;
    background: var(--rp-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.error-retry-btn:hover {
    background: var(--rp-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 110, 181, 0.25);
}

/* ======================== Toast 通知 ======================== */
.rp-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

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

.rp-toast.success {
    background: var(--rp-primary);
    color: #fff;
}

.rp-toast.error {
    background: #ef4444;
    color: #fff;
}

.rp-toast.info {
    background: var(--rp-accent);
    color: #fff;
}

/* ======================== 模态框 ======================== */
.rp-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
}

.rp-modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--rp-card-bg);
    border-radius: var(--rp-radius);
    box-shadow: 0 20px 60px var(--rp-shadow);
    z-index: 10001;
    width: 90%;
    max-width: 680px;
    max-height: 80vh;
    overflow: hidden;
    flex-direction: column;
}

.rp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rp-border);
}

.rp-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--rp-text);
}

.rp-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--rp-text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.rp-modal-close:hover {
    background: var(--rp-hover);
    color: var(--rp-text);
}

.rp-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.example-card {
    padding: 14px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--rp-bg);
}

.example-card:hover {
    border-color: var(--rp-accent);
    box-shadow: 0 4px 16px rgba(200, 150, 78, 0.18);
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--rp-card-bg), rgba(200, 150, 78, 0.04));
}

.example-card-scene {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--rp-primary);
    color: #fff;
    margin-bottom: 6px;
}

.example-card-level {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--rp-accent);
    color: #fff;
    margin-bottom: 6px;
    margin-left: 4px;
}

.example-card-visitors {
    font-size: 13px;
    color: var(--rp-text);
    line-height: 1.5;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.example-card-desc {
    font-size: 11px;
    color: var(--rp-text-secondary);
}

/* ======================== 暗黑模式补充 ======================== */
body.dark .rp-toolbar {
    background: linear-gradient(135deg, #2a4a6e 0%, #1e3a5e 60%, #8a6e3a 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.dark .rp-container.fullscreen {
    background: var(--rp-bg);
}

body.dark .toolbar-btn {
    background: rgba(255,255,255,0.12);
    color: #e2e8f0;
}

body.dark .toolbar-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

body.dark .toolbar-btn-primary {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

body.dark .toolbar-title {
    color: #fff;
}

body.dark .history-item.active {
    background: rgba(90, 143, 212, 0.12);
    border-color: var(--rp-primary);
}

body.dark .rp-error-card {
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark .rp-scene-option:hover {
    background: rgba(90, 143, 212, 0.1);
}

body.dark .toolbar-btn-active {
    background: rgba(255,255,255,0.2);
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.3);
}

body.dark .result-content .rp-timeline-item::before {
    border-color: var(--rp-card-bg);
}

body.dark .rp-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
}

body.dark .rp-modal {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.dark .example-card {
    border-color: var(--rp-border);
}

body.dark .toolbar-btn-cancel {
    background: rgba(239, 68, 68, 0.85);
}

body.dark .toolbar-btn-cancel:hover:not(:disabled) {
    background: #ef4444;
}

body.dark .rp-tips-box {
    background: rgba(45, 55, 72, 0.8);
    border-color: var(--rp-border);
}

body.dark .result-content .closing-section {
    background: rgba(90, 143, 212, 0.06);
}

body.dark .result-content .rp-overview-item {
    background: rgba(26, 32, 44, 0.6);
}

body.dark .result-content .rp-timeline-content {
    background: rgba(26, 32, 44, 0.6);
}

.toolbar-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

body.dark .toolbar-btn-disabled {
    opacity: 0.35;
}

body.dark .history-search input {
    background: var(--rp-bg);
    border-color: var(--rp-border);
    color: var(--rp-text);
}

body.dark .example-card:hover {
    border-color: var(--rp-accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, var(--rp-card-bg), rgba(224, 184, 118, 0.06));
}

/* ======================== 触摸设备适配 ======================== */
@media (hover: none) and (pointer: coarse) {
    .history-item-delete {
        display: inline-block;
        opacity: 0.6;
    }
    .history-item:hover .history-item-delete {
        opacity: 1;
    }
}

/* ======================== 响应式设计 ======================== */
@media (max-width: 1024px) {
    .rp-history-panel {
        width: 180px;
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .rp-main-content {
        flex-direction: column;
    }
    .rp-history-panel {
        width: 100%;
        min-width: 100%;
        max-height: 150px;
        border-right: none;
        border-bottom: 1px solid var(--rp-border);
    }
    .rp-input-panel {
        border-right: none;
        border-bottom: 1px solid var(--rp-border);
        min-width: auto;
    }
    .rp-result-panel {
        min-width: auto;
    }
    .toolbar-group {
        flex-wrap: wrap;
    }
    .example-grid {
        grid-template-columns: 1fr;
    }
    .rp-level-options {
        flex-direction: column;
    }
    .result-content .rp-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .rp-toolbar {
        padding: 8px 10px;
    }
    .toolbar-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    .rp-scene-options {
        gap: 4px;
    }
    .rp-scene-option {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* ======================== 滚动条美化 ======================== */
.rp-history-panel ::-webkit-scrollbar,
.rp-input-body::-webkit-scrollbar,
.rp-result-body::-webkit-scrollbar {
    width: 5px;
}

.rp-history-panel ::-webkit-scrollbar-track,
.rp-input-body::-webkit-scrollbar-track,
.rp-result-body::-webkit-scrollbar-track {
    background: transparent;
}

.rp-history-panel ::-webkit-scrollbar-thumb,
.rp-input-body::-webkit-scrollbar-thumb,
.rp-result-body::-webkit-scrollbar-thumb {
    background: var(--rp-border);
    border-radius: 3px;
}

.rp-history-panel ::-webkit-scrollbar-thumb:hover,
.rp-input-body::-webkit-scrollbar-thumb:hover,
.rp-result-body::-webkit-scrollbar-thumb:hover {
    background: var(--rp-text-secondary);
}
