/* 模块一：开源版体验模块样式 */
.open-source-experience-module {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 模块标题区 */
.module-title-section {
    text-align: center;
    margin-bottom: 30px;
}

.module-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.module-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.module-tag {
    font-size: 14px;
    color: #64748b;
    background: #f1f5f9;
    padding: 5px 16px;
    border-radius: 20px;
}

/* 体验卡片 */
.experience-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 参数网格布局 */
.parameters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* 全宽参数 */
.full-width {
    grid-column: 1 / -1;
}

/* 表单组 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 表单标签 */
.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* 表单输入框 */
.form-input,
.form-textarea,
.form-select {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input:read-only,
.form-textarea:read-only {
    background-color: #f8fafc;
    color: #64748b;
    cursor: default;
    border-color: #e2e8f0;
}

.form-input:read-only:focus,
.form-textarea:read-only:focus {
    box-shadow: none;
    border-color: #e2e8f0;
}

/* 多行文本框 */
.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* 提示词内容区域 */
.prompt-content-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
}

.prompt-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    min-height: 160px;
}

.prompt-content-inner {
    color: #334155;
    font-size: 15px;
    line-height: 1.6;
    transition: all 0.3s ease;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) transparent;
}

/* 提示词内容右上角操作按钮 */
.prompt-content-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.prompt-content.unlocked:hover .prompt-content-actions {
    opacity: 1;
    pointer-events: auto;
}

.prompt-action-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #64748b;
    border: 1px solid #e2e8f0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.prompt-action-btn:hover {
    background: #fff;
    color: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* 提示词内容滚动条样式 */
.prompt-content-inner::-webkit-scrollbar {
    width: 6px;
}

.prompt-content-inner::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.prompt-content-inner::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
}

.prompt-content-inner::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

.blurred {
    filter: blur(4px);
    user-select: none;
}

.content-mask-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.3s ease;
}

.content-mask-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.view-prompt-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.view-prompt-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

/* 操作区域 */
.action-section {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.generate-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.generate-btn.open-source-btn.primary {
    background: #3b82f6;
    color: white;
}

.generate-btn.open-source-btn.primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 试用结果对比模块 */
.trial-comparison-module {
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
    padding-top: 40px;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.comparison-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.fullscreen-compare-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.fullscreen-compare-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.comparison-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.result-column {
    flex: 1;
    min-width: 300px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 24px;
    position: relative;
    transition: all 0.3s ease;
}

.result-column:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.result-column.open-source {
    border-top: 4px solid #3b82f6;
    background: #f1f5f9;
}

.result-column.commercial {
    border-top: 4px solid #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
}

.result-header {
    margin-bottom: 16px;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
}

.info-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid transparent;
}

.model-tag {
    background: #dbeafe;
    color: #2563eb;
    border-color: #bfdbfe;
}

.time-tag {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #e5e7eb;
}

.token-tag {
    background: #fff7ed;
    color: #ea580c;
    border-color: #ffedd5;
}

.result-display {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    height: 500px;
    /* font-family: monospace; 移除等宽字体，使用富文本样式 */
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.result-content {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

/* 结果内容滚动条样式 */
.result-content::-webkit-scrollbar {
    width: 6px;
}

.result-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.result-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.result-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.result-display .prompt-content-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.result-display:hover .prompt-content-actions {
    opacity: 1;
    pointer-events: auto;
}

.commercial-display {
    border-color: #bbf7d0;
    background: rgba(255, 255, 255, 0.8);
}

.commercial-guide {
    margin-top: 20px;
    text-align: center;
}

.guide-text {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
}

.upgrade-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.upgrade-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 全屏查看弹窗样式 */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fullscreen-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fullscreen-modal-content {
    background: white;
    border-radius: 16px;
    width: 95%;
    max-width: 1400px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

/* 全屏对比时更宽的弹窗 */
.fullscreen-modal.comparison-mode .fullscreen-modal-content {
    max-width: 95vw;
    width: 95vw;
    height: 90vh;
}

/* 对比模式下禁止body滚动，确保内部列滚动 */
.fullscreen-modal.comparison-mode .fullscreen-modal-body {
    overflow: hidden;
}

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

.fullscreen-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 16px 16px 0 0;
}

.fullscreen-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.fullscreen-modal-actions {
    display: flex;
    gap: 12px;
}

.fullscreen-modal-btn {
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.fullscreen-modal-btn.copy-btn {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #dbeafe;
}

.fullscreen-modal-btn.copy-btn:hover {
    background: #dbeafe;
    color: #2563eb;
    border-color: #bfdbfe;
}

.fullscreen-modal-btn.close-btn {
    background: transparent;
    color: #64748b;
    border-color: #e2e8f0;
}

.fullscreen-modal-btn.close-btn:hover {
    background: #f8fafc;
    color: #ef4444;
    border-color: #cbd5e1;
}

.fullscreen-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    background: #ffffff;
    border-radius: 0 0 16px 16px;
}

#fullscreenModalContent {
    line-height: 1.7;
    color: #334155;
    font-size: 15px;
}

#fullscreenModalContent p {
    margin-bottom: 16px;
}

#fullscreenModalContent ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

#fullscreenModalContent li {
    margin-bottom: 8px;
}

/* 全屏对比样式 */
.comparison-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    height: 100%;
}

.comparison-modal-column {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%; /* 确保列高度占满 grid 单元格 */
    overflow: hidden; /* 防止列本身溢出 */
}

.comparison-modal-column.open-source {
    border-top: 3px solid #3b82f6;
}

.comparison-modal-column.commercial {
    border-top: 3px solid #10b981;
}

.comparison-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-modal-content {
    flex: 1;
    overflow-y: auto;
    /* white-space: pre-wrap; 移除预格式化换行，避免影响富文本展示 */
    /* font-family: monospace; 移除等宽字体 */
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    /* 增加最小高度确保有内容时可以滚动 */
    min-height: 0; 
}

/* 响应式适配 */
@media (max-width: 768px) {
    .parameters-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-container {
        flex-direction: column;
    }
    
    .open-source-experience-module {
        padding: 24px 16px;
    }
    
    .comparison-modal-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: #334155;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.toast-notification i {
    color: #4ade80;
}
