/* ================= 🌟 基础与排版 ================= */
.pct-wrapper { padding: 32px 0; }
.pct-header { text-align: center; margin-bottom: 32px; }
.pct-title { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; }
.pct-subtitle { color: var(--text-muted); max-width: 800px; margin: 0 auto; line-height: 1.6; }

/* ================= 🌟 网格布局 ================= */
.pct-workspace { display: grid; grid-template-columns: 460px 1fr; gap: 24px; align-items: stretch; }
.pct-col-left { display: flex; flex-direction: column; gap: 20px; }
.pct-col-right { display: flex; flex-direction: column; gap: 20px; height: 100%; min-height: 0; min-width: 0; }
@media(max-width: 900px) { .pct-workspace { grid-template-columns: 1fr; } }

/* ================= 🌟 卡片风格 ================= */
.pct-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 20px; padding: 24px; box-shadow: 0 4px 16px rgba(0,0,0,0.03); display: flex; flex-direction: column; box-sizing: border-box; transition: 0.3s; }
/* 当焦点在某个面板时，给予微弱的高亮 */
.pct-card:focus-within { border-color: rgba(var(--primary-rgb), 0.5); box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.08); }

.pct-panel-title { font-weight: 700; color: var(--text-main); font-size: 1.1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 14px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }

/* ================= 🌟 句子填空式排版 ================= */
.pct-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 600; color: var(--text-muted); }
.pct-input { 
    width: 100px; flex-grow: 1; min-width: 80px; box-sizing: border-box; padding: 10px 14px; 
    border: 2px solid var(--border-color); border-radius: 10px; background: var(--bg-body); 
    color: var(--text-main); font-size: 1.15rem; font-weight: 700; font-family: monospace; 
    transition: 0.2s; outline: none; text-align: center;
}
.pct-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }
.pct-input::-webkit-outer-spin-button, .pct-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.pct-link-btn { font-size: 0.85rem; color: var(--primary-color); cursor: pointer; font-weight: 600; transition: 0.2s; }
.pct-link-btn:hover { opacity: 0.7; }

/* ================= 🌟 生成结果区 ================= */
.pct-result-box { 
    background: rgba(var(--primary-rgb), 0.05); border: 2px dashed rgba(var(--primary-rgb), 0.3); 
    border-radius: 16px; padding: 24px; text-align: center; margin-bottom: 8px; 
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%; box-sizing: border-box; overflow: hidden; flex: 1;
}
.pct-result-label { font-size: 0.9rem; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }

.pct-result-textarea { 
    width: 100%; max-width: 100%; box-sizing: border-box;
    height: auto; min-height: 60px; padding: 10px; 
    background: transparent; border: none; resize: none; 
    font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--primary-color); 
    font-family: monospace; text-align: center; 
    outline: none; line-height: 1.2; margin-bottom: 20px; transition: 0.3s;
    white-space: pre-wrap; word-break: break-all; overflow: hidden; 
}

.pct-btn-copy { padding: 10px 24px; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 20px; font-weight: 600; color: var(--text-main); cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.pct-btn-copy:hover { border-color: var(--primary-color); color: var(--primary-color); box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.15); }

/* ================= 🌟 历史列表 ================= */
.history-card { display: flex; flex-direction: column; min-height: 250px; }
.pct-history-list { 
    list-style: none; padding: 0; margin: 0; max-height: 240px; 
    overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 8px; padding-right: 6px; 
}
.pct-history-list::-webkit-scrollbar { width: 6px; }
.pct-history-list::-webkit-scrollbar-track { background: var(--bg-body); border-radius: 4px; }
.pct-history-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.pct-history-list::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

.hist-item { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 12px 16px; background: var(--bg-body); border-radius: 10px; 
    border: 1px solid var(--border-color); transition: 0.2s; 
    width: 100%; box-sizing: border-box; min-width: 0;
}
.hist-item:hover { border-color: var(--primary-color); box-shadow: inset 3px 0 0 var(--primary-color); }

.hist-formula { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); margin-right: 8px; flex: 1 1 0%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-num { 
    font-family: monospace; font-size: 1.1rem; font-weight: 800; color: var(--text-main); margin-right: 16px; white-space: nowrap; 
}
.hist-copy { background: transparent; border: none; color: var(--text-muted); cursor: pointer; transition: 0.2s; font-size: 1.1rem; flex-shrink: 0; }
.hist-copy:hover { color: var(--primary-color); transform: scale(1.1); }

/* ================= 🌟 SEO 文章 ================= */
.pct-seo-box { margin-top: 32px; background: var(--bg-surface); padding: 32px; border-radius: 20px; border: 1px solid var(--border-color); box-sizing: border-box; width: 100%; }
.pct-seo-box h2 { font-size: 1.25rem; margin-bottom: 16px; color: var(--text-main); margin-top: 24px; }
.pct-seo-box h2:first-child { margin-top: 0; }
.pct-seo-box p, .pct-seo-box li { color: var(--text-muted); line-height: 1.8; margin-bottom: 12px; }
.pct-seo-box ul { padding-left: 20px; }