/* ChatGPT 提示词库样式 */
/* 全局样式重置和基础设置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 主容器 */
.cgpt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 搜索和过滤区域 */
.cgpt-search-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.cgpt-search-box {
    display: flex;
    flex: 1;
    min-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    background: white;
}

.cgpt-search-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    font-size: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.cgpt-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cgpt-search-button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.cgpt-search-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.cgpt-tag-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.cgpt-filter-label {
    font-weight: 600;
    white-space: nowrap;
    font-size: 14px;
    color: #1e293b;
}

.cgpt-tag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cgpt-tag-button {
    padding: 10px 20px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #475569;
    white-space: nowrap;
}

.cgpt-tag-button:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cgpt-tag-button.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* 结果计数 */
.cgpt-results-count {
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.cgpt-results-count span {
    color: #3b82f6;
    margin: 0 8px;
    font-weight: 700;
}

/* 提示词容器 */
.cgpt-prompts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

/* 提示词卡片 */
.cgpt-prompt-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cgpt-prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%);
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.cgpt-prompt-card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    transform: translateY(-6px);
    border-color: #cbd5e1;
}

.cgpt-prompt-card:hover::before {
    transform: scaleY(1);
}

.cgpt-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: #1e293b;
    line-height: 1.4;
}

.cgpt-views {
    font-size: 13px;
    color: #64748b;
    font-weight: normal;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.cgpt-prompt-card:hover .cgpt-views {
    background: #e2e8f0;
}

.cgpt-prompt-description {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 20px 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cgpt-prompt-content {
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 20px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    white-space: pre-wrap;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.cgpt-prompt-card:hover .cgpt-prompt-content {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.cgpt-prompt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px 0;
}

.cgpt-tag {
    padding: 6px 16px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #bfdbfe;
}

.cgpt-tag:hover {
    background: #bfdbfe;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.cgpt-prompt-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.cgpt-copy-button {
    padding: 10px 20px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cgpt-copy-button:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cgpt-copy-button.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #10b981;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* 加载更多按钮 */
.cgpt-load-more-container {
    text-align: center;
    margin: 50px 0;
}

.cgpt-load-more-button {
    padding: 16px 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.cgpt-load-more-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.cgpt-load-more-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 加载动画 */
.cgpt-loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 结束提示 */
.cgpt-end-message {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-style: italic;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    margin: 30px 0;
    border: 1px solid #e2e8f0;
}

/* 复制提示 */
.cgpt-copy-tooltip {
    position: fixed;
    background: rgba(15, 23, 42, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.cgpt-copy-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* 模态框样式 */
.cgpt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(8px);
}

.cgpt-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cgpt-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
}

.cgpt-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideUp 0.4s ease;
    border: 1px solid #e2e8f0;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.cgpt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.cgpt-modal-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
    line-height: 1.3;
}

.cgpt-modal-views {
    font-size: 14px;
    color: #64748b;
    background: #f1f5f9;
    padding: 6px 16px;
    border-radius: 16px;
    margin-top: 6px;
    border: 1px solid #e2e8f0;
}

.cgpt-modal-close {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 20px;
}

.cgpt-modal-close:hover {
    background: #e2e8f0;
    color: #334155;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cgpt-modal-body {
    margin-bottom: 30px;
}

.cgpt-modal-description {
    font-size: 17px;
    line-height: 1.7;
    margin: 0 0 30px 0;
    color: #475569;
}

.cgpt-modal-content-section {
    margin-bottom: 30px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    border: 1px solid #e2e8f0;
}

.cgpt-modal-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #1e293b;
}

.cgpt-modal-prompt {
    font-size: 15px;
    line-height: 1.7;
    padding: 20px;
    background: white;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0 0 16px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cgpt-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 12px;
}

.cgpt-modal-copy-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.cgpt-modal-copy-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.cgpt-modal-copy-button.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.cgpt-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.cgpt-modal-tags .cgpt-tag {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .cgpt-prompts-container {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 24px;
    }
    
    .cgpt-container {
        padding: 16px;
    }
    
    .cgpt-modal-content {
        max-width: 90%;
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .cgpt-search-filter-container {
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 16px;
    }
    
    .cgpt-search-box {
        min-width: auto;
    }
    
    .cgpt-tag-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cgpt-tag-buttons {
        gap: 8px;
    }
    
    .cgpt-tag-button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .cgpt-prompts-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cgpt-prompt-card {
        padding: 24px;
    }
    
    .cgpt-title {
        font-size: 18px;
    }
    
    .cgpt-modal-content {
        margin: 10px;
        padding: 28px;
        max-height: 90vh;
    }
    
    .cgpt-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .cgpt-modal-title {
        font-size: 24px;
    }
    
    .cgpt-modal-close {
        align-self: flex-end;
        margin-left: 0;
        margin-top: -16px;
        margin-right: -16px;
    }
    
    .cgpt-load-more-button {
        padding: 14px 28px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .cgpt-container {
        padding: 12px;
    }
    
    .cgpt-search-filter-container {
        padding: 20px;
        gap: 14px;
    }
    
    .cgpt-search-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .cgpt-search-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .cgpt-tag-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .cgpt-prompt-card {
        padding: 20px;
    }
    
    .cgpt-title {
        font-size: 16px;
    }
    
    .cgpt-prompt-content {
        font-size: 13px;
        padding: 12px;
    }
    
    .cgpt-modal-content {
        padding: 24px;
    }
    
    .cgpt-modal-title {
        font-size: 20px;
    }
    
    .cgpt-modal-description {
        font-size: 15px;
    }
    
    .cgpt-modal-content-section {
        padding: 20px;
    }
    
    .cgpt-modal-prompt {
        font-size: 13px;
        padding: 16px;
    }
    
    .cgpt-modal-copy-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}