/* public/assets/css/life/seo-pixel-counter.css */

.spc-workspace {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
    margin-bottom: 40px;
    align-items: flex-start;
}

.spc-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    overflow: hidden;
}

.spc-panel-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.01);
}

.spc-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.spc-panel-body {
    padding: 24px;
}

/* =========================================================
   左侧：控制台与进度条
   ========================================================= */
.spc-sidebar {
    flex: 1;
    min-width: 320px;
    max-width: 480px;
}

.spc-device-toggle {
    display: flex;
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
    padding: 4px;
}
.spc-toggle-btn {
    border: none; background: transparent; padding: 6px 12px; font-size: 0.85rem; font-weight: 600;
    color: var(--text-muted); border-radius: 4px; cursor: pointer; transition: 0.2s;
}
.spc-toggle-btn.active {
    background: var(--bg-surface); color: var(--text-main); box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.spc-form-group { display: flex; flex-direction: column; margin-bottom: 24px; }
.spc-form-group label { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }

.spc-input {
    width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px;
    background: var(--bg-body); color: var(--text-main); font-size: 1rem; font-family: 'Inter', sans-serif;
    outline: none; transition: 0.2s; box-sizing: border-box; resize: vertical; line-height: 1.5;
    margin-bottom: 12px;
}
.spc-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 0, 102, 204), 0.1); }
.spc-title-input { font-size: 1.1rem; font-weight: 500; }

.spc-progress-container { width: 100%; }
.spc-progress-bar { width: 100%; height: 8px; background: rgba(0,0,0,0.05); border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.spc-progress-fill { height: 100%; width: 0%; transition: width 0.3s ease, background-color 0.3s; }

.bg-safe { background-color: #10b981; }
.bg-warning { background-color: #f59e0b; }
.bg-danger { background-color: #ef4444; }

.text-safe { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }

.spc-progress-stats { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); font-family: monospace;}
.spc-status-text { font-size: 0.85rem; font-weight: 700; }

.spc-btn-clear {
    display: flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--border-color);
    color: var(--text-muted); padding: 8px 16px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.spc-btn-clear:hover { background: rgba(0,0,0,0.05); color: var(--text-main); }
.spc-divider { border: none; border-top: 1px dashed var(--border-color); margin: 24px 0; }

/* =========================================================
   右侧：SERP 模拟器
   ========================================================= */
.spc-main-content {
    flex: 2;
    min-width: 0;
}

/* 高仿 Google SERP 容器 */
.spc-serp-container {
    background: #ffffff;
    border: 1px solid #dfe1e5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
    transition: 0.3s ease;
    margin-bottom: 24px;
}

.spc-serp-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; border-bottom: 1px solid #ebebeb; padding-bottom: 16px; }
.spc-serp-logo { font-size: 1.5rem; font-weight: 800; color: #4285f4; font-family: 'Product Sans', Arial, sans-serif; }
.spc-serp-searchbar { flex: 1; height: 36px; border-radius: 24px; border: 1px solid #dfe1e5; display: flex; align-items: center; padding: 0 16px; background: #fff;}
.spc-serp-search-icon { opacity: 0.5; font-size: 0.9rem; }

/* 桌面端默认样式 */
.spc-serp-result { max-width: 600px; }
.spc-serp-breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.spc-serp-favicon { background: #f1f3f4; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.spc-serp-url { font-family: Arial, sans-serif; font-size: 14px; color: #202124; line-height: 1.3;}
.spc-serp-title { font-family: Arial, sans-serif; font-size: 20px; color: #1a0dab; line-height: 1.3; margin: 0 0 4px 0; font-weight: 400; cursor: pointer; white-space: nowrap; overflow: hidden; }
.spc-serp-title:hover { text-decoration: underline; }
.spc-serp-desc { font-family: Arial, sans-serif; font-size: 14px; color: #4d5156; line-height: 1.58; max-width: 600px; word-wrap: break-word;}

/* 移动端形态切换 */
.mobile-view { max-width: 375px; margin: 0 auto; border-radius: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); border: 8px solid #f1f3f4; }
.mobile-view .spc-serp-result { max-width: 100%; }
.mobile-view .spc-serp-title { white-space: normal; } /* 移动端标题允许折行 */

/* 底部指标卡片 */
.spc-sub-heading { font-size: 0.95rem; font-weight: 700; color: var(--text-main); margin: 0 0 16px 0; }
.spc-metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; }
.spc-metric-card { background: var(--bg-body); border: 1px solid var(--border-color); padding: 16px; border-radius: 10px; display: flex; flex-direction: column; justify-content: center; }
.spc-metric-title { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.spc-metric-value { font-size: 1.5rem; font-weight: 800; color: var(--text-main); font-family: 'Inter', monospace; }
.spc-metric-value small { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-left: 4px; }

/* 暗黑模式适配 */
[data-theme="dark"] .spc-panel-header { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .spc-input, [data-theme="dark"] .spc-metric-card { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .spc-device-toggle { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .spc-toggle-btn.active { background: #1e293b; color: #f8fafc; }

/* SEO 内容矩阵 */
.tool-seo-content { margin-top: 50px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 40px; }
.tool-seo-content h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 20px; color: var(--text-main); }
.seo-intro-section { margin-bottom: 40px; }
.seo-lead-text { font-size: 1rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 15px;}
.seo-sub-heading { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; color: var(--text-main); border-left: 4px solid var(--primary-color); padding-left: 12px;}
.seo-feature-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.seo-feature-card { background: var(--bg-body); border: 1px solid var(--border-color); padding: 24px; border-radius: 12px; transition: all 0.3s ease; }
.seo-feature-card:hover { border-color: var(--primary-color); transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 102, 204, 0.08); }
.seo-feature-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.seo-icon { width: 40px; height: 40px; color: var(--primary-color); background: rgba(var(--primary-rgb, 0, 102, 204), 0.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.seo-icon svg { width: 20px; height: 20px; }
.seo-feature-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0; color: var(--text-main); }
.seo-feature-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

[data-theme="dark"] .tool-seo-content { background: var(--bg-surface); }
[data-theme="dark"] .seo-feature-card { background: #0f172a; border-color: #334155; }

/* 移动端折叠 */
@media (max-width: 900px) {
    .spc-sidebar { max-width: 100%; }
    .seo-feature-grid-3 { grid-template-columns: 1fr; }
}