/* ============================================
   Sumly.com.cn 公共样式
   GEO 优化平台 - 前台页面通用样式
   ============================================ */

/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f8fafc;
    margin: 0;
    color: #1e293b;
}

/* ---------- Page Header (pricing/tech/sites 通用) ---------- */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 70px 20px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.page-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #fff;
}
.page-header p {
    opacity: 0.88;
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto;
}

/* ---------- Footer ---------- */
.site-footer {
    text-align: center;
    padding: 32px 20px;
    color: #94a3b8;
    font-size: 0.85rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 40px;
}
.site-footer a {
    color: #64748b;
    text-decoration: none;
}

/* ============================================
   首页 index.php
   ============================================ */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0 60px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    color: #fff;
}
.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
}
.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* AI 分析卡片 */
.analysis-section {
    width: 920px;
    margin: -40px auto 0;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}
.analysis-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    padding: 40px;
}
.analysis-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}
.analysis-card .subtitle {
    color: #64748b;
    margin-bottom: 24px;
    font-size: 0.95rem;
}
.input-group-custom {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.input-group-custom input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.05rem;
    outline: none;
    transition: border-color 0.2s;
}
.input-group-custom input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.input-group-custom input::placeholder { color: #94a3b8; }
.btn-analyze {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.btn-analyze:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.4);
}
.btn-analyze:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.analysis-result { margin-top: 24px; display: none; }
.result-placeholder {
    text-align: center;
    padding: 48px 20px;
    color: #94a3b8;
}
.result-placeholder i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}
.result-score {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 20px;
}
.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.score-detail h3 { font-size: 1.1rem; margin-bottom: 6px; }
.score-detail p { color: #64748b; font-size: 0.9rem; margin: 0; }
.result-items { display: flex; flex-direction: column; gap: 12px; }
.result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid;
}
.result-item.pass { border-color: #22c55e; }
.result-item.warn { border-color: #f59e0b; }
.result-item.fail { border-color: #ef4444; }
.result-item i { margin-top: 2px; flex-shrink: 0; }
.result-item .ri-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.result-item .ri-desc { color: #64748b; font-size: 0.88rem; }
.geo-cta {
    margin-top: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
}
.geo-cta-icon { font-size: 2rem; flex-shrink: 0; }
.geo-cta-body { flex: 1; }
.geo-cta-body h4 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; }
.geo-cta-body p { margin: 0; font-size: 0.88rem; opacity: 0.9; }
.geo-cta .btn-cta {
    flex-shrink: 0;
    display: inline-block;
    padding: 10px 24px;
    background: #fff;
    color: #667eea;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}
.geo-cta .btn-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.geo-cta.cta-warn { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.geo-cta.cta-warn .btn-cta { color: #f5576c; }
.geo-cta.cta-fail { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.geo-cta.cta-fail .btn-cta { color: #e11d7a; }

/* Features */
.features {
    padding: 80px 20px;
    max-width: 1100px;
    margin: 0 auto;
}
.features h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.features > p {
    text-align: center;
    color: #64748b;
    margin-bottom: 48px;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.feature-card {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: #64748b; font-size: 0.92rem; line-height: 1.6; }

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sumly-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes sumly-spin { to { transform: rotate(360deg); } }

/* ============================================
   价格页 pricing.php
   ============================================ */
.pricing-section {
    padding: 64px 20px 80px;
    max-width: 1100px;
    margin: 0 auto;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: start;
}
.plan-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
    border: 2px solid transparent;
}
.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.plan-card.featured {
    border-color: #667eea;
    box-shadow: 0 8px 40px rgba(102,126,234,0.2);
}
.plan-card.featured:hover {
    box-shadow: 0 16px 48px rgba(102,126,234,0.25);
}
.plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 18px;
    border-radius: 20px;
    white-space: nowrap;
}
.plan-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.plan-desc { color: #64748b; font-size: 0.88rem; margin-bottom: 24px; }
.plan-price { margin-bottom: 28px; }
.plan-price .currency { font-size: 1.4rem; font-weight: 700; vertical-align: top; line-height: 2.4; }
.plan-price .amount { font-size: 2.8rem; font-weight: 800; line-height: 1; }
.plan-price .period { color: #64748b; font-size: 0.9rem; margin-left: 4px; }
.plan-save {
    display: inline-block;
    background: #ecfdf5;
    color: #059669;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}
.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.92rem;
    border-bottom: 1px solid #f1f5f9;
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li i { margin-top: 3px; flex-shrink: 0; }
.plan-features li .bi-check-circle-fill { color: #22c55e; }
.plan-features li .bi-x-circle-fill { color: #cbd5e1; }
.plan-features li .limited { color: #94a3b8; font-size: 0.85rem; }
.btn-plan {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}
.btn-plan:hover { transform: translateY(-1px); }
.btn-plan-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(102,126,234,0.3);
}
.btn-plan-primary:hover { box-shadow: 0 8px 24px rgba(102,126,234,0.4); }
.btn-plan-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}
.btn-plan-outline:hover { background: #667eea; color: #fff; }
.btn-plan-default { background: #f1f5f9; color: #475569; }
.btn-plan-default:hover { background: #e2e8f0; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.faq-section {
    padding: 0 20px 80px;
    max-width: 800px;
    margin: 0 auto;
}
.faq-section h2 { text-align: center; font-size: 1.6rem; font-weight: 700; margin-bottom: 36px; }
.faq-item {
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.faq-item h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.faq-item p { color: #64748b; font-size: 0.92rem; line-height: 1.7; margin: 0; }

/* ============================================
   技术方案页 tech.php
   ============================================ */
.tech-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 64px 20px 80px;
}
.tech-intro {
    background: #fff;
    border-radius: 18px;
    padding: 36px 40px;
    margin-bottom: 48px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border-left: 5px solid #667eea;
}
.tech-intro h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; }
.tech-intro p { color: #475569; font-size: 0.95rem; line-height: 1.8; margin-bottom: 10px; }
.tech-intro p:last-child { margin-bottom: 0; }
.flow-section { margin-bottom: 56px; }
.flow-section > h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; text-align: center; }
.flow-section > p { text-align: center; color: #64748b; margin-bottom: 36px; font-size: 0.95rem; }
.flow-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}
.flow-steps::before {
    content: '';
    position: absolute;
    left: 31px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #667eea, #764ba2, #4facfe);
    border-radius: 3px;
}
.flow-step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    position: relative;
}
.step-num {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.step-body {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    flex: 1;
}
.step-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.step-body p { color: #64748b; font-size: 0.92rem; line-height: 1.7; margin: 0; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tech-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 500;
}
.principle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}
.principle-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.principle-card .pc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 14px;
}
.principle-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.principle-card p { color: #64748b; font-size: 0.9rem; line-height: 1.7; margin: 0; }
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    color: #fff;
}
.cta-section h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.cta-section p { opacity: 0.9; margin-bottom: 24px; font-size: 0.95rem; }
.cta-section .btn-cta {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 14px 36px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cta-section .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ============================================
   站点聚合页 sites.php
   ============================================ */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 16px;
}
.stats-bar .stat { text-align: center; }
.stats-bar .stat-num { font-size: 1.6rem; font-weight: 700; }
.stats-bar .stat-label { font-size: 0.8rem; opacity: 0.75; }
.directory-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}
.category-section { margin-bottom: 36px; }
.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-left: 4px solid #667eea;
}
.category-header .cat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}
.category-header h2 { font-size: 1.1rem; font-weight: 600; }
.category-header .cat-count { font-size: 0.8rem; color: #94a3b8; margin-left: auto; }
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.site-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1a1a2e;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid transparent;
}
.site-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-color: #667eea;
}
.site-card .site-favicon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #667eea;
    flex-shrink: 0;
}
.site-card .site-info { flex: 1; min-width: 0; }
.site-card .site-info .name {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-card .site-info .url {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-card .site-score {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}
.score-high { background: #dcfce7; color: #16a34a; }
.score-mid { background: #fef3c7; color: #d97706; }
.score-low { background: #fee2e2; color: #dc2626; }
.site-card .go-icon {
    flex-shrink: 0;
    color: #cbd5e1;
    font-size: 1rem;
    transition: color 0.2s;
}
.site-card:hover .go-icon { color: #667eea; }
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 1rem; }
.empty-state .btn-cta {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}
.empty-state .btn-cta:hover { opacity: 0.9; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 960px) {
    .analysis-section { width: 100%; }
}
@media (max-width: 860px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .plan-card.featured { order: -1; }
}
@media (max-width: 640px) {
    .hero { padding: 50px 0 40px; }
    .hero h1 { font-size: 1.8rem; }
    .page-header { padding: 40px 16px 36px; }
    .page-header h1 { font-size: 1.6rem; }
    .analysis-card { padding: 24px; }
    .input-group-custom { flex-direction: column; }
    .btn-analyze { width: 100%; }
    .result-score { flex-direction: column; text-align: center; }
    .tech-intro { padding: 24px; }
    .principle-grid { grid-template-columns: 1fr; }
    .flow-steps::before { left: 24px; }
    .step-num { width: 50px; height: 50px; font-size: 1.1rem; }
    .step-body { padding: 20px; }
    .cta-section { padding: 32px 20px; }
    .stats-bar { gap: 24px; }
    .site-grid { grid-template-columns: 1fr; }
}