/* 最美诗词 - 重构版样式 */
/* 专注于个人使用的简洁美观界面 */

/* 封面选择选项样式 */
.cover-options {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.cover-options h4 {
    margin-bottom: 12px;
    color: #495057;
    font-size: 16px;
}

.cover-option-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cover-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cover-option:hover {
    background: #e3f2fd;
    border-color: #2196f3;
}

.cover-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.cover-option input[type="radio"]:checked + span {
    color: #2196f3;
    font-weight: 500;
}

.cover-option span {
    font-size: 14px;
    color: #495057;
}

:root {
    --primary-color: #4CAF50;
    --primary-hover: #45a049;
    --secondary-color: #8BC34A;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #f56565;
    --background-color: #f7fafc;
    --surface-color: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-y: scroll; /* 强制显示滚动条，避免宽度跳动 */
}

/* 应用布局 */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: calc(100vw - 17px); /* 减去滚动条宽度，保持固定宽度 */
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.8rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning-color);
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: var(--success-color);
}

.status-dot.disconnected {
    background: var(--error-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 主要内容区域 */
.main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: calc(100vw - 17px); /* 固定宽度，减去滚动条 */
    box-sizing: border-box;
}

/* 顶部导航 */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    border-radius: var(--radius);
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    font-weight: 500;
}

.quick-actions {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.quick-actions h4 {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-actions .btn {
    width: 100%;
    margin-bottom: 0.5rem;
    justify-content: flex-start;
}

.quick-actions .btn:last-child {
    margin-bottom: 0;
}

/* 内容区域 */
.content {
    flex: 1;
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.view {
    display: none;
    padding: 2rem;
    height: 100%;
}

.view.active {
    display: block;
}

.view-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.view-header h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.view-header p {
    color: var(--text-secondary);
    margin: 0;
}

.view-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* 模式切换器 */
.mode-switcher {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mode-tabs {
    display: flex;
    background: var(--background-color);
    border-radius: var(--radius);
    padding: 0.25rem;
    gap: 0.25rem;
}

.mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.mode-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.mode-tab.active {
    background: var(--primary-color);
    color: white;
    transform: none;
}

.mode-tab.active:hover {
    background: var(--primary-hover);
}

/* 表单模式 */
.form-mode {
    width: 100%;
}

.form-mode:not(.active) {
    display: none;
}

.form-mode.active {
    display: block;
}

/* 爆款文元数据样式 */
.baokuan-metadata {
    background: var(--background-color);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
    font-size: 0.875rem;
    line-height: 1.4;
}

.baokuan-metadata strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

/* IP信息面板样式 */
.ip-info-panel {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.ip-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.ip-label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
}

.ip-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    user-select: all;
}

.ip-value:hover {
    background: var(--background-color);
}

.ip-note {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* 文章查看模态框样式 */
.modal-content.large {
    max-width: 800px;
    max-height: 90vh;
    width: 90vw;
}

.article-info-bar {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.article-info-bar span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-content-preview {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem 0;
    line-height: 1.8;
}

.article-content-preview h1,
.article-content-preview h2,
.article-content-preview h3,
.article-content-preview h4,
.article-content-preview h5,
.article-content-preview h6 {
    margin: 1.5rem 0 1rem 0;
    color: var(--text-primary);
}

.article-content-preview p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.article-content-preview strong {
    color: var(--text-primary);
}

/* 提示词管理样式 */
.setting-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.prompt-tabs {
    display: flex;
    background: var(--background-color);
    border-radius: var(--radius);
    padding: 0.25rem;
    margin-bottom: 1.5rem;
    gap: 0.25rem;
}

.prompt-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.prompt-tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.prompt-tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.prompt-tab-content {
    display: none;
}

.prompt-tab-content.active {
    display: block;
}

.prompt-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* 提示词编辑区域样式 */
.form-group textarea {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    resize: vertical;
    min-height: 120px;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

/* 图片上传样式 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.upload-placeholder {
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-placeholder:hover {
    background: rgba(102, 126, 234, 0.05);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.upload-placeholder p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.upload-placeholder small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.upload-preview {
    padding: 1rem;
    text-align: center;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.upload-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* OCR提取状态 */
.extracting {
    opacity: 0.6;
    pointer-events: none;
}

.extracting::after {
    content: ' 识别中...';
    color: var(--primary-color);
}

/* 生成文章界面 */
.generate-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    min-height: 600px;
}

.input-panel, .output-panel {
    display: flex;
    flex-direction: column;
}

.input-panel {
    border-right: 1px solid var(--border-color);
    padding-right: 2rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
}

.output-content {
    flex: 1;
    position: relative;
}

.output-area {
    width: 100%;
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--background-color);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: none;
    overflow-y: auto;
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 表单组件 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 300px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 加载动画 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 文章列表 */
.article-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.article-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.article-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.article-title {
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.article-info {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.article-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .btn {
    min-width: 40px;
}

/* 微信配置 */
.wechat-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.config-panel, .help-panel {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.help-content h4 {
    margin: 1rem 0 0.5rem 0;
    color: var(--text-primary);
}

.help-content ol, .help-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.help-content code {
    background: var(--background-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-family: 'Monaco', 'Menlo', monospace;
}

/* 统计界面 */
.stats-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* 设置标签 */
.settings-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.settings-tab {
    display: none;
}

.settings-tab.active {
    display: block;
}

/* 提示框 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--success-color);
    padding: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s;
    z-index: 1001;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    border-left-color: var(--error-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* 生成结果样式 */
.generated-titles {
    margin-bottom: 1rem;
}

.title-option {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--surface-color);
}

.title-option:hover {
    background: var(--background-color);
    border-color: var(--primary-color);
}

.title-option.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 标题头部样式 */
.titles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.titles-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.regenerate-btn {
    font-size: 0.875rem;
    padding: 0.4rem 0.8rem;
    height: auto;
    min-height: auto;
    white-space: nowrap;
}

.regenerate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .header-nav {
        order: 1;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .nav-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .header-actions {
        order: 2;
        gap: 0.5rem;
    }
    
    .logo {
        order: 0;
        text-align: center;
    }
    
    .titles-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .regenerate-btn {
        align-self: flex-end;
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

.cover-preview {
    margin-bottom: 1rem;
}

.cover-preview-container {
    max-width: 200px;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
}

.cover-preview-container iframe,
.cover-preview-container > div {
    width: 100%;
    border: none;
    display: block;
}

.article-content {
    margin-top: 1rem;
}

.article-content h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.article-metadata {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

/* 内容分隔线 */
hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* 小绿书样式 */
.xiaolvshu-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    min-height: 500px;
}

.xiaolvshu-settings {
    padding: 1rem;
    border-right: 1px solid var(--border-color);
}

.xiaolvshu-settings h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.xiaolvshu-actions {
    margin-top: 2rem;
}

.xiaolvshu-preview {
    padding: 1rem;
}

.xiaolvshu-preview h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.xiaolvshu-result {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.xiaolvshu-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--background-color);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.xiaolvshu-download-actions {
    display: flex;
    gap: 0.5rem;
}

.xiaolvshu-images {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--background-color);
    border-radius: var(--radius);
}

.xiaolvshu-image-item {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    transition: all 0.2s;
}

.xiaolvshu-image-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.xiaolvshu-image-item img {
    width: 100%;
    height: auto;
    display: block;
}

.xiaolvshu-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.xiaolvshu-image-item:hover .xiaolvshu-image-overlay {
    opacity: 1;
}

.xiaolvshu-image-actions {
    display: flex;
    gap: 0.5rem;
}

.xiaolvshu-image-actions .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    color: white;
    border-color: white;
}

.xiaolvshu-page-number {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
}

/* 小绿书直接生成结果样式 */
.xiaolvshu-result-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.xiaolvshu-result-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.xiaolvshu-result-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.xiaolvshu-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.xiaolvshu-image-card {
    position: relative;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.xiaolvshu-image-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.xiaolvshu-image-card .xiaolvshu-page-number {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    z-index: 2;
}

.xiaolvshu-image-card .xiaolvshu-image-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem 1rem 1rem 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.xiaolvshu-image-card:hover .xiaolvshu-image-actions {
    opacity: 1;
}

.xiaolvshu-image-actions .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    color: white;
    border-color: white;
}

.xiaolvshu-batch-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* 小绿书生成中样式 */
.xiaolvshu-image-card.generating {
    opacity: 0.7;
    border: 2px dashed var(--border-color);
}

.xiaolvshu-image-placeholder {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
    border-radius: 8px;
    color: var(--text-muted);
}

.generating-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.xiaolvshu-image-placeholder p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.xiaolvshu-image-content {
    margin-bottom: 1rem;
}

.xiaolvshu-batch-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
        padding: 1rem;
    }
    
    .sidebar {
        width: 100%;
        order: -1;
    }
    
    .generate-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .input-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }
    
    .wechat-container {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .view-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
    }
}