/* =============================================
   拒绝达人 - refusal_expert.css
   三栏布局：历史 | 输入 | 结果
   主题色：珊瑚红渐变（边界感 + 优雅感）
   ============================================= */

/* ========== 主容器 ========== */
.re-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #fff7f5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.re-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    min-height: unset;
}

/* ========== 顶部工具栏 ========== */
.re-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 12px;
    min-height: 38px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 55%, #c0392b 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(192, 57, 43, 0.4);
    flex-shrink: 0;
}

.re-toolbar-group {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.re-toolbar-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
    margin-right: 4px;
}

.re-toolbar-btn {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.88);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #c0392b;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.5;
}

.re-toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.re-toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.re-toolbar-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

/* 主操作按钮（生成拒绝） */
.re-btn-primary {
    background: linear-gradient(135deg, #2d3436 0%, #1a1a2e 100%) !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.re-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #3d3d3d 0%, #2d2d44 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
}

/* 生成中 shimmer 动画 */
.re-btn-primary.re-btn-loading {
    background: linear-gradient(90deg, #1a1a2e 0%, #c0392b 35%, #1a1a2e 65%, #2d3436 100%) !important;
    background-size: 200% 100% !important;
    animation: reBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
}

@keyframes reBtnShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 取消按钮 */
.re-btn-cancel {
    background: rgba(255, 255, 255, 0.88) !important;
    color: #c0392b !important;
}

/* ========== 主内容：三栏 ========== */
.re-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #fff7f5;
}

/* ========== 左栏：历史记录 ========== */
.re-history-panel {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #fdd8d0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.re-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(to bottom, #fff7f5 0%, #fde8e4 100%);
    border-bottom: 1px solid #fdd8d0;
    flex-shrink: 0;
}

.re-history-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #c0392b;
}

.re-history-count {
    font-size: 11px;
    color: #e74c3c;
    font-weight: 400;
    margin-left: 2px;
}

.re-history-clear-btn {
    background: #fde8e4;
    border: none;
    color: #c0392b;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}

.re-history-clear-btn:hover { background: #fcc5bb; }

.re-history-search {
    padding: 7px;
    border-bottom: 1px solid #fdd8d0;
    flex-shrink: 0;
}

.re-history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #f5b7b1;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #6b1b1b;
    background: #fff7f5;
}

.re-history-search input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.12);
}

.re-history-search input::placeholder { color: #f1948a; }

.re-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
    background: #fff;
}

.re-history-empty {
    text-align: center;
    padding: 24px 12px;
    color: #e74c3c;
    font-size: 12px;
    line-height: 1.8;
}

.re-history-item {
    display: flex;
    flex-direction: column;
    padding: 9px 11px;
    margin: 3px 6px;
    background: #fff7f5;
    border: 1px solid #fdd8d0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
    animation: reFadeInItem 0.2s ease;
}

@keyframes reFadeInItem {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}

.re-history-item:hover {
    background: #fde8e4;
    border-color: #f5b7b1;
    transform: translateX(2px);
}

.re-history-item.active {
    background: #fde8e4;
    border-color: #e74c3c;
    box-shadow: inset 3px 0 0 #e74c3c, 0 1px 4px rgba(231, 76, 60, 0.2);
}

.re-history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #fde8e4;
    color: #c0392b;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    padding: 0;
}

.re-history-item:hover .re-history-item-delete { opacity: 1; }
.re-history-item-delete:hover { background: #e74c3c; color: #fff; }

.re-history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b1b1b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
    padding-right: 18px;
}

.re-history-item-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.re-history-item-badge {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

.re-badge-gentle { background: #fce4ec; color: #880e4f; }
.re-badge-firm   { background: #fbe9e7; color: #bf360c; }
.re-badge-humor  { background: #fff9c4; color: #827717; }
.re-badge-brief  { background: #e8f5e9; color: #1b5e20; }

.re-history-item-time {
    font-size: 10px;
    color: #f1948a;
}

/* ========== 中栏：输入面板 ========== */
.re-input-panel {
    width: 310px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #fdd8d0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.re-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(to bottom, #fff7f5 0%, #fde8e4 100%);
    border-bottom: 1px solid #fdd8d0;
    flex-shrink: 0;
}

.re-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #c0392b;
}

.re-panel-tip {
    font-size: 11px;
    color: #e74c3c;
}

.re-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

/* 文本输入区 */
.re-textarea-wrap {
    position: relative;
    flex: 1;
    min-height: 140px;
}

.re-textarea {
    width: 100%;
    height: 100%;
    min-height: 140px;
    padding: 11px 12px;
    border: 1.5px solid #f5b7b1;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.7;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    color: #3b1010;
    background: #fffafa;
}

.re-textarea:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.re-textarea::placeholder { color: #f1948a; }

.re-char-counter {
    position: absolute;
    bottom: 6px;
    right: 10px;
    font-size: 11px;
    color: #f1948a;
    pointer-events: none;
}

.re-char-counter.over-limit { color: #c0392b; font-weight: 600; }
.re-char-counter.warn-limit  { color: #e67e22; font-weight: 600; }

/* 抖动动画（输入为空时） */
@keyframes reShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.re-textarea.shake {
    animation: reShake 0.4s ease;
    border-color: #c0392b !important;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12) !important;
}

/* 对方关系选择 */
.re-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.re-form-label {
    font-size: 12px;
    font-weight: 600;
    color: #c0392b;
    white-space: nowrap;
    flex-shrink: 0;
}

.re-select {
    flex: 1;
    padding: 6px 10px;
    border: 1.5px solid #f5b7b1;
    border-radius: 6px;
    font-size: 12px;
    color: #3b1010;
    background: #fffafa;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23e74c3c'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.re-select:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* 拒绝风格选择 */
.re-style-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.re-style-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.re-style-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 5px;
    border: 1.5px solid #f5b7b1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #c0392b;
    background: #fffafa;
    transition: all 0.2s;
    user-select: none;
}

.re-style-option:hover {
    border-color: #e74c3c;
    background: #fde8e4;
}

.re-style-option.selected {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fde8e4 0%, #fcc5bb 100%);
    color: #922b21;
    box-shadow: 0 1px 4px rgba(231, 76, 60, 0.2);
}

.re-style-icon { font-size: 14px; }

/* 快捷场景标签 */
.re-quick-label {
    font-size: 12px;
    font-weight: 600;
    color: #c0392b;
}

.re-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: -4px;
}

.re-quick-tag {
    padding: 3px 9px;
    background: #fde8e4;
    border: 1px solid #f5b7b1;
    border-radius: 12px;
    font-size: 11px;
    color: #922b21;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.re-quick-tag:hover {
    background: #fcc5bb;
    border-color: #e74c3c;
    color: #7b241c;
    transform: translateY(-1px);
}

/* 使用说明 */
.re-tips-box {
    padding: 10px 13px;
    background: #fffafa;
    border: 1px solid #fdd8d0;
    border-radius: 6px;
    font-size: 12px;
    color: #922b21;
}

.re-tips-box p {
    margin: 0 0 6px;
    font-weight: 600;
    color: #c0392b;
}

.re-tips-box ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.9;
}

.re-tips-box li { color: #a93226; }
.re-tips-box ul li::marker { color: #f1948a; }

/* ========== 右栏：结果面板 ========== */
.re-result-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
}

.re-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(to bottom, #fff7f5 0%, #fde8e4 100%);
    border-bottom: 1px solid #fdd8d0;
    flex-shrink: 0;
}

.re-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #c0392b;
}

.re-result-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.re-result-style-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #fde8e4;
    color: #922b21;
    font-weight: 600;
}

.re-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
}

/* 占位提示 */
.re-result-placeholder {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    text-align: center;
    padding: 20px;
}

.re-placeholder-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.7;
    animation: rePlaceholderFloat 3s ease-in-out infinite;
}

@keyframes rePlaceholderFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.re-placeholder-title {
    font-size: 17px;
    font-weight: 700;
    color: #c0392b;
    margin: 0 0 12px;
}

.re-placeholder-desc {
    font-size: 13px;
    color: #e74c3c;
    margin: 3px 0;
}

/* 加载中 */
.re-result-loading {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.re-loading-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.re-loading-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #c0392b);
    animation: reDotBounce 1.2s ease-in-out infinite;
}

.re-loading-dots span:nth-child(1) { animation-delay: 0s; }
.re-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.re-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes reDotBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40%           { transform: scale(1.1); opacity: 1; }
}

.re-loading-text {
    font-size: 13px;
    color: #e74c3c;
    margin: 0;
    animation: reTextFade 2s ease-in-out infinite;
}

@keyframes reTextFade {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

/* 结果内容区 */
.re-result-content {
    /* animation 不硬编码在基础类上，由 JS 添加 .hfi-result-enter 触发 */
}

.hfi-result-enter {
    animation: resultFadeIn 0.35s ease-out forwards;
}

@keyframes resultFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 错误提示 */
.re-result-error {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.re-error-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px;
    background: #fff5f5;
    border: 1px solid #fcc5bb;
    border-radius: 8px;
    text-align: center;
}

.re-error-icon { font-size: 32px; }
.re-error-msg  { font-size: 14px; color: #c0392b; margin: 0; font-weight: 500; }
.re-error-tip  { font-size: 12px; color: #e74c3c; margin: 0; }

.re-error-retry-btn {
    margin-top: 4px;
    padding: 6px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #c0392b 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.35);
}

.re-error-retry-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.45);
}

/* 重新生成按钮 */
.re-btn-regenerate {
    padding: 3px 9px;
    background: #fde8e4;
    border: 1px solid #f5b7b1;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: #922b21;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.5;
}

.re-btn-regenerate:hover {
    background: #fcc5bb;
    border-color: #e74c3c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.2);
}

/* ========== AI 生成结果：拒绝话术卡片 ========== */
.re-variants {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

/* 拒绝版本卡片 */
.re-variant {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.08);
    transition: box-shadow 0.2s;
}

.re-variant:hover {
    box-shadow: 0 4px 14px rgba(192, 57, 43, 0.14);
}

/* 版本一：温和版（绿色调） */
.re-variant-v1 { border: 1.5px solid #a8d5ba; }

.re-variant-v1 .re-variant-header {
    background: linear-gradient(135deg, #e8f8f0 0%, #d4efdf 100%);
}

.re-variant-v1 .re-variant-num { color: #1e8449; }
.re-variant-v1 .re-variant-tone { background: #d4efdf; color: #1a5e38; }

/* 版本二：主风格版（橙调） */
.re-variant-v2 { border: 1.5px solid #f4b183; }

.re-variant-v2 .re-variant-header {
    background: linear-gradient(135deg, #fef2e8 0%, #fde0c4 100%);
}

.re-variant-v2 .re-variant-num { color: #c0561a; }
.re-variant-v2 .re-variant-tone { background: #fde0c4; color: #9c4012; }

/* 版本三：果断版（红调） */
.re-variant-v3 { border: 1.5px solid #f1948a; }

.re-variant-v3 .re-variant-header {
    background: linear-gradient(135deg, #fde8e4 0%, #fcc5bb 100%);
}

.re-variant-v3 .re-variant-num { color: #c0392b; }
.re-variant-v3 .re-variant-tone { background: #fcc5bb; color: #922b21; }

/* 卡片头部 */
.re-variant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    flex-wrap: wrap;
    gap: 6px;
}

.re-variant-num {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.re-variant-tone {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* 卡片内容 */
.re-variant-body {
    padding: 13px 16px;
    background: #fff;
}

.re-variant-body p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.85;
    color: #2c1010;
}

.re-variant-body p + p {
    margin-top: 8px;
}

/* 复制按钮（由JS注入） */
.re-variant-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 4px 12px;
    background: #fde8e4;
    border: 1px solid #f5b7b1;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: #922b21;
    transition: all 0.2s;
}

.re-variant-copy-btn:hover {
    background: #fcc5bb;
    border-color: #e74c3c;
    color: #7b241c;
    transform: translateY(-1px);
}

.re-variant-copy-btn.copied {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #1b5e20;
}

/* 卡片底部：拒绝强度 */
.re-variant-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.re-strength-label {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

.re-strength-track {
    flex: 1;
    height: 6px;
    background: #f0e0de;
    border-radius: 3px;
    overflow: hidden;
}

.re-strength-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #f9ca8a 0%, #e74c3c 100%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.re-strength-value {
    font-size: 11px;
    font-weight: 700;
    color: #c0392b;
    min-width: 22px;
    text-align: right;
    flex-shrink: 0;
}

/* 使用建议区 */
.re-advice-section {
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff9f0 0%, #fff5f0 100%);
    border: 1px solid #fdd8d0;
    border-radius: 9px;
    margin-top: 4px;
}

.re-advice-section h4 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #c0392b;
}

.re-advice-section ul {
    margin: 0;
    padding-left: 18px;
    font-size: 12.5px;
    line-height: 2;
    color: #7b241c;
}

.re-advice-section li::marker { color: #f1948a; }

/* 结果内容区通用标签样式 */
.re-result-content h5 {
    margin: 12px 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #c0392b;
}

.re-result-content blockquote {
    margin: 10px 0;
    padding: 8px 14px;
    border-left: 3px solid #f5b7b1;
    background: #fff7f5;
    font-size: 13px;
    color: #7b241c;
    border-radius: 0 6px 6px 0;
}

.re-result-content li::marker { color: #e74c3c; }

/* ========== 模态框 ========== */
.re-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s;
}

.re-modal-overlay.show {
    display: block;
    opacity: 1;
}

.re-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: min(680px, 94vw);
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    z-index: 10001;
    overflow: hidden;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.re-modal.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.re-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #ff6b6b 0%, #c0392b 100%);
    color: #fff;
    flex-shrink: 0;
}

.re-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.re-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.re-modal-close:hover { color: #fff; }

.re-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* 示例网格 */
.re-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.re-example-card {
    padding: 13px 15px;
    border: 1.5px solid #fdd8d0;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.18s;
    background: #fffafa;
}

.re-example-card:hover {
    border-color: #e74c3c;
    background: #fde8e4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.15);
}

.re-example-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.re-example-icon {
    font-size: 18px;
}

.re-example-title {
    font-size: 13px;
    font-weight: 700;
    color: #922b21;
}

.re-example-preview {
    font-size: 12px;
    color: #7b7b7b;
    line-height: 1.6;
}

.re-examples-loading {
    text-align: center;
    padding: 24px;
    color: #e74c3c;
    font-size: 13px;
}

/* ========== 暗黑模式 ========== */
body.dark .re-container {
    background: #1a0a0a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.dark .re-toolbar {
    background: linear-gradient(135deg, #7b1111 0%, #5c0f0f 55%, #3c0707 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.dark .re-toolbar-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ffb3b3;
}

body.dark .re-toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

body.dark .re-toolbar-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

body.dark .re-btn-primary {
    background: linear-gradient(135deg, #5c0f0f 0%, #3c0707 100%) !important;
    color: #ffb3b3 !important;
}

body.dark .re-btn-primary.re-btn-loading {
    background: linear-gradient(90deg, #3c0707 0%, #c0392b 35%, #3c0707 65%, #5c0f0f 100%) !important;
    background-size: 200% 100% !important;
    animation: reBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
}

body.dark .re-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #7b1111 0%, #5c0f0f 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

body.dark .re-main-content {
    background: #1a0a0a;
}

/* 左栏暗黑 */
body.dark .re-history-panel {
    background: #1f0e0e;
    border-right-color: #4a1010;
}

body.dark .re-history-header {
    background: linear-gradient(to bottom, #1f0e0e 0%, #2a1010 100%);
    border-bottom-color: #4a1010;
}

body.dark .re-history-header h3 { color: #ff9999; }
body.dark .re-history-count     { color: #ff7070; }
body.dark .re-history-clear-btn { background: #3a1010; color: #ff9999; }
body.dark .re-history-clear-btn:hover { background: #4a1515; }

body.dark .re-history-search { border-bottom-color: #4a1010; }

body.dark .re-history-search input {
    background: #1f0e0e;
    border-color: #5c1a1a;
    color: #ffcccc;
}

body.dark .re-history-search input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

body.dark .re-history-search input::placeholder { color: #883333; }

body.dark .re-history-list { background: #1f0e0e; }
body.dark .re-history-empty { color: #883333; }

body.dark .re-history-item {
    background: #2a1010;
    border-color: #4a1515;
}

body.dark .re-history-item:hover {
    background: #3a1515;
    border-color: #6a1f1f;
}

body.dark .re-history-item.active {
    background: #3a1515;
    border-color: #e74c3c;
    box-shadow: inset 3px 0 0 #e74c3c, 0 1px 4px rgba(231, 76, 60, 0.3);
}

body.dark .re-history-item-title { color: #ffcccc; }
body.dark .re-history-item-time  { color: #883333; }
body.dark .re-history-item-delete { background: #4a1515; color: #ff9999; }
body.dark .re-history-item-delete:hover { background: #e74c3c; color: #fff; }

body.dark .re-badge-gentle { background: #3e0a1e; color: #f48fb1; }
body.dark .re-badge-firm   { background: #3e1a0a; color: #ff8a65; }
body.dark .re-badge-humor  { background: #3e3a00; color: #fff176; }
body.dark .re-badge-brief  { background: #0a2e0a; color: #81c784; }

/* 中栏暗黑 */
body.dark .re-input-panel {
    background: #1f0e0e;
    border-right-color: #4a1010;
}

body.dark .re-panel-header {
    background: linear-gradient(to bottom, #1f0e0e 0%, #2a1010 100%);
    border-bottom-color: #4a1010;
}

body.dark .re-panel-header h3 { color: #ff9999; }
body.dark .re-panel-tip        { color: #cc5555; }

body.dark .re-textarea {
    background: #2a1010;
    border-color: #5c1a1a;
    color: #ffdddd;
}

body.dark .re-textarea:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

body.dark .re-textarea::placeholder { color: #883333; }
body.dark .re-char-counter         { color: #883333; }
body.dark .re-char-counter.over-limit { color: #ff6666; }
body.dark .re-char-counter.warn-limit  { color: #f4a57d; }

body.dark .re-form-label { color: #ff9999; }

body.dark .re-select {
    background-color: #2a1010;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23e74c3c'/%3E%3C/svg%3E");
    border-color: #5c1a1a;
    color: #ffdddd;
}

body.dark .re-select:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

body.dark .re-style-option {
    background: #2a1010;
    border-color: #5c1a1a;
    color: #ff9999;
}

body.dark .re-style-option:hover {
    background: #3a1515;
    border-color: #e74c3c;
}

body.dark .re-style-option.selected {
    background: linear-gradient(135deg, #3a1515 0%, #4a1a1a 100%);
    color: #ff9999;
    border-color: #e74c3c;
}

body.dark .re-quick-label { color: #ff9999; }

body.dark .re-quick-tag {
    background: #3a1515;
    border-color: #5c1a1a;
    color: #ff9999;
}

body.dark .re-quick-tag:hover {
    background: #4a1a1a;
    border-color: #e74c3c;
}

body.dark .re-tips-box {
    background: #2a1010;
    border-color: #4a1515;
    color: #cc6666;
}

body.dark .re-tips-box p { color: #ff9999; }
body.dark .re-tips-box li { color: #cc6666; }
body.dark .re-tips-box ul li::marker { color: #883333; }

/* 右栏暗黑 */
body.dark .re-result-panel { background: #1f0e0e; }

body.dark .re-result-header {
    background: linear-gradient(to bottom, #1f0e0e 0%, #2a1010 100%);
    border-bottom-color: #4a1010;
}

body.dark .re-result-header h3 { color: #ff9999; }
body.dark .re-result-style-badge { background: #3a1515; color: #ff9999; }

body.dark .re-result-body::-webkit-scrollbar { width: 5px; }
body.dark .re-result-body::-webkit-scrollbar-track { background: #1f0e0e; }
body.dark .re-result-body::-webkit-scrollbar-thumb { background: #5c1a1a; border-radius: 3px; }
body.dark .re-result-body::-webkit-scrollbar-thumb:hover { background: #883333; }

body.dark .re-placeholder-title { color: #ff9999; }
body.dark .re-placeholder-desc  { color: #883333; }
body.dark .re-loading-text       { color: #ff9999; }

body.dark .re-variant-v1 { border-color: #2e5e40; }
body.dark .re-variant-v1 .re-variant-header { background: linear-gradient(135deg, #0f2a1a 0%, #152e1e 100%); }
body.dark .re-variant-v1 .re-variant-num  { color: #5dbb85; }
body.dark .re-variant-v1 .re-variant-tone { background: #152e1e; color: #5dbb85; }

body.dark .re-variant-v2 { border-color: #7a4010; }
body.dark .re-variant-v2 .re-variant-header { background: linear-gradient(135deg, #2a1800 0%, #3a2000 100%); }
body.dark .re-variant-v2 .re-variant-num  { color: #f4a057; }
body.dark .re-variant-v2 .re-variant-tone { background: #3a2000; color: #f4a057; }

body.dark .re-variant-v3 { border-color: #6a1a1a; }
body.dark .re-variant-v3 .re-variant-header { background: linear-gradient(135deg, #2a0a0a 0%, #3a1010 100%); }
body.dark .re-variant-v3 .re-variant-num  { color: #ff6b6b; }
body.dark .re-variant-v3 .re-variant-tone { background: #3a1010; color: #ff6b6b; }

body.dark .re-variant-body { background: #1f0e0e; }
body.dark .re-variant-body p { color: #ffdddd; }

body.dark .re-variant-copy-btn {
    background: #2a1010;
    border-color: #5c1a1a;
    color: #ffb3b3;
}

body.dark .re-variant-copy-btn:hover { background: #3a1515; color: #ffcccc; }
body.dark .re-variant-copy-btn.copied { background: #0f2a1a; border-color: #2e5e40; color: #5dbb85; }

body.dark .re-variant-footer { background: rgba(30, 10, 10, 0.8); border-top-color: rgba(255,255,255,0.05); }
body.dark .re-strength-label { color: #883333; }
body.dark .re-strength-track { background: #3a1515; }
body.dark .re-strength-value { color: #ff9999; }

body.dark .re-advice-section {
    background: linear-gradient(135deg, #2a1800 0%, #1f1000 100%);
    border-color: #4a2a00;
}

body.dark .re-advice-section h4 { color: #f4a057; }
body.dark .re-advice-section ul  { color: #cc8844; }
body.dark .re-advice-section li::marker { color: #7a4010; }

/* 结果内容区通用标签暗黑 */
body.dark .re-result-content h5 { color: #ff9999; }
body.dark .re-result-content blockquote {
    border-left-color: #5c1a1a;
    background: #2a1010;
    color: #ffcccc;
}
body.dark .re-result-content li::marker { color: #883333; }

body.dark .re-btn-regenerate {
    background: #3a1515;
    border-color: #5c1a1a;
    color: #ff9999;
}

body.dark .re-btn-regenerate:hover { background: #4a1a1a; border-color: #e74c3c; }

/* 暗黑模态框 */
body.dark .re-modal {
    background: #1f0e0e;
    border: 1px solid #4a1010;
}

body.dark .re-modal-header {
    background: linear-gradient(135deg, #7b1111 0%, #3c0707 100%);
}

body.dark .re-example-card {
    background: #2a1010;
    border-color: #5c1a1a;
}

body.dark .re-example-card:hover {
    background: #3a1515;
    border-color: #e74c3c;
}

body.dark .re-example-title   { color: #ff9999; }
body.dark .re-example-preview { color: #883333; }
body.dark .re-examples-loading { color: #883333; }

/* 暗黑模式错误框 */
body.dark .re-result-error { background: transparent; }
body.dark .re-error-box {
    background: #2a1010;
    border-color: #5c1a1a;
}
body.dark .re-error-msg  { color: #ff9999; }
body.dark .re-error-tip  { color: #883333; }
body.dark .re-error-retry-btn {
    background: linear-gradient(135deg, #7b1111 0%, #5c0f0f 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* 滑动条（亮色） */
.re-history-list::-webkit-scrollbar,
.re-input-body::-webkit-scrollbar,
.re-result-body::-webkit-scrollbar,
.re-modal-body::-webkit-scrollbar {
    width: 5px;
}

.re-history-list::-webkit-scrollbar-track,
.re-input-body::-webkit-scrollbar-track,
.re-result-body::-webkit-scrollbar-track,
.re-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.re-history-list::-webkit-scrollbar-thumb,
.re-input-body::-webkit-scrollbar-thumb,
.re-result-body::-webkit-scrollbar-thumb,
.re-modal-body::-webkit-scrollbar-thumb {
    background: #f5b7b1;
    border-radius: 3px;
}

.re-history-list::-webkit-scrollbar-thumb:hover,
.re-input-body::-webkit-scrollbar-thumb:hover,
.re-result-body::-webkit-scrollbar-thumb:hover,
.re-modal-body::-webkit-scrollbar-thumb:hover {
    background: #e74c3c;
}

/* 滑动条（暗黑） */
body.dark .re-history-list::-webkit-scrollbar-thumb { background: #5c1a1a; }
body.dark .re-history-list::-webkit-scrollbar-thumb:hover { background: #883333; }
body.dark .re-input-body::-webkit-scrollbar-thumb { background: #5c1a1a; }
body.dark .re-input-body::-webkit-scrollbar-thumb:hover { background: #883333; }
body.dark .re-modal-body::-webkit-scrollbar-thumb { background: #5c1a1a; }
body.dark .re-modal-body::-webkit-scrollbar-thumb:hover { background: #883333; }

/* ========== 响应式布局 ========== */
@media (max-width: 900px) {
    .re-history-panel {
        display: none;
    }
}

@media (max-width: 639px) {
    .re-main-content {
        flex-direction: column;
    }

    .re-input-panel {
        width: 100%;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid #fdd8d0;
        max-height: 45vh;
    }

    body.dark .re-input-panel {
        border-bottom-color: #4a1010;
    }

    .re-result-panel {
        min-width: unset;
    }

    .re-container {
        height: calc(100vh - 120px);
    }

    .re-toolbar {
        gap: 4px;
    }

    .re-toolbar-title {
        display: none;
    }
}
