/* ========== 为你写诗 - 诗意主题样式 ========== */

/* ========== 主容器 ========== */
.pc-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f9f5f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(120, 50, 120, 0.08);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.pc-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.pc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
    flex-shrink: 0;
}

.pc-toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.pc-toolbar-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.95);
}

.pc-toolbar-btn {
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: white;
    transition: all 0.2s;
    white-space: nowrap;
}

.pc-toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.pc-toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pc-btn-primary {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #7c3aed !important;
    border-color: transparent !important;
    font-weight: 600 !important;
}

.pc-btn-primary:hover:not(:disabled) {
    background: #ffffff !important;
    box-shadow: 0 3px 10px rgba(255, 255, 255, 0.4) !important;
}

.pc-btn-cancel {
    background: rgba(239, 68, 68, 0.8) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

.pc-btn-cancel:hover:not(:disabled) {
    background: #ef4444 !important;
}

/* ========== 主内容区 ========== */
.pc-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f9f5f0;
}

/* ========== 左侧历史面板 ========== */
.pc-history-panel {
    width: 200px;
    background: white;
    border-right: 1px solid #e8dff0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.pc-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #fdf6ff 0%, #f7eeff 100%);
    border-bottom: 1px solid #e8dff0;
    flex-shrink: 0;
}

.pc-history-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6d28d9;
}

.pc-history-count {
    font-size: 11px;
    color: #a78bfa;
    margin-left: 4px;
    font-weight: 400;
}

.pc-clear-btn {
    background: #fdf2f8;
    border: none;
    color: #db2777;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 4px;
    transition: all 0.2s;
}

.pc-clear-btn:hover {
    background: #fce7f3;
    color: #be185d;
}

.pc-clear-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pc-history-search {
    padding: 8px;
    border-bottom: 1px solid #e8dff0;
    flex-shrink: 0;
}

.pc-history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #ddd6fe;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fdfbff;
}

.pc-history-search input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.15);
}

.pc-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.pc-history-item {
    padding: 9px 11px;
    margin-bottom: 4px;
    background: #fdfbff;
    border: 1px solid #ede9fe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: pcFadeIn 0.25s ease;
}

.pc-history-item:hover {
    background: #f5f0ff;
    border-color: #c4b5fd;
    transform: translateX(2px);
}

.pc-history-item.active {
    background: #ede9fe;
    border-color: #8b5cf6;
    box-shadow: 0 1px 4px rgba(139, 92, 246, 0.2);
}

.pc-history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #fdf2f8;
    color: #db2777;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.pc-history-item:hover .pc-history-item-delete {
    opacity: 1;
}

.pc-history-item-delete:hover {
    background: #db2777;
    color: white;
}

.pc-history-item-subject {
    font-weight: 600;
    font-size: 12px;
    color: #4c1d95;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
    padding-right: 20px;
}

.pc-history-item-form {
    font-size: 11px;
    color: #7c3aed;
    background: #ede9fe;
    display: inline-block;
    padding: 0 5px;
    border-radius: 3px;
    margin-bottom: 3px;
}

.pc-history-item-time {
    color: #9ca3af;
    font-size: 11px;
}

/* ========== 中栏：输入配置 ========== */
.pc-input-panel {
    width: 320px;
    background: white;
    border-right: 1px solid #e8dff0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.pc-panel-header {
    padding: 14px 18px 10px;
    border-bottom: 1px solid #f3eeff;
    flex-shrink: 0;
}

.pc-panel-header h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #4c1d95;
}

.pc-panel-tip {
    font-size: 12px;
    color: #9ca3af;
}

.pc-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
}

.pc-field-group {
    margin-bottom: 16px;
}

.pc-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 6px;
}

.pc-required {
    color: #db2777;
    margin-left: 2px;
}

.pc-optional {
    color: #9ca3af;
    font-weight: 400;
    font-size: 11px;
}

.pc-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd6fe;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fdfbff;
    color: #374151;
    min-height: 70px;
}

.pc-textarea:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
    background: #ffffff;
}

.pc-textarea::placeholder {
    color: #c4b5fd;
    font-size: 12px;
}

.pc-text-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd6fe;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fdfbff;
    color: #374151;
}

.pc-text-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
    background: #ffffff;
}

.pc-text-input::placeholder {
    color: #c4b5fd;
    font-size: 12px;
}

.pc-char-count {
    text-align: right;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 3px;
}

.pc-char-count.warn {
    color: #f59e0b;
}

.pc-char-count.over {
    color: #dc2626;
    font-weight: 700;
}

/* ========== 选项芯片 ========== */
.pc-option-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pc-option-chip {
    padding: 4px 10px;
    border: 1px solid #ddd6fe;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    background: #fdfbff;
    color: #6d28d9;
    transition: all 0.2s;
    user-select: none;
}

.pc-option-chip:hover {
    border-color: #a78bfa;
    background: #f5f0ff;
}

.pc-option-chip.selected {
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    border-color: transparent;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

/* ========== 生成按钮 ========== */
.pc-generate-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.3);
}

.pc-generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.pc-generate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pc-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========== 小贴士 ========== */
.pc-tips-box {
    padding: 12px 14px;
    background: linear-gradient(135deg, #fdf6ff 0%, #fce7f3 100%);
    border-radius: 8px;
    border: 1px solid #f0e0f8;
    font-size: 12px;
    color: #6d28d9;
    line-height: 1.7;
}

.pc-tips-box p {
    margin: 0 0 6px;
    font-weight: 600;
    color: #4c1d95;
}

.pc-tips-box ul {
    margin: 0;
    padding-left: 16px;
}

.pc-tips-box li {
    margin-bottom: 3px;
    color: #7c3aed;
}

/* ========== 右栏：诗词结果 ========== */
.pc-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f9f5f0;
    overflow: hidden;
    min-width: 320px;
}

.pc-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(to bottom, #fdfcfb 0%, #f7f1ef 100%);
    border-bottom: 1px solid #e8dff0;
    flex-shrink: 0;
}

.pc-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #4c1d95;
}

.pc-result-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pc-regen-btn {
    padding: 4px 10px;
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pc-regen-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(124, 58, 237, 0.3);
}

.pc-result-form-badge {
    padding: 2px 10px;
    background: #ede9fe;
    color: #6d28d9;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.pc-word-count {
    padding: 2px 9px;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.pc-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* ========== 占位提示 ========== */
.pc-result-placeholder {
    text-align: center;
    padding: 40px 30px;
    align-self: center;
    flex: 1;
    min-height: 240px;
}

.pc-placeholder-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
    animation: pcFloat 4s ease-in-out infinite;
}

.pc-placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #6d28d9;
    margin: 0 0 8px;
    opacity: 0.8;
}

.pc-placeholder-desc {
    font-size: 13px;
    color: #9ca3af;
    margin: 4px 0;
}

.pc-placeholder-shortcut {
    font-size: 12px;
    color: #c4b5fd;
    margin-top: 12px;
}

.pc-placeholder-shortcut kbd {
    display: inline-block;
    padding: 1px 5px;
    background: #ede9fe;
    border: 1px solid #c4b5fd;
    border-radius: 3px;
    font-size: 11px;
    color: #7c3aed;
    font-family: monospace;
}

/* ========== 自定义滚动条 ========== */
.pc-history-list::-webkit-scrollbar,
.pc-input-body::-webkit-scrollbar,
.pc-result-body::-webkit-scrollbar,
.pc-modal-body::-webkit-scrollbar {
    width: 4px;
}

.pc-history-list::-webkit-scrollbar-track,
.pc-input-body::-webkit-scrollbar-track,
.pc-result-body::-webkit-scrollbar-track,
.pc-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.pc-history-list::-webkit-scrollbar-thumb,
.pc-input-body::-webkit-scrollbar-thumb,
.pc-result-body::-webkit-scrollbar-thumb,
.pc-modal-body::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.22);
    border-radius: 2px;
}

.pc-history-list::-webkit-scrollbar-thumb:hover,
.pc-input-body::-webkit-scrollbar-thumb:hover,
.pc-result-body::-webkit-scrollbar-thumb:hover,
.pc-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.45);
}

/* ========== 加载中 ========== */
.pc-result-loading {
    text-align: center;
    padding: 50px 30px;
    align-self: center;
    flex: 1;
    min-height: 240px;
}

.pc-loading-brush {
    font-size: 48px;
    margin-bottom: 16px;
    display: inline-block;
    animation: pcBrushSway 1.5s ease-in-out infinite;
}

.pc-loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 14px 0;
}

.pc-loading-dots span {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    border-radius: 50%;
    animation: pcDotBounce 1.4s ease-in-out infinite;
}

.pc-loading-dots span:nth-child(2) { animation-delay: 0.16s; }
.pc-loading-dots span:nth-child(3) { animation-delay: 0.32s; }

.pc-loading-text {
    font-size: 13px;
    color: #7c3aed;
    margin: 0;
    font-style: italic;
}

/* ========== 诗词卡片 ========== */
.pc-result-content {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.pc-result-wrapper {
    width: 100%;
    max-width: 520px;
}

.pc-poem-card {
    background: linear-gradient(145deg, #fffdf8 0%, #fff9f0 100%);
    border: 1px solid #e8d5b7;
    border-radius: 12px;
    padding: 36px 48px;
    text-align: center;
    box-shadow:
        0 4px 20px rgba(120, 60, 80, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        inset 0 0 60px rgba(255, 240, 220, 0.2);
    animation: pcPoemAppear 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    overflow: hidden;
    word-break: break-word;
}

/* 装饰性背景水墨效果 */
.pc-poem-card::before {
    content: '诗';
    position: absolute;
    top: -20px;
    right: -15px;
    font-size: 120px;
    color: rgba(124, 58, 237, 0.03);
    font-weight: 900;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

.pc-poem-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3b0764;
    margin-bottom: 6px;
    letter-spacing: 0.12em;
    line-height: 1.4;
}

.pc-poem-meta {
    margin-bottom: 20px;
}

.pc-poem-form-tag {
    display: inline-block;
    padding: 2px 12px;
    background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
    color: #7c3aed;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1px solid #ddd6fe;
}

.pc-poem-body {
    margin: 0 0 16px;
    border-top: 1px dashed #e8d5b7;
    border-bottom: 1px dashed #e8d5b7;
    padding: 20px 0;
}

.pc-poem-line {
    font-size: 1.1rem;
    color: #1f2937;
    letter-spacing: 0.18em;
    margin: 0 0 8px;
    line-height: 1.9;
    font-family: "SimSun", "宋体", "STSong", Georgia, serif;
}

.pc-poem-line:last-child {
    margin-bottom: 0;
}

.pc-poem-note {
    font-size: 12px;
    color: #9d7b5a;
    font-style: italic;
    text-align: left;
    line-height: 1.7;
    padding: 12px 0 0;
    border-top: 1px solid rgba(200, 170, 130, 0.3);
    word-break: break-word;
}

/* ========== 列表标记符主题色 ========== */
.pc-poem-card ul li::marker,
.pc-poem-card ol li::marker,
.pc-tips-box ul li::marker,
.pc-tips-box ol li::marker {
    color: #ff9800;
}

/* ========== 错误提示 ========== */
.pc-result-error {
    text-align: center;
    padding: 40px 30px;
    align-self: center;
    flex: 1;
    min-height: 240px;
}

.pc-error-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.pc-error-text {
    font-size: 14px;
    color: #dc2626;
    margin-bottom: 16px;
    line-height: 1.6;
}

.pc-retry-btn {
    padding: 8px 24px;
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.pc-retry-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.35);
}

/* ========== Toast 通知 ========== */
.pc-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(60, 20, 80, 0.9);
    color: white;
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 13px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100010;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.pc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pc-toast.success { background: rgba(16, 120, 60, 0.92); }
.pc-toast.error   { background: rgba(185, 28, 28, 0.92); }
.pc-toast.info    { background: rgba(60, 20, 80, 0.9); }

/* ========== 示例模态框 ========== */
.pc-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 100001;
    backdrop-filter: blur(3px);
}

.pc-modal-overlay.show { display: block; }

.pc-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(60, 20, 100, 0.2);
    z-index: 100002;
    flex-direction: column;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pc-modal.show {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.pc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fdf6ff 0%, #fce7f3 100%);
    border-bottom: 1px solid #e8dff0;
    flex-shrink: 0;
}

.pc-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #4c1d95;
}

.pc-modal-close {
    width: 30px;
    height: 30px;
    border: none;
    background: #ede9fe;
    color: #7c3aed;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-modal-close:hover {
    background: #7c3aed;
    color: white;
}

.pc-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.pc-example-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* 奇数末项独占一行 */
.pc-example-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.pc-example-item {
    padding: 14px 16px;
    background: linear-gradient(135deg, #fdfbff 0%, #fdf2f8 100%);
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.pc-example-item:hover {
    border-color: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
}

.pc-example-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.pc-example-item:hover::before {
    opacity: 1;
}

.pc-example-desc {
    font-size: 13px;
    font-weight: 600;
    color: #4c1d95;
    margin-bottom: 6px;
}

.pc-example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pc-example-tag {
    font-size: 11px;
    padding: 1px 7px;
    background: #ede9fe;
    color: #7c3aed;
    border-radius: 10px;
    font-weight: 500;
}

/* ========== 动画 ========== */
@keyframes pcFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pcPoemAppear {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pcFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

@keyframes pcBrushSway {
    0%, 100% { transform: rotate(-8deg); }
    50%      { transform: rotate(8deg); }
}

@keyframes pcDotBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40%           { transform: scale(1.2); opacity: 1; }
}

/* ========== 暗黑模式 (body.dark 前缀) ========== */
body.dark .pc-container {
    background: #1a1025;
}

body.dark .pc-toolbar {
    background: linear-gradient(135deg, #4c1d95 0%, #831843 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.dark .pc-main-content {
    background: #1a1025;
}

body.dark .pc-history-panel,
body.dark .pc-input-panel {
    background: #0f0a1a;
    border-color: rgba(167, 139, 250, 0.2);
}

body.dark .pc-history-header {
    background: linear-gradient(to bottom, #1a1025 0%, #140d20 100%);
    border-color: rgba(167, 139, 250, 0.2);
}

body.dark .pc-history-header h3 {
    color: #a78bfa;
}

body.dark .pc-clear-btn {
    background: #2d1b3d;
    color: #f472b6;
}

body.dark .pc-clear-btn:hover {
    background: #3d2050;
    color: #ec4899;
}

body.dark .pc-clear-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

body.dark .pc-history-search {
    border-color: rgba(167, 139, 250, 0.2);
}

body.dark .pc-history-search input {
    background: #0f0a1a;
    border-color: rgba(167, 139, 250, 0.3);
    color: #e0d4f5;
}

body.dark .pc-history-search input::placeholder {
    color: #6b4e8a;
}

body.dark .pc-history-item {
    background: #1a1025;
    border-color: rgba(167, 139, 250, 0.2);
}

body.dark .pc-history-item:hover {
    background: #261535;
    border-color: #7c3aed;
}

body.dark .pc-history-item.active {
    background: #2d1b4e;
    border-color: #8b5cf6;
}

body.dark .pc-history-item-subject {
    color: #c4b5fd;
}

body.dark .pc-history-item-form {
    background: #2d1b4e;
    color: #a78bfa;
}

body.dark .pc-history-item-time {
    color: #6b7280;
}

body.dark .pc-history-item-delete {
    background: #3d1f3d;
    color: #f472b6;
}

body.dark .pc-history-item-delete:hover {
    background: #db2777;
    color: white;
}

body.dark .pc-panel-header {
    border-color: rgba(167, 139, 250, 0.15);
}

body.dark .pc-panel-header h3 {
    color: #c4b5fd;
}

body.dark .pc-panel-tip {
    color: #6b7280;
}

body.dark .pc-label {
    color: #9ca3af;
}

body.dark .pc-textarea,
body.dark .pc-text-input {
    background: #0f0a1a;
    border-color: rgba(167, 139, 250, 0.3);
    color: #e0d4f5;
}

body.dark .pc-textarea::placeholder,
body.dark .pc-text-input::placeholder {
    color: #4c3770;
}

body.dark .pc-textarea:focus,
body.dark .pc-text-input:focus {
    border-color: #7c3aed;
    background: #140d20;
}

body.dark .pc-option-chip {
    background: #1a1025;
    border-color: rgba(167, 139, 250, 0.3);
    color: #a78bfa;
}

body.dark .pc-option-chip:hover {
    background: #261535;
    border-color: #7c3aed;
}

body.dark .pc-tips-box {
    background: linear-gradient(135deg, #1a1025 0%, #1f0a20 100%);
    border-color: rgba(167, 139, 250, 0.2);
}

body.dark .pc-tips-box p {
    color: #c4b5fd;
}

body.dark .pc-tips-box li {
    color: #a78bfa;
}

body.dark .pc-result-panel {
    background: #1a1025;
}

body.dark .pc-result-header {
    background: linear-gradient(to bottom, #1f1030 0%, #1a1025 100%);
    border-color: rgba(167, 139, 250, 0.2);
}

body.dark .pc-result-header h3 {
    color: #c4b5fd;
}

body.dark .pc-result-form-badge {
    background: #2d1b4e;
    color: #c4b5fd;
}

body.dark .pc-placeholder-title {
    color: #a78bfa;
}

body.dark .pc-placeholder-desc {
    color: #6b7280;
}

body.dark .pc-placeholder-shortcut kbd {
    background: #2d1b4e;
    border-color: rgba(167, 139, 250, 0.4);
    color: #c4b5fd;
}

body.dark .pc-poem-card {
    background: linear-gradient(145deg, #1f1535 0%, #1a1025 100%);
    border-color: rgba(167, 139, 250, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark .pc-poem-title {
    color: #e0d4f5;
}

body.dark .pc-poem-form-tag {
    background: linear-gradient(135deg, #2d1b4e 0%, #3d1040 100%);
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.3);
}

body.dark .pc-poem-body {
    border-color: rgba(167, 139, 250, 0.2);
}

body.dark .pc-poem-line {
    color: #d4c8e8;
}

body.dark .pc-poem-note {
    color: #8b7aaa;
    border-color: rgba(167, 139, 250, 0.15);
}

body.dark .pc-poem-card em,
body.dark .pc-poem-note em {
    color: #A1887F;
}

body.dark .pc-modal {
    background: #0f0a1a;
}

body.dark .pc-modal-header {
    background: linear-gradient(135deg, #1a1025 0%, #1f0a20 100%);
    border-color: rgba(167, 139, 250, 0.2);
}

body.dark .pc-modal-header h3 {
    color: #c4b5fd;
}

body.dark .pc-modal-close {
    background: #2d1b4e;
    color: #a78bfa;
}

body.dark .pc-modal-close:hover {
    background: #7c3aed;
    color: white;
}

body.dark .pc-example-item {
    background: linear-gradient(135deg, #1a1025 0%, #1f0a20 100%);
    border-color: rgba(167, 139, 250, 0.2);
}

body.dark .pc-example-item:hover {
    border-color: #7c3aed;
}

body.dark .pc-example-desc {
    color: #c4b5fd;
}

body.dark .pc-example-tag {
    background: #2d1b4e;
    color: #a78bfa;
}

body.dark .pc-loading-text {
    color: #a78bfa;
}

body.dark .pc-error-text {
    color: #f87171;
}

body.dark .pc-word-count {
    background: #052e16;
    color: #4ade80;
    border-color: #14532d;
}

body.dark .pc-history-list::-webkit-scrollbar-thumb,
body.dark .pc-input-body::-webkit-scrollbar-thumb,
body.dark .pc-result-body::-webkit-scrollbar-thumb,
body.dark .pc-modal-body::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.22);
}

body.dark .pc-history-list::-webkit-scrollbar-thumb:hover,
body.dark .pc-input-body::-webkit-scrollbar-thumb:hover,
body.dark .pc-result-body::-webkit-scrollbar-thumb:hover,
body.dark .pc-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 139, 250, 0.5);
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .pc-history-panel { width: 160px; }
    .pc-input-panel { width: 280px; }
    .pc-poem-card { padding: 24px 30px; }
}

@media (max-width: 700px) {
    .pc-main-content { flex-direction: column; }
    .pc-history-panel { width: 100%; height: 150px; border-right: none; border-bottom: 1px solid #e8dff0; }
    .pc-input-panel { width: 100%; border-right: none; border-bottom: 1px solid #e8dff0; max-height: 320px; }
    .pc-result-panel { min-width: unset; }
    .pc-example-grid { grid-template-columns: 1fr; }
    .pc-poem-card { padding: 20px 24px; }
    .pc-poem-line { font-size: 1rem; }
}

/* ========== 打印样式 ========== */
@media print {
    .pc-toolbar, .pc-history-panel, .pc-input-panel { display: none !important; }
    .pc-result-panel { width: 100% !important; }
    .pc-poem-card { box-shadow: none; border: 1px solid #ccc; }
}
