/* Meta标签生成器样式 */

/* 标签页容器 */
.tab-container {
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #1976d2;
    background: #f5f5f5;
}

.tab-btn.active {
    color: #1976d2;
    border-bottom-color: #1976d2;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

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

/* 表单区域 */
.form-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.section-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.section-desc {
    color: #666;
    font-size: 13px;
    margin: 0 0 15px 0;
}

/* 表单行 */
.form-row {
    margin-bottom: 16px;
}

.form-row.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row.two-columns {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group .required {
    color: #e53935;
}

/* 输入框样式 */
.query-input, .query-textarea, .query-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.query-input:focus, .query-textarea:focus, .query-select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
    outline: none;
}

.query-textarea {
    resize: vertical;
    min-height: 60px;
}

.query-select {
    background: white;
    cursor: pointer;
}

/* 字符计数 */
.char-count {
    font-size: 12px;
    color: #999;
    text-align: right;
}

/* AI按钮 */
.btn-ai {
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-ai:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* 同步按钮 */
.btn-sync {
    padding: 4px 10px;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    align-self: flex-start;
    margin-top: 4px;
    transition: all 0.2s;
}

.btn-sync:hover {
    background: #e0e0e0;
    color: #333;
}

/* 操作按钮区域 */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.action-buttons .button {
    padding: 12px 24px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.action-buttons .button:hover {
    background: #1565c0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.action-buttons .secondary {
    padding: 12px 24px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.action-buttons .secondary:hover {
    background: #e0e0e0;
}

.action-buttons .third {
    padding: 12px 24px;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.action-buttons .third:hover {
    background: #f5f5f5;
    color: #333;
}

/* 快捷键提示 */
.shortcut-tips {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 12px;
    color: #999;
}

.shortcut-item {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* 结果区域 */
.query-result {
    background: #f0f7ff;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.query-result h3 {
    margin: 0 0 15px 0;
    color: #1565c0;
    font-size: 16px;
}

.ai-result {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: #c4b5fd;
}

.ai-result h3 {
    color: #7c3aed;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.btn-small {
    padding: 6px 14px;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #f5f5f5;
    border-color: #1976d2;
    color: #1976d2;
}

.result-textarea {
    background: white;
    width: 100%;
    box-sizing: border-box;
}

/* 代码块 */
.code-block {
    background: #263238;
    color: #aed581;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-block code {
    font-family: inherit;
}

/* 预览区域 */
.preview-section {
    margin-top: 30px;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.preview-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.preview-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.preview-tab {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.preview-tab:hover {
    border-color: #1976d2;
    color: #1976d2;
}

.preview-tab.active {
    background: #1976d2;
    border-color: #1976d2;
    color: white;
}

.preview-content {
    display: none;
}

.preview-content.active {
    display: block;
}

/* Google预览 */
.google-preview {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
}

.google-title {
    color: #1a0dab;
    font-size: 18px;
    line-height: 1.3;
    cursor: pointer;
    margin-bottom: 4px;
}

.google-title:hover {
    text-decoration: underline;
}

.google-url {
    color: #006621;
    font-size: 14px;
    margin-bottom: 4px;
}

.google-desc {
    color: #545454;
    font-size: 13px;
    line-height: 1.5;
}

/* Facebook预览 */
.facebook-preview {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-width: 500px;
    overflow: hidden;
}

.fb-image {
    width: 100%;
    height: 260px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.fb-image .placeholder-icon {
    font-size: 48px;
    opacity: 0.5;
}

.fb-info {
    padding: 12px;
}

.fb-site {
    color: #606770;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.fb-title {
    color: #1c1e21;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.fb-desc {
    color: #606770;
    font-size: 14px;
    line-height: 1.4;
}

/* Twitter预览 */
.twitter-preview {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 14px;
    max-width: 500px;
    overflow: hidden;
}

.tw-image {
    width: 100%;
    height: 250px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.tw-image .placeholder-icon {
    font-size: 48px;
    opacity: 0.5;
}

.tw-info {
    padding: 12px;
}

.tw-title {
    color: #0f1419;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}

.tw-desc {
    color: #536471;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.tw-site {
    color: #536471;
    font-size: 15px;
}

/* 错误提示 */
.error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.error h3 {
    color: #c62828;
    margin: 0 0 8px 0;
    font-size: 14px;
}

.error p {
    color: #d32f2f;
    margin: 0;
    font-size: 14px;
}

/* 响应式适配 */
@media (max-width: 600px) {
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .button,
    .action-buttons .secondary,
    .action-buttons .third {
        width: 100%;
        justify-content: center;
    }
    
    .preview-tabs {
        flex-wrap: wrap;
    }
    
    .google-preview,
    .facebook-preview,
    .twitter-preview {
        max-width: 100%;
    }
}
