/* =============================================
   拍照小技巧 - photo_tips.css
   主题色：天空蓝 #0369a1 / #0ea5e9 + 黄金时刻 #f59e0b
   三栏布局：历史 | 表单 | 结果
   ============================================= */

/* ========== 主容器 ========== */
.pt-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f0f9ff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(3, 105, 161, 0.12);
    transition: all 0.3s ease;
}

.pt-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;
}

/* ========== 顶部工具栏 ========== */
.pt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 12px;
    min-height: 40px;
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(3, 105, 161, 0.4);
    flex-shrink: 0;
}

.pt-toolbar .toolbar-group {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.pt-toolbar .toolbar-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.8px;
    margin-right: 4px;
}

.pt-toolbar .toolbar-btn {
    padding: 4px 11px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #0369a1;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.5;
}

.pt-toolbar .toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.pt-toolbar .toolbar-btn:active:not(:disabled) { transform: translateY(0); }

.pt-toolbar .toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pt-toolbar .toolbar-btn-primary {
    background: linear-gradient(135deg, #fff9ec 0%, #fef3c7 100%);
    color: #b45309;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.4);
}

.pt-toolbar .toolbar-btn-primary:hover:not(:disabled) {
    background: #fffbeb;
    color: #92400e;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.6);
}

/* 生成中 shimmer 动画 */
.pt-toolbar .toolbar-btn-primary.pt-btn-loading {
    background: linear-gradient(90deg, #fef3c7 0%, #fffbeb 35%, #fef3c7 65%, #fde68a 100%);
    background-size: 200% 100%;
    animation: ptBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
}

body.dark .pt-toolbar .toolbar-btn-primary.pt-btn-loading {
    background: linear-gradient(90deg, #78350f 0%, #b45309 35%, #78350f 65%, #92400e 100%);
    background-size: 200% 100%;
    animation: ptBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
}

@keyframes ptBtnShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== 三栏主内容 ========== */
.pt-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f0f9ff;
}

/* ========== 左栏：历史记录 ========== */
.pt-history-panel {
    width: 185px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #bae6fd;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pt-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(to bottom, #e0f2fe 0%, #f0f9ff 100%);
    border-bottom: 1px solid #bae6fd;
    flex-shrink: 0;
}

.pt-history-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
}

.pt-history-count {
    font-size: 11px;
    color: #0284c7;
    font-weight: 400;
}

.pt-history-clear-btn {
    background: #eff6ff;
    border: none;
    color: #0369a1;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}
.pt-history-clear-btn:hover { background: #bae6fd; }

.pt-history-search {
    padding: 7px;
    border-bottom: 1px solid #bae6fd;
    flex-shrink: 0;
}

.pt-history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #7dd3fc;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #0369a1;
    background: #f0f9ff;
}

.pt-history-search input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.18);
}

.pt-history-search input::placeholder { color: #7dd3fc; }

.pt-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.pt-history-list::-webkit-scrollbar { width: 4px; }
.pt-history-list::-webkit-scrollbar-track { background: transparent; }
.pt-history-list::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 2px; }
.pt-history-list::-webkit-scrollbar-thumb:hover { background: #7dd3fc; }

.pt-history-empty {
    color: #7dd3fc;
    font-size: 12px;
    text-align: center;
    padding: 24px 8px;
    line-height: 1.8;
}

.pt-history-item {
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 4px;
    background: #fff;
    border: 1px solid #e0f2fe;
    transition: all 0.18s;
    position: relative;
}

.pt-history-item:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.pt-history-item.active {
    background: #dbeafe;
    border-color: #0ea5e9;
    box-shadow: inset 3px 0 0 #3b82f6;
}

.pt-history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.pt-history-item-meta {
    font-size: 11px;
    color: #38bdf8;
}

.pt-history-item-del {
    position: absolute;
    top: 4px;
    right: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #7dd3fc;
    font-size: 10px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: all 0.15s;
}

.pt-history-item:hover .pt-history-item-del { display: flex; }
.pt-history-item-del:hover { background: #fee2e2; color: #ef4444; }

/* ========== 中栏：表单区域 ========== */
.pt-form-panel {
    width: 320px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #bae6fd;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pt-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(to bottom, #e0f2fe 0%, #f0f9ff 100%);
    border-bottom: 1px solid #bae6fd;
    flex-shrink: 0;
}

.pt-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
}

.pt-panel-tip {
    font-size: 11px;
    color: #38bdf8;
}

.pt-form-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
}

.pt-form-body::-webkit-scrollbar { width: 4px; }
.pt-form-body::-webkit-scrollbar-track { background: transparent; }
.pt-form-body::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 2px; }
.pt-form-body::-webkit-scrollbar-thumb:hover { background: #7dd3fc; }

.pt-form-group {
    margin-bottom: 14px;
}

.pt-form-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 7px;
    flex-wrap: wrap;
}

.pt-required {
    color: #ef4444;
    font-size: 13px;
    font-weight: 700;
}

.pt-optional-tag {
    background: #e0f2fe;
    color: #0284c7;
    font-size: 10px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 3px;
    font-style: normal;
}

.pt-shortcut-hint {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: auto;
}

/* 场景选择网格 */
.pt-scene-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.pt-scene-btn {
    padding: 6px 2px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: #0369a1;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.18s;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-scene-btn:hover {
    background: #e0f2fe;
    border-color: #38bdf8;
}

.pt-scene-btn.selected {
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
    color: #fff;
    border-color: #0369a1;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(3, 105, 161, 0.3);
}

/* 抖动动画 */
.pt-scene-grid.pt-shake {
    animation: ptShake 0.4s ease;
    border: 1.5px solid #ef4444;
    border-radius: 6px;
}

@keyframes ptShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

/* 设备选择 */
.pt-device-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pt-device-btn {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #0369a1;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    user-select: none;
}

.pt-device-btn:hover { background: #e0f2fe; border-color: #38bdf8; }

.pt-device-btn.selected {
    background: #0369a1;
    color: #fff;
    border-color: #0369a1;
    box-shadow: 0 2px 6px rgba(3, 105, 161, 0.25);
}

/* 经验水平 Tabs */
.pt-level-tabs {
    display: flex;
    gap: 4px;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 7px;
    padding: 3px;
}

.pt-level-tab {
    flex: 1;
    text-align: center;
    padding: 5px 4px;
    font-size: 11px;
    font-weight: 500;
    color: #0369a1;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    user-select: none;
}

.pt-level-tab:hover { background: #e0f2fe; }

.pt-level-tab.selected {
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(3, 105, 161, 0.25);
}

/* 重点关注 Chips */
.pt-focus-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pt-focus-chip {
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 500;
    color: #0369a1;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.18s;
    user-select: none;
}

.pt-focus-chip:hover { background: #e0f2fe; border-color: #38bdf8; }

.pt-focus-chip.selected {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #fff;
    border-color: #f59e0b;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* 特殊需求文本域 */
.pt-form-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #bae6fd;
    border-radius: 5px;
    font-size: 12px;
    outline: none;
    resize: vertical;
    min-height: 70px;
    color: #0369a1;
    background: #f8fcff;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
    line-height: 1.5;
}

.pt-form-textarea:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

.pt-form-textarea::placeholder { color: #bae6fd; }

.pt-char-counter {
    text-align: right;
    font-size: 11px;
    color: #7dd3fc;
    margin-top: 3px;
}

/* 中栏提交按钮 */
.pt-form-submit-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(3, 105, 161, 0.3);
}

.pt-form-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(3, 105, 161, 0.4);
}

.pt-form-submit-btn:active:not(:disabled) { transform: translateY(0); }

.pt-form-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 中栏提交按钮加载 shimmer */
.pt-form-submit-btn.pt-btn-loading {
    background: linear-gradient(90deg, #0369a1 0%, #0ea5e9 35%, #0369a1 65%, #0284c7 100%);
    background-size: 200% 100%;
    animation: ptBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
}

body.dark .pt-form-submit-btn.pt-btn-loading {
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 35%, #0284c7 65%, #0369a1 100%);
    background-size: 200% 100%;
    animation: ptBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
}

/* ========== 右栏：技巧结果 ========== */
.pt-result-panel {
    flex: 1;
    background: #f8fafb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.pt-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(to bottom, #e0f2fe 0%, #f0f9ff 100%);
    border-bottom: 1px solid #bae6fd;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 6px;
}

.pt-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
}

.pt-result-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pt-meta-badge {
    font-size: 11px;
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.pt-device-badge {
    background: #fef3c7;
    color: #b45309;
}

.pt-refresh-btn {
    font-size: 11px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s;
}

.pt-refresh-btn:hover { background: #e0f2fe; border-color: #38bdf8; }

.pt-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.pt-result-body::-webkit-scrollbar { width: 6px; }
.pt-result-body::-webkit-scrollbar-track { background: transparent; }
.pt-result-body::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 3px; }
.pt-result-body::-webkit-scrollbar-thumb:hover { background: #7dd3fc; }

/* 占位提示 */
.pt-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    text-align: center;
    color: #94a3b8;
    padding: 40px 20px;
}

.pt-placeholder-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.7;
    animation: ptCameraFloat 3s ease-in-out infinite;
}

@keyframes ptCameraFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%       { transform: translateY(-8px) rotate(3deg); }
}

.pt-placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 8px;
}

.pt-placeholder-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 4px;
}

.pt-placeholder-sub {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 10px;
}

/* 加载状态 */
.pt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    padding: 40px;
}

.pt-loading-cameras {
    display: flex;
    gap: 12px;
    font-size: 28px;
    margin-bottom: 16px;
}

.pt-loading-cameras span {
    animation: ptCameraBouce 1.2s ease-in-out infinite;
    display: inline-block;
}

.pt-loading-cameras span:nth-child(1) { animation-delay: 0s; }
.pt-loading-cameras span:nth-child(2) { animation-delay: 0.2s; }
.pt-loading-cameras span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ptCameraBouce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.6; }
    40%            { transform: translateY(-12px); opacity: 1; }
}

.pt-loading-text {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin: 0;
    animation: ptTextPulse 1.8s ease-in-out infinite;
}

@keyframes ptTextPulse {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

/* ========== 结果内容 - AI 生成的 HTML ========== */
.pt-result-content {
    animation: none;
}

.pt-result-content.pt-animate-in {
    animation: ptResultFadeIn 0.35s ease-out forwards;
}

@keyframes ptResultFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* pt-result-wrap 容器 */
.pt-result-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 每个章节 */
.pt-result-section {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0f2fe;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(3, 105, 161, 0.06);
    transition: box-shadow 0.2s, background 0.2s;
}

.pt-result-section:hover {
    background: #f9fafb;
    box-shadow: 0 6px 18px rgba(3, 105, 161, 0.12);
}

.pt-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    font-size: 13px;
    font-weight: 700;
    color: #0369a1;
    border-bottom: 1px solid #bae6fd;
    letter-spacing: 0.3px;
}

.pt-section-icon {
    font-size: 15px;
}

/* 每条技巧卡片 */
.pt-tip-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid #f0f9ff;
    transition: background 0.15s;
}

.pt-tip-card:last-child { border-bottom: none; }

.pt-tip-card:hover { background: #f8fffe; }

.pt-tip-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    box-shadow: 0 2px 4px rgba(3, 105, 161, 0.25);
}

.pt-tip-text {
    font-size: 13px;
    color: #334155;
    line-height: 1.6;
}

/* 黄金法则 */
.pt-golden-tip {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    line-height: 1.6;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

/* strong/em 等 Markdown 元素 */
.pt-result-content strong { font-weight: 700; color: #0369a1; }
.pt-result-content em { font-style: italic; color: #0284c7; }
.pt-result-content h3 { font-size: 14px; font-weight: 700; color: #0369a1; margin: 10px 0 6px; }
.pt-result-content h4 { font-size: 13px; font-weight: 600; color: #0284c7; margin: 8px 0 4px; }
.pt-result-content p { font-size: 13px; color: #334155; line-height: 1.6; margin: 6px 0; }
.pt-result-content ul, .pt-result-content ol { padding-left: 18px; margin: 6px 0; }
.pt-result-content li { font-size: 13px; color: #334155; line-height: 1.6; margin: 3px 0; }
.pt-result-content li::marker { color: var(--caq-primary, #0369a1); }
.pt-result-content code { background: #e0f2fe; color: #0369a1; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.pt-result-content pre { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 5px; padding: 10px; overflow-x: auto; }
.pt-result-content blockquote { border-left: 3px solid #0ea5e9; padding: 6px 12px; margin: 8px 0; background: #f0f9ff; color: #475569; border-radius: 0 4px 4px 0; }

/* 错误状态 */
.pt-result-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 4px 0;
}

.pt-error-icon { font-size: 22px; flex-shrink: 0; }

.pt-error-msg {
    font-size: 13px;
    font-weight: 600;
    color: #e53e3e;
    margin: 0 0 4px;
}

.pt-error-tip {
    font-size: 12px;
    color: #718096;
    margin: 0 0 10px;
}

.pt-retry-btn {
    padding: 5px 14px;
    background: #e53e3e;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.18s;
}
.pt-retry-btn:hover { background: #c53030; }

/* 错误状态包裹容器：与加载/占位高度一致，垂直居中 */
#ptResultError {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 300px;
    padding: 20px;
}

/* Tip Toast */
.pt-tip-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(3, 105, 161, 0.92);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 99999;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(3, 105, 161, 0.3);
}

.pt-tip-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 示例模态框 ========== */
.pt-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
}

.pt-modal-overlay.show { display: block; }

.pt-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(600px, 94vw);
    max-height: 80vh;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
    z-index: 10001;
    flex-direction: column;
}

.pt-modal.show { display: flex; }

.pt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
    color: #fff;
    flex-shrink: 0;
}

.pt-modal-header h3 { margin: 0; font-size: 14px; }

.pt-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 3px;
    transition: background 0.2s;
}
.pt-modal-close:hover { background: rgba(255,255,255,0.35); }

.pt-modal-body {
    overflow-y: auto;
    padding: 14px;
}

.pt-modal-body::-webkit-scrollbar { width: 5px; }
.pt-modal-body::-webkit-scrollbar-track { background: transparent; }
.pt-modal-body::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 3px; }
.pt-modal-body::-webkit-scrollbar-thumb:hover { background: #7dd3fc; }

.pt-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.pt-example-card {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 7px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.pt-example-card:hover {
    background: #e0f2fe;
    border-color: #0ea5e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(3, 105, 161, 0.15);
}

.pt-example-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 4px;
}

.pt-example-card-desc {
    font-size: 11px;
    color: #38bdf8;
    line-height: 1.5;
}

/* 模态框加载 / 错误提示 */
.pt-modal-loading {
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
    padding: 28px 20px;
    letter-spacing: 0.3px;
}

.pt-modal-error-tip {
    color: #ef4444;
    font-size: 13px;
    text-align: center;
    padding: 28px 20px;
}

/* ========== 暗黑模式 ========== */
body.dark .pt-container {
    background: #0c1821;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark .pt-main-content { background: #0c1821; }

body.dark .pt-history-panel {
    background: #0f1e2b;
    border-right-color: #1e3a4f;
}

body.dark .pt-history-header {
    background: linear-gradient(to bottom, #0f2a3f 0%, #0c1821 100%);
    border-bottom-color: #1e3a4f;
}

body.dark .pt-history-header h3 { color: #7dd3fc; }
body.dark .pt-history-count { color: #38bdf8; }

body.dark .pt-history-clear-btn {
    background: #0f2a3f;
    color: #38bdf8;
}
body.dark .pt-history-clear-btn:hover { background: #1e3a4f; }

body.dark .pt-history-search { border-bottom-color: #1e3a4f; }
body.dark .pt-history-search input {
    background: #0f1e2b;
    border-color: #1e3a4f;
    color: #e0e7ff;
}
body.dark .pt-history-search input:focus { border-color: #0ea5e9; }
body.dark .pt-history-search input::placeholder { color: #2e4a63; }

body.dark .pt-history-empty { color: #2e5470; }

body.dark .pt-history-item {
    background: #0f1e2b;
    border-color: #1e3a4f;
}
body.dark .pt-history-item:hover { background: #1e3a4f; border-color: #38bdf8; }
body.dark .pt-history-item.active { background: #0f2a3f; border-color: #0ea5e9; box-shadow: inset 3px 0 0 #3b82f6; }
body.dark .pt-history-item-title { color: #e0e7ff; }
body.dark .pt-history-item-meta { color: #38bdf8; }
body.dark .pt-history-item-del:hover { background: #3a1212; color: #ef4444; }

body.dark .pt-form-panel {
    background: #0f1e2b;
    border-right-color: #1e3a4f;
}

body.dark .pt-panel-header {
    background: linear-gradient(to bottom, #0f2a3f 0%, #0c1821 100%);
    border-bottom-color: #1e3a4f;
}
body.dark .pt-panel-header h3 { color: #7dd3fc; }
body.dark .pt-panel-tip { color: #38bdf8; }

body.dark .pt-form-label { color: #7dd3fc; }
body.dark .pt-optional-tag { background: #0f2a3f; color: #38bdf8; }

body.dark .pt-scene-btn {
    background: #0c1821;
    border-color: #1e3a4f;
    color: #7dd3fc;
}
body.dark .pt-scene-btn:hover { background: #1e3a4f; border-color: #38bdf8; }
body.dark .pt-scene-btn.selected {
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
    color: #fff;
    border-color: #0369a1;
}

body.dark .pt-device-btn {
    background: #0c1821;
    border-color: #1e3a4f;
    color: #7dd3fc;
}
body.dark .pt-device-btn:hover { background: #1e3a4f; }
body.dark .pt-device-btn.selected { background: #0369a1; color: #fff; border-color: #0369a1; }

body.dark .pt-level-tabs { background: #0c1821; border-color: #1e3a4f; }
body.dark .pt-level-tab { color: #7dd3fc; }
body.dark .pt-level-tab:hover { background: #1e3a4f; }
body.dark .pt-level-tab.selected {
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
    color: #fff;
}

body.dark .pt-focus-chip {
    background: #0c1821;
    border-color: #1e3a4f;
    color: #7dd3fc;
}
body.dark .pt-focus-chip:hover { background: #1e3a4f; }
body.dark .pt-focus-chip.selected {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: #fff;
    border-color: #d97706;
}

body.dark .pt-form-textarea {
    background: #0c1821;
    border-color: #1e3a4f;
    color: #e0e7ff;
}
body.dark .pt-form-textarea:focus { border-color: #0ea5e9; }
body.dark .pt-form-textarea::placeholder { color: #2e4a63; }

body.dark .pt-char-counter { color: #38bdf8; }

body.dark .pt-result-panel { background: #0c1821; }

body.dark .pt-result-header {
    background: linear-gradient(to bottom, #0f2a3f 0%, #0c1821 100%);
    border-bottom-color: #1e3a4f;
}
body.dark .pt-result-header h3 { color: #7dd3fc; }

body.dark .pt-meta-badge { background: #0f2a3f; color: #7dd3fc; }
body.dark .pt-device-badge { background: #2d1a05; color: #f59e0b; }

body.dark .pt-refresh-btn {
    background: #0f1e2b;
    border-color: #1e3a4f;
    color: #7dd3fc;
}
body.dark .pt-refresh-btn:hover { background: #1e3a4f; }

body.dark .pt-placeholder-title { color: #6e7681; }
body.dark .pt-placeholder-desc { color: #484f58; }
body.dark .pt-placeholder-sub { color: #3d444d; }

body.dark .pt-loading-text { color: #6e7681; }

body.dark .pt-result-section {
    background: #0f1e2b;
    border-color: #1e3a4f;
    box-shadow: none;
}
body.dark .pt-result-section:hover {
    background: #1f2937;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

body.dark .pt-section-title {
    background: linear-gradient(135deg, #0f2a3f 0%, #0c1821 100%);
    color: #7dd3fc;
    border-bottom-color: #1e3a4f;
}

body.dark .pt-tip-card { border-bottom-color: #0c1821; }
body.dark .pt-tip-card:hover { background: #162032; }
body.dark .pt-tip-text { color: #e0e7ff; }

body.dark .pt-golden-tip {
    background: linear-gradient(135deg, #2d1a05 0%, #1a1000 100%);
    border-color: #78350f;
    color: #fbbf24;
}

body.dark .pt-result-content strong { color: #7dd3fc; }
body.dark .pt-result-content em { color: #38bdf8; }
body.dark .pt-result-content h3 { color: #7dd3fc; }
body.dark .pt-result-content h4 { color: #38bdf8; }
body.dark .pt-result-content p { color: #e0e7ff; }
body.dark .pt-result-content li { color: #e0e7ff; }
body.dark .pt-result-content li::marker { color: #38bdf8; }
body.dark .pt-result-content code { background: #0f2a3f; color: #7dd3fc; }
body.dark .pt-result-content pre { background: #0c1821; border-color: #1e3a4f; }
body.dark .pt-result-content blockquote { background: #0c1821; color: #94a3b8; border-left-color: #0ea5e9; }

body.dark .pt-modal { background: #0f1e2b; }
body.dark .pt-modal-body { background: #0f1e2b; }
body.dark .pt-example-card { background: #0c1821; border-color: #1e3a4f; }
body.dark .pt-example-card:hover { background: #1e3a4f; border-color: #0ea5e9; }
body.dark .pt-example-card-name { color: #e0e7ff; }
body.dark .pt-example-card-desc { color: #38bdf8; }

body.dark .pt-tip-toast { background: rgba(14, 165, 233, 0.9); }

/* 暗黑模式错误区域 */
body.dark .pt-result-error {
    background: #1a0e0e;
    border-color: #5c1e1e;
}
body.dark .pt-error-icon { color: #f87171; }
body.dark .pt-error-msg { color: #f87171; }
body.dark .pt-error-tip { color: #6b7280; }
body.dark .pt-retry-btn {
    background: #991b1b;
    color: #fef2f2;
}
body.dark .pt-retry-btn:hover { background: #7f1d1d; }
body.dark .pt-modal-loading { color: #6e7681; }
body.dark .pt-modal-error-tip { color: #f87171; }

body.dark .pt-history-list::-webkit-scrollbar-thumb { background: #1e3a4f; }
body.dark .pt-history-list::-webkit-scrollbar-thumb:hover { background: #2a5070; }
body.dark .pt-form-body::-webkit-scrollbar-thumb { background: #1e3a4f; }
body.dark .pt-form-body::-webkit-scrollbar-thumb:hover { background: #2a5070; }
body.dark .pt-result-body::-webkit-scrollbar-thumb { background: #1e3a4f; }
body.dark .pt-result-body::-webkit-scrollbar-thumb:hover { background: #2a5070; }
body.dark .pt-modal-body::-webkit-scrollbar-thumb { background: #1e3a4f; }
body.dark .pt-modal-body::-webkit-scrollbar-thumb:hover { background: #2a5070; }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .pt-history-panel { display: none; }
    .pt-form-panel { width: 280px; }
}

@media (max-width: 650px) {
    .pt-form-panel { width: 260px; }
    .pt-scene-grid { grid-template-columns: repeat(4, 1fr); }
    .pt-toolbar .toolbar-title { display: none; }
}

@media (max-width: 480px) {
    .pt-main-content { flex-direction: column; }
    .pt-form-panel {
        width: 100%;
        height: 55%;
        border-right: none;
        border-bottom: 1px solid #bae6fd;
    }
    .pt-result-panel { height: 45%; }
    body.dark .pt-form-panel { border-bottom-color: #1e3a4f; }
}
