/* ========================================================================
   提示词倒推 - Prompt Reverse Engineering
   ======================================================================== */

.pr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

/* ========================================================================
   隐私保障横幅
   ======================================================================== */
.pr-privacy-banner {
    margin-bottom: 24px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.04) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(79, 70, 229, 0.08);
    border-radius: 14px;
}

.pr-privacy-items {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

.pr-privacy-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pr-privacy-item svg {
    width: 28px;
    height: 28px;
    color: #4f46e5;
    flex-shrink: 0;
    opacity: 0.7;
}

.pr-privacy-item div {
    display: flex;
    flex-direction: column;
}

.pr-privacy-item strong {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.pr-privacy-item span {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.45);
    margin-top: 1px;
}

/* ========================================================================
   效果展示 Demo — 全屏遮罩 + 动画步骤
   ======================================================================== */
.pr-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pr-panel-header .pr-panel-title {
    margin: 0;
}

.pr-demo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.04);
    color: #4f46e5;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pr-demo-toggle:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.35);
}

.pr-demo-toggle svg {
    width: 14px;
    height: 14px;
}

/* 全屏遮罩 */
.pr-demo-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
}

.pr-demo-overlay.open {
    opacity: 1;
    visibility: visible;
}

.pr-demo-modal {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    width: 94vw;
    max-width: 960px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pr-demo-overlay.open .pr-demo-modal {
    transform: translateY(0) scale(1);
}

.pr-demo-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.15s;
    z-index: 2;
}

.pr-demo-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #111;
}

.pr-demo-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #111;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.pr-demo-modal-subtitle {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.45);
    margin: 0 0 24px;
}

/* 三步流程行 */
.pr-demo-steps {
    display: flex;
    align-items: stretch;
    gap: 0;
}

/* 每一步 */
.pr-demo-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.pr-demo-step.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.pr-demo-step-badge {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pr-demo-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pr-demo-step-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

/* 图片容器 */
.pr-demo-img-wrap {
    width: 100%;
    max-width: 260px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.pr-demo-img {
    width: 100%;
    height: auto;
    display: block;
}

.pr-demo-img-wrap--result {
    box-shadow: 0 6px 24px rgba(79, 70, 229, 0.18);
    border-color: rgba(79, 70, 229, 0.25);
}

.pr-demo-engine-tag {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    white-space: nowrap;
}

/* 箭头 */
.pr-demo-arrow-flow {
    flex-shrink: 0;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(79, 70, 229, 0.3);
    margin-top: 28px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pr-demo-arrow-flow.animate-in {
    opacity: 1;
}

.pr-demo-arrow-flow svg {
    width: 48px;
    height: 24px;
}

/* 提示词卡片（Step 2） */
.pr-demo-step-prompt {
    flex: 1.4;
    min-width: 220px;
}

.pr-demo-prompt-card {
    width: 100%;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
}

.pr-demo-prompt-header {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.pr-demo-prompt-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.pr-demo-prompt-badge--mode {
    background: #dcfce7;
    color: #16a34a;
}

.pr-demo-prompt-text {
    font-size: 13px;
    line-height: 1.75;
    color: #333;
    max-height: 220px;
    overflow: hidden;
    position: relative;
}

.pr-demo-prompt-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(transparent, #f8f9fa);
    pointer-events: none;
}

/* 打字机光标 */
.pr-demo-prompt-text.typing::after {
    content: '|';
    animation: pr-blink 0.6s step-end infinite;
    color: #4f46e5;
    font-weight: 300;
}

@keyframes pr-blink {
    50% { opacity: 0; }
}

/* 流程三步 */
.pr-demo-flow {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 24px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    overflow-x: auto;
}

.pr-demo-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
    flex: 1;
}

.pr-demo-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pr-demo-step-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.pr-demo-img-wrap {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 3/4;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.pr-demo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pr-demo-img-wrap--result {
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.2);
}

.pr-demo-engine-tag {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* 箭头 */
.pr-demo-arrow-flow {
    flex-shrink: 0;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(79, 70, 229, 0.4);
    margin: 30px 4px 0;
}

.pr-demo-arrow-flow svg {
    width: 48px;
    height: 24px;
}

/* 提示词卡片 */
.pr-demo-step-prompt {
    flex: 1.5;
    min-width: 240px;
}

.pr-demo-prompt-card {
    width: 100%;
    padding: 14px;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.pr-demo-prompt-header {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.pr-demo-prompt-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.pr-demo-prompt-badge--mode {
    background: #dcfce7;
    color: #16a34a;
}

.pr-demo-prompt-text {
    font-size: 12px;
    line-height: 1.7;
    color: #444;
    max-height: 180px;
    overflow: hidden;
    position: relative;
}

.pr-demo-prompt-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #fafafa);
    pointer-events: none;
}

/* --- 胶囊切换器 --- */
.pr-capsule-switch {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 2px;
}

.pr-capsule-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

.pr-capsule-btn.active {
    background: #fff;
    color: #111;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}

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

.pr-capsule-btn .capsule-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
    line-height: 1.4;
}

.pr-capsule-btn .capsule-badge.badge-soon {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.4);
}

/* --- 页面标题 --- */
.pr-header {
    margin-bottom: 28px;
}

.pr-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: #111;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.pr-header p {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
    margin: 0;
}

/* --- 主布局 --- */
.pr-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.pr-panel {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 24px;
}

.pr-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px;
}

/* --- 上传区域 --- */
.pr-upload-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.pr-upload-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pr-upload-tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

.pr-upload-tab svg {
    width: 16px;
    height: 16px;
}

.pr-upload-zone {
    border: 2px dashed rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
    position: relative;
}

.pr-upload-zone:hover,
.pr-upload-zone.dragover {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.03);
}

.pr-upload-zone.has-image {
    padding: 12px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.08);
    background: #fff;
}

.pr-upload-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    color: rgba(0, 0, 0, 0.3);
}

.pr-upload-text {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
}

.pr-upload-preview {
    max-width: 100%;
    max-height: 260px;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.pr-upload-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.pr-upload-zone.has-image:hover .pr-upload-clear {
    opacity: 1;
}

/* 图片链接输入 */
.pr-url-input-wrap {
    display: none;
}

.pr-url-input-wrap.active {
    display: block;
}

.pr-url-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.pr-url-input:focus {
    border-color: #4f46e5;
}

.pr-url-load-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.pr-url-load-btn:hover {
    background: #4338ca;
}

/* --- AI 模型选择 --- */
.pr-section-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.6);
    margin: 20px 0 10px;
}

.pr-section-label:first-of-type {
    margin-top: 20px;
}

.pr-model-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pr-model-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.pr-model-card:hover {
    border-color: rgba(79, 70, 229, 0.3);
}

.pr-model-card.active {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.03);
}

.pr-model-card .model-info {
    flex: 1;
}

.pr-model-card .model-name {
    font-size: 14px;
    font-weight: 700;
    color: #111;
}

.pr-model-card .model-desc {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
    margin-top: 2px;
}

.pr-model-card .model-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.pr-model-card.active .model-check {
    border-color: #4f46e5;
    background: #4f46e5;
}

.pr-model-card.active .model-check::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

.pr-model-card .model-badge {
    position: absolute;
    top: -1px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 0 0 6px 6px;
    line-height: 1.4;
}

.model-badge.badge-descriptor {
    background: #4f46e5;
    color: #fff;
}

/* --- 速度模式 --- */
.pr-speed-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pr-speed-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.pr-speed-btn:hover {
    border-color: rgba(79, 70, 229, 0.3);
}

.pr-speed-btn.active {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.03);
}

.pr-speed-btn .speed-name {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pr-speed-btn .speed-desc {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
    margin-top: 2px;
}

.pr-speed-btn .speed-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4f46e5;
    display: none;
    align-items: center;
    justify-content: center;
}

.pr-speed-btn.active .speed-check {
    display: flex;
}

.pr-speed-btn .speed-check svg {
    width: 10px;
    height: 10px;
    stroke: #fff;
    stroke-width: 3;
    fill: none;
}

.speed-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
    line-height: 1.4;
}

.speed-badge.badge-free {
    background: #dcfce7;
    color: #16a34a;
}

.speed-badge.badge-credit {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.pr-quota-info {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.4);
    margin-top: 4px;
    text-align: center;
}

/* --- 语言选择 --- */
.pr-language-wrap {
    margin-top: 16px;
}

.pr-language-note {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 8px;
    float: right;
    margin-top: -28px;
}

.pr-language-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* --- 生成按钮 --- */
.pr-submit-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px 24px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pr-submit-btn:hover:not(:disabled) {
    background: #4338ca;
    transform: translateY(-1px);
}

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

.pr-submit-btn svg {
    width: 18px;
    height: 18px;
}

/* --- 右侧：结果区域 --- */
.pr-output-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: rgba(0, 0, 0, 0.3);
    font-size: 14px;
}

.pr-result-area {
    display: none;
}

.pr-result-area.visible {
    display: block;
}

.pr-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pr-result-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.pr-result-text {
    width: 100%;
    min-height: 280px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.7;
    color: #1a1a1a;
    background: #fafafa;
    resize: vertical;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

.pr-result-text:focus {
    border-color: #4f46e5;
    background: #fff;
}

.pr-result-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.pr-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: #333;
}

.pr-action-btn:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

.pr-action-btn.primary {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.pr-action-btn.primary:hover {
    background: #4338ca;
}

.pr-action-btn svg {
    width: 14px;
    height: 14px;
}

.pr-action-btn.copied {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

/* --- 发送到生图下拉 --- */
.pr-send-dropdown {
    position: relative;
    display: inline-block;
}

.pr-send-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 100;
    padding: 6px;
}

.pr-send-menu.show {
    display: block;
}

.pr-send-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.pr-send-menu-item:hover {
    background: rgba(79, 70, 229, 0.06);
    color: #4f46e5;
}

.pr-send-menu-item .menu-engine-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- 历史记录 --- */
.pr-history-section {
    margin-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 16px;
}

.pr-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pr-history-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pr-history-clear {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.pr-history-clear:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #ef4444;
}

.pr-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}

.pr-history-card {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.pr-history-card:hover {
    border-color: rgba(79, 70, 229, 0.2);
    background: rgba(79, 70, 229, 0.02);
}

.pr-history-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
}

.pr-history-info {
    flex: 1;
    min-width: 0;
}

.pr-history-prompt {
    font-size: 12px;
    color: #333;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
}

.pr-history-meta {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.35);
}

.pr-history-meta .h-badge {
    padding: 0 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.04);
}

.pr-history-empty {
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.3);
}

/* --- Loading overlay --- */
.pr-loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    z-index: 10;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}

.pr-loading.visible {
    display: flex;
}

.pr-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(79, 70, 229, 0.15);
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: pr-spin 0.8s linear infinite;
}

@keyframes pr-spin {
    to { transform: rotate(360deg); }
}

.pr-loading-text {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

/* --- 面板相对定位（popover / loading 用） --- */
.pr-left-panel {
    position: relative;
}

.pr-right-panel {
    position: relative;
}

/* --- Free Gemini AI link --- */
.pr-footer-link {
    text-align: center;
    margin-top: 24px;
}

.pr-footer-link a {
    color: #4f46e5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.pr-footer-link a:hover {
    text-decoration: underline;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .pr-layout {
        grid-template-columns: 1fr;
    }

    .pr-container {
        padding: 16px 12px 40px;
    }

    .pr-privacy-items {
        flex-direction: column;
        gap: 12px;
    }

    .pr-demo-modal {
        padding: 20px;
        max-height: 92vh;
    }

    .pr-demo-steps {
        flex-direction: column;
        gap: 8px;
    }

    .pr-demo-arrow-flow {
        transform: rotate(90deg);
        margin: 4px 0;
        width: 36px;
    }

    .pr-demo-img-wrap {
        max-width: 200px;
    }

    .pr-demo-step-prompt {
        min-width: 0;
        width: 100%;
    }
}

/* --- 暗色主题兼容 --- */
.theme-night .pr-panel {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-night .pr-header h1,
.theme-night .pr-model-card .model-name,
.theme-night .pr-speed-btn .speed-name {
    color: #eee;
}

.theme-night .pr-upload-zone {
    background: #111;
    border-color: rgba(255, 255, 255, 0.12);
}

.theme-night .pr-model-card,
.theme-night .pr-speed-btn,
.theme-night .pr-history-card {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-night .pr-result-text {
    background: #111;
    color: #ddd;
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-night .pr-capsule-switch {
    background: #222;
}

.theme-night .pr-capsule-btn.active {
    background: #333;
    color: #eee;
}

.theme-night .pr-url-input,
.theme-night .pr-language-select {
    background: #111;
    color: #ddd;
    border-color: rgba(255, 255, 255, 0.12);
}

.theme-night .pr-action-btn {
    background: #222;
    color: #ccc;
    border-color: rgba(255, 255, 255, 0.12);
}

.theme-night .pr-loading {
    background: rgba(26, 26, 26, 0.85);
}

.theme-night .pr-privacy-banner {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.06) 0%, rgba(16, 185, 129, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-night .pr-privacy-item strong {
    color: #ddd;
}

.theme-night .pr-privacy-item span {
    color: rgba(255, 255, 255, 0.4);
}

.theme-night .pr-demo-modal {
    background: #1e1e1e;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.theme-night .pr-demo-modal-close {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
}

.theme-night .pr-demo-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
}

.theme-night .pr-demo-modal-title {
    color: #eee;
}

.theme-night .pr-demo-step-label {
    color: #ccc;
}

.theme-night .pr-demo-prompt-card {
    background: #111;
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-night .pr-demo-prompt-text {
    color: #aaa;
}

.theme-night .pr-demo-prompt-fade {
    background: linear-gradient(transparent, #111);
}
