/* ==================== 大字报/图文设计插件 ==================== */

/* 模板选择页 */
.poster-studio-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.poster-studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.poster-studio-header h2 {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.poster-category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.poster-category-tab {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border, #e0e0e0);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.poster-category-tab.active {
    background: var(--primary, #6366F1);
    color: #fff;
    border-color: var(--primary, #6366F1);
}
.poster-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.poster-template-card {
    border: 2px solid var(--border, #e0e0e0);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.poster-template-card:hover {
    border-color: var(--primary, #6366F1);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.15);
    transform: translateY(-2px);
}
.poster-template-thumb {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.poster-template-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.poster-template-thumb-placeholder {
    font-size: 40px;
    color: #94a3b8;
}
.poster-template-info {
    padding: 10px 12px;
}
.poster-template-info h4 {
    font-size: 14px;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.poster-template-info .tag {
    font-size: 10px;
}

/* 编辑器布局 */
.poster-editor {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    background: #f0f0f0;
}
.poster-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.poster-editor-toolbar .toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    border-right: 1px solid #eee;
}
.poster-editor-toolbar .toolbar-group:last-child {
    border-right: none;
}
.poster-tool-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
    white-space: nowrap;
}
.poster-tool-btn:hover {
    background: #f5f5f5;
    border-color: var(--primary, #6366F1);
}
.poster-tool-btn.primary {
    background: var(--primary, #6366F1);
    color: #fff;
    border-color: var(--primary, #6366F1);
}
.poster-tool-btn.primary:hover {
    opacity: 0.9;
}
.poster-tool-btn.danger {
    color: var(--danger);
}
.poster-tool-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.poster-editor-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.poster-editor-canvas-area {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: #e8e8e8;
    background-image: 
        linear-gradient(45deg, #d0d0d0 25%, transparent 25%),
        linear-gradient(-45deg, #d0d0d0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d0d0d0 75%),
        linear-gradient(-45deg, transparent 75%, #d0d0d0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

/* 画布 */
.poster-canvas {
    position: relative;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    flex-shrink: 0;
    user-select: none;
}
.poster-canvas-element {
    position: absolute;
    cursor: move;
}
.poster-canvas-element.selected {
    outline: 2px solid var(--primary, #6366F1);
    outline-offset: 0;
}
.poster-canvas-element .resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid var(--primary, #6366F1);
    border-radius: 50%;
    z-index: 1000;
}
.poster-canvas-element .resize-handle.nw { top: -5px; left: -5px; cursor: nwse-resize; }
.poster-canvas-element .resize-handle.ne { top: -5px; right: -5px; cursor: nesw-resize; }
.poster-canvas-element .resize-handle.sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.poster-canvas-element .resize-handle.se { bottom: -5px; right: -5px; cursor: nwse-resize; }
.poster-canvas-element .resize-handle.n { top: -5px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.poster-canvas-element .resize-handle.s { bottom: -5px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.poster-canvas-element .resize-handle.w { left: -5px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.poster-canvas-element .resize-handle.e { right: -5px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }

/* 属性面板 */
.poster-properties-panel {
    width: 280px;
    background: #fff;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    flex-shrink: 0;
}
.poster-properties-panel .panel-section {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.poster-properties-panel .panel-section h5 {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 8px;
    text-transform: uppercase;
}
.poster-properties-panel .prop-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.poster-properties-panel .prop-row label {
    font-size: 12px;
    color: #666;
    width: 60px;
    flex-shrink: 0;
}
.poster-properties-panel .prop-row input,
.poster-properties-panel .prop-row select {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    min-width: 0;
}
.poster-properties-panel .prop-row input[type="color"] {
    width: 40px;
    height: 28px;
    padding: 2px;
    cursor: pointer;
}
.poster-properties-panel .prop-row input[type="range"] {
    padding: 0;
}
.poster-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.poster-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
}
.poster-color-swatch.active {
    border-color: var(--primary, #6366F1);
}

/* 图层面板 */
.poster-layers-panel {
    width: 200px;
    background: #fff;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    flex-shrink: 0;
}
.poster-layer-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.poster-layer-item:hover {
    background: #f9f9f9;
}
.poster-layer-item.active {
    background: #f0f0ff;
    border-left: 3px solid var(--primary, #6366F1);
}
.poster-layer-item i {
    font-size: 11px;
    color: #64748b;
}

/* 空状态 */
.poster-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}
.poster-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* 我的作品 */
.poster-my-designs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.poster-design-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}
.poster-design-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.poster-design-thumb {
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.poster-design-thumb img {
    max-width: 100%;
    max-height: 100%;
}
.poster-design-info {
    padding: 8px 10px;
}
.poster-design-info h5 {
    font-size: 12px;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.poster-design-info span {
    font-size: 10px;
    color: #64748b;
}

/* 插件关闭提示 */
.poster-plugin-disabled {
    text-align: center;
    padding: 80px 20px;
}
.poster-plugin-disabled i {
    font-size: 64px;
    color: #94a3b8;
    margin-bottom: 20px;
    display: block;
}
.poster-plugin-disabled h3 {
    color: #666;
    margin-bottom: 8px;
}

/* 后台设置 */
.poster-admin-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.poster-route-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f5f5ff;
    border: 1px solid #d0d0ff;
    border-radius: 8px;
}
.poster-route-display code {
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
}
.poster-route-display .copy-btn {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    background: #fff;
}
.poster-route-display .copy-btn:hover {
    background: #f5f5f5;
}

/* ==================== AI选题助手插件 ==================== */

.xuanti-page { max-width: 1400px; margin: 0 auto; }

.xuanti-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.xuanti-header h2 {
    margin: 0; font-size: 24px; display: flex; align-items: center; gap: 8px;
}

.xuanti-generate-layout {
    display: grid; grid-template-columns: 180px 1fr 1fr; gap: 16px; align-items: start;
}
@media (max-width: 1200px) {
    .xuanti-generate-layout { grid-template-columns: 160px 1fr; }
    .xuanti-result-card { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .xuanti-generate-layout { grid-template-columns: 1fr; }
}

.xuanti-sidebar-card {
    background: #fff; border-radius: 12px; padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky; top: 16px;
}
.xuanti-category-list {
    display: flex; flex-direction: column; gap: 4px;
    max-height: calc(100vh - 200px); overflow-y: auto;
    padding-right: 4px;
}
.xuanti-category-list::-webkit-scrollbar { width: 4px; }
.xuanti-category-list::-webkit-scrollbar-track { background: transparent; }
.xuanti-category-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.xuanti-category-list .xuanti-category-chip {
    width: 100%; text-align: left; padding: 8px 12px;
}

.xuanti-form-card {
    background: #fff; border-radius: 12px; padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.xuanti-form-section { margin-bottom: 16px; }
.xuanti-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: #333; margin-bottom: 6px;
}
.xuanti-label.required::after { content: '*'; color: var(--danger, #EF4444); }
.xuanti-optional { font-weight: 400; color: #94a3b8; font-size: 11px; }
.xuanti-char-count { text-align: right; font-size: 11px; color: #94a3b8; margin-top: 2px; }

.xuanti-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.xuanti-category-grid {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.xuanti-category-chip {
    padding: 6px 12px; border-radius: 6px; font-size: 12px;
    background: #f5f5f5; color: #555; cursor: pointer;
    transition: all 0.15s;
}
.xuanti-category-chip:hover { background: #eee; }
.xuanti-category-chip.active {
    background: var(--primary, #6366F1); color: #fff;
}

.xuanti-style-grid {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.xuanti-style-chip {
    padding: 4px 10px; border-radius: 4px; font-size: 12px;
    background: #f5f5f5; color: #666; cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.xuanti-style-chip:hover { border-color: var(--primary, #6366F1); }
.xuanti-style-chip.active {
    background: rgba(99,102,241,0.1); color: var(--primary, #6366F1);
    border-color: var(--primary, #6366F1);
}

.xuanti-count-options { display: flex; gap: 8px; }
.xuanti-count-chip {
    padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600;
    background: #f5f5f5; color: #555; cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
}
.xuanti-count-chip:hover { background: #eee; }
.xuanti-count-chip.active {
    background: #fff; border-color: var(--primary, #6366F1); color: var(--primary, #6366F1);
}
.xuanti-cost { font-size: 11px; font-weight: 400; opacity: 0.7; }

.xuanti-mode-tabs { display: flex; gap: 8px; }
.xuanti-mode-tab {
    flex: 1; padding: 12px; border-radius: 8px; cursor: pointer;
    border: 2px solid #f0f0f0; background: #fff; text-align: center;
    transition: all 0.15s;
}
.xuanti-mode-tab:hover { border-color: #ddd; }
.xuanti-mode-tab.active {
    border-color: var(--primary, #6366F1); background: rgba(99,102,241,0.05);
}
.xuanti-mode-tab i { font-size: 18px; margin-bottom: 4px; display: block; }
.xuanti-mode-tab strong { display: block; font-size: 13px; }
.xuanti-mode-tab span { font-size: 11px; color: #64748b; display: block; margin-top: 2px; }

.xuanti-generate-btn {
    margin-top: 20px; font-size: 16px; padding: 12px;
}
.xuanti-btn-cost { font-size: 12px; opacity: 0.8; font-weight: 400; }

.xuanti-result-card {
    background: #fff; border-radius: 12px; padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    min-height: 400px; display: flex; flex-direction: column;
}
.xuanti-result-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0;
}
.xuanti-result-header h3 { margin: 0; font-size: 16px; }

.xuanti-result-loading {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
    color: #64748b;
}

.xuanti-result-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    color: #94a3b8;
}
.xuanti-result-empty i { font-size: 48px; }

.xuanti-result-list {
    flex: 1; overflow-y: auto; max-height: 500px;
}
.xuanti-title-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 6px;
    transition: background 0.1s;
    border-bottom: 1px solid #f8f8f8;
}
.xuanti-title-item:hover { background: #f9f9f9; }
.xuanti-title-num {
    flex-shrink: 0; width: 24px; height: 24px;
    background: var(--primary, #6366F1); color: #fff;
    border-radius: 50%; font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.xuanti-title-text {
    flex: 1; font-size: 14px; color: #333; line-height: 1.5;
}
.xuanti-copy-btn {
    flex-shrink: 0; border: none; background: none;
    color: #94a3b8; cursor: pointer; padding: 4px 8px;
    border-radius: 4px; transition: all 0.1s;
}
.xuanti-copy-btn:hover { color: var(--primary, #6366F1); background: #f0f0f0; }

/* 标题库 */
.xuanti-library { }
.xuanti-group-card {
    background: #fff; border-radius: 10px; padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); cursor: pointer;
    transition: all 0.15s;
}
.xuanti-group-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.xuanti-group-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.xuanti-group-card-body { margin-bottom: 8px; }
.xuanti-group-card-footer {
    display: flex; align-items: center; justify-content: space-between;
}

/* ==================== 电商套图Pro插件样式 ==================== */
.dspro-page { max-width: 1400px; margin: 0 auto; }
.dspro-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.dspro-header h2 { margin: 0; font-size: 24px; font-weight: 700; }

.dspro-generate-layout {
    display: grid; grid-template-columns: 480px 1fr; gap: 24px;
}
@media (max-width: 1024px) { .dspro-generate-layout { grid-template-columns: 1fr; } }

.dspro-form-card {
    background: #fff; border-radius: 12px; padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dspro-form-section { margin-bottom: 20px; }
.dspro-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 600; margin-bottom: 8px;
}
.dspro-label.required::after { content: '*'; color: var(--danger); }
.dspro-optional { font-weight: 400; font-size: 12px; color: #64748b; }

.dspro-platform-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px;
}
.dspro-platform-chip {
    padding: 8px 12px; border-radius: 8px; text-align: center;
    background: #f5f5f5; cursor: pointer; font-size: 13px;
    transition: all 0.15s; border: 2px solid transparent;
}
.dspro-platform-chip:hover { background: #e8e8e8; }
.dspro-platform-chip.active {
    background: var(--primary-light); color: var(--primary);
    border-color: var(--primary); font-weight: 600;
}

.dspro-mode-tabs { display: flex; gap: 12px; }
.dspro-mode-tab {
    flex: 1; padding: 12px; border-radius: 8px;
    background: #f5f5f5; cursor: pointer; text-align: center;
    transition: all 0.15s; border: 2px solid transparent;
}
.dspro-mode-tab:hover { background: #e8e8e8; }
.dspro-mode-tab.active {
    background: var(--primary-light); border-color: var(--primary);
}
.dspro-mode-tab strong { display: block; font-size: 14px; margin: 4px 0; }
.dspro-mode-tab span { font-size: 12px; color: #64748b; }

.dspro-generate-btn { font-size: 16px; font-weight: 600; }
.dspro-btn-cost { font-size: 13px; opacity: 0.8; font-weight: 400; }

.dspro-result-card {
    background: #fff; border-radius: 12px; padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); min-height: 400px;
    display: flex; flex-direction: column;
}
.dspro-result-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0;
}
.dspro-result-header h3 { margin: 0; font-size: 16px; }

.dspro-result-loading {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    color: #64748b;
}

.dspro-result-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px; flex: 1;
}
.dspro-image-item {
    position: relative; border-radius: 8px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); cursor: pointer;
    aspect-ratio: 1; background: #f9f9f9;
}
.dspro-image-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.2s;
}
.dspro-image-item:hover img { transform: scale(1.05); }
.dspro-download-btn {
    position: absolute; bottom: 8px; right: 8px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.dspro-image-item:hover .dspro-download-btn { opacity: 1; }

.dspro-result-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    color: #94a3b8;
}
.dspro-result-empty i { font-size: 48px; }

.dspro-failed-info {
    grid-column: 1 / -1; padding: 12px; background: #fff3cd;
    border-radius: 8px; color: #856404; font-size: 14px;
    text-align: center;
}

.dspro-library { }
.dspro-project-card {
    background: #fff; border-radius: 10px; padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); cursor: pointer;
    transition: all 0.15s;
}
.dspro-project-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.dspro-project-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.dspro-project-card-body {
    display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px;
}
.dspro-project-card-footer {
    display: flex; align-items: center; justify-content: space-between;
}

/* ==================== AI改图修图插件样式 ==================== */
.gaitu-page { max-width: 1400px; margin: 0 auto; }
.gaitu-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.gaitu-header h2 {
    margin: 0; font-size: 24px; display: flex; align-items: center; gap: 8px;
}

.gaitu-generate-layout {
    display: grid; grid-template-columns: 180px 1fr 1fr; gap: 16px; align-items: start;
}
@media (max-width: 1200px) {
    .gaitu-generate-layout { grid-template-columns: 160px 1fr; }
    .gaitu-result-card { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .gaitu-generate-layout { grid-template-columns: 1fr; }
}

.gaitu-sidebar-card {
    background: #fff; border-radius: 12px; padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky; top: 16px;
}
.gaitu-template-list {
    display: flex; flex-direction: column; gap: 4px;
    max-height: calc(100vh - 200px); overflow-y: auto;
    padding-right: 4px;
}
.gaitu-template-list::-webkit-scrollbar { width: 4px; }
.gaitu-template-list::-webkit-scrollbar-track { background: transparent; }
.gaitu-template-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.gaitu-template-item {
    padding: 8px 12px; border-radius: 6px; font-size: 13px;
    background: #f5f5f5; color: #555; cursor: pointer;
    transition: all 0.15s; display: flex; align-items: center; justify-content: space-between;
}
.gaitu-template-item:hover { background: #eee; }
.gaitu-template-item.active {
    background: var(--primary, #6366F1); color: #fff;
}
.gaitu-new-badge {
    font-size: 10px; padding: 1px 6px; border-radius: 8px;
    background: var(--danger); color: #fff; font-weight: 600;
}
.gaitu-template-item.active .gaitu-new-badge { background: rgba(255,255,255,0.3); }

.gaitu-form-card {
    background: #fff; border-radius: 12px; padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.gaitu-form-section { margin-bottom: 16px; }
.gaitu-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: #333; margin-bottom: 6px;
}
.gaitu-required { color: var(--danger, #EF4444); }
.gaitu-optional { font-weight: 400; color: #94a3b8; font-size: 11px; }
.gaitu-char-count { text-align: right; font-size: 11px; color: #94a3b8; margin-top: 2px; }
.gaitu-prompt-textarea { font-size: 13px; line-height: 1.6; resize: vertical; min-height: 140px; font-family: inherit; }

.gaitu-upload-area {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.gaitu-upload-preview {
    position: relative; width: 100px; height: 100px;
    border-radius: 8px; overflow: hidden; border: 2px solid #f0f0f0;
}
.gaitu-upload-preview img {
    width: 100%; height: 100%; object-fit: cover;
}
.gaitu-upload-remove {
    position: absolute; top: 2px; right: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.gaitu-upload-label {
    position: absolute; bottom: 2px; left: 2px;
    padding: 1px 6px; border-radius: 4px; font-size: 10px;
    background: rgba(0,0,0,0.6); color: #fff;
}
.gaitu-upload-trigger {
    width: 100px; height: 100px; border-radius: 8px;
    border: 2px dashed #ddd; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px;
    cursor: pointer; transition: all 0.15s; color: #94a3b8;
}
.gaitu-upload-trigger:hover { border-color: var(--primary, #6366F1); color: var(--primary, #6366F1); }
.gaitu-upload-trigger i { font-size: 24px; }
.gaitu-upload-trigger span { font-size: 11px; }

.gaitu-tuhuan-tip {
    background: #fff8e1; border: 1px solid #ffe082; border-radius: 8px;
    padding: 10px 12px; margin-bottom: 16px; display: flex; gap: 8px;
    font-size: 12px; color: #8d6e63; line-height: 1.5;
}
.gaitu-tuhuan-tip i { color: #ffa000; flex-shrink: 0; margin-top: 2px; }

.gaitu-option-row { display: flex; flex-wrap: wrap; gap: 6px; }
.gaitu-ratio-row { max-width: 400px; }
.gaitu-option-chip {
    padding: 6px 14px; border-radius: 6px; font-size: 12px;
    background: #f5f5f5; color: #555; cursor: pointer;
    transition: all 0.15s;
}
.gaitu-option-chip:hover { background: #eee; }
.gaitu-option-chip.active {
    background: var(--primary, #6366F1); color: #fff;
}

.gaitu-generate-btn { margin-top: 20px; font-size: 16px; padding: 12px; }
.gaitu-btn-cost { font-size: 12px; opacity: 0.8; font-weight: 400; }

.gaitu-result-card {
    background: #fff; border-radius: 12px; padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    min-height: 400px; display: flex; flex-direction: column;
}
.gaitu-result-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0;
}
.gaitu-result-header h3 { margin: 0; font-size: 16px; }
.gaitu-result-loading {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
    color: #64748b;
}
.gaitu-result-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    color: #94a3b8;
}
.gaitu-result-empty i { font-size: 48px; }
.gaitu-result-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
}
.gaitu-image-item {
    position: relative; border-radius: 8px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.gaitu-image-item img {
    width: 100%; aspect-ratio: 1; object-fit: cover; cursor: pointer;
    transition: transform 0.2s;
}
.gaitu-image-item img:hover { transform: scale(1.03); }
.gaitu-download-btn {
    position: absolute; bottom: 6px; right: 6px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.gaitu-image-item:hover .gaitu-download-btn { opacity: 1; }
.gaitu-failed-info {
    grid-column: 1 / -1; padding: 8px; text-align: center;
    color: var(--danger); font-size: 13px;
}

.gaitu-task-card {
    background: #fff; border-radius: 10px; padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); cursor: pointer;
    transition: all 0.15s;
}
.gaitu-task-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.gaitu-task-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.gaitu-task-card-body {
    display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px;
}
.gaitu-task-card-footer {
    display: flex; align-items: center; justify-content: space-between;
}
