/* ============================================
   sumly_wechat.css - sumly.cn 微信端产品页专用样式
   用于 index_wechat.php（与 sumly.com 中文站一致）
   不加载 corporate.css，避免与电脑端样式冲突
   ============================================ */

/* === 1. Hero Section (紫色渐变背景) === */
.geo-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 72px 16px 64px;
    position: relative;
    overflow: hidden;
}
.geo-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.geo-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}
.geo-hero .badge-free {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    padding: 5px 20px;
    font-size: 13px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
.geo-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    word-break: break-word;
}
.geo-hero .hero-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 1.15rem;
    opacity: .88;
    max-width: 640px;
    margin: 0 auto 32px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.stat-item {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 20px 28px;
    min-width: 140px;
    text-align: center;
    transition: transform 0.2s;
}
.stat-item:hover { transform: translateY(-4px); }
.stat-value {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}
.stat-label {
    font-size: 0.8rem;
    opacity: .75;
    margin-top: 4px;
    white-space: nowrap;
}

/* === 2. Analysis Section === */
.analysis-section {
    width: 100%;
    max-width: 780px;
    margin: -32px auto 0;
    position: relative;
    z-index: 10;
    padding: 0 16px;
    box-sizing: border-box;
}
.analysis-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    padding: 36px;
    border: 1px solid #f0f0f0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.analysis-card h2 {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}
.analysis-card .subtitle {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0 0 24px;
}
.input-group-custom {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.input-group-custom input {
    flex: 1;
    height: 52px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 1rem;
    outline: none;
    transition: border .2s, box-shadow .2s;
}
.input-group-custom input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
}
.btn-analyze {
    height: 52px;
    padding: 0 28px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity .2s, transform .15s;
}
.btn-analyze:hover { opacity: .92; transform: translateY(-1px); }
.btn-analyze:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.result-placeholder {
    text-align: center;
    color: #cbd5e1;
    padding: 36px 0;
}
.result-placeholder i { font-size: 44px; display: block; margin-bottom: 12px; }

/* GEO Score Header */
.geo-score-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}
.score-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
}
.score-summary h3 { font-size: 1.1rem; margin: 0 0 6px; font-weight: 700; }
.score-summary p { color: #64748b; font-size: 0.9rem; margin: 0; line-height: 1.6; }
.score-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-top: 8px;
}

/* Dimension Grid */
.dim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.dim-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #f0f0f0;
    position: relative;
    transition: transform .15s, box-shadow .15s;
}
.dim-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.dim-card.dim-pro { opacity: .55; }
.dim-card.dim-pro .dim-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #94a3b8;
    font-size: 14px;
}
.dim-label { font-size: 0.82rem; color: #64748b; margin-bottom: 8px; }
.dim-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.dim-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .6s ease;
}
.dim-score { font-size: 1.25rem; font-weight: 700; }
.dim-weight { font-size: 0.7rem; color: #94a3b8; }

/* Report sections */
.report-section { margin-top: 16px; }
.report-section h4 {
    font-size: 0.95rem;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.issue-item {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}
.issue-item.issue-high { border-left: 4px solid #ef4444; }
.issue-item.issue-medium { border-left: 4px solid #f59e0b; }
.issue-item.issue-low { border-left: 4px solid #3b82f6; }
.issue-item .issue-title { font-weight: 700; color: #1e293b; margin-bottom: 2px; }
.issue-item .issue-desc { color: #64748b; line-height: 1.5; }

.suggestion-item {
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}
.suggestion-item .sg-title { font-weight: 700; color: #1e293b; margin-bottom: 2px; }
.suggestion-item .sg-desc { color: #64748b; line-height: 1.5; margin-bottom: 4px; }
.suggestion-item .sg-impact { color: #764ba2; font-size: 0.8rem; font-weight: 500; }

.barrier-list {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}
.barrier-list ul { margin: 0; padding-left: 18px; }
.barrier-list li { font-size: 0.85rem; color: #92400e; line-height: 1.9; }

/* GEO CTA in result */
.geo-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    margin-top: 24px;
    transition: transform .15s;
}
.geo-cta:hover { transform: translateY(-2px); color: #fff; }
.geo-cta.geo-cta-pro { background: linear-gradient(135deg, #667eea, #764ba2); }
.geo-cta.geo-cta-free { background: linear-gradient(135deg, #22c55e, #16a34a); }
.geo-cta-icon { font-size: 28px; }
.geo-cta-body { flex: 1; }
.geo-cta-body h4 { font-size: 0.95rem; margin: 0 0 4px; font-weight: 700; color: #fff; }
.geo-cta-body p { font-size: 0.82rem; opacity: .9; margin: 0; line-height: 1.4; color: #fff; }
.geo-cta .btn-cta {
    padding: 8px 20px;
    border-radius: 10px;
    background: rgba(255,255,255,0.25);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Collapse toggle */
.collapse-toggle .bi-chevron-down { transition: transform .2s; }
.collapse-toggle.open .bi-chevron-down { transform: rotate(180deg); }

/* === 3. Leaderboard === */
.leaderboard-section {
    max-width: 1200px;
    margin: 48px auto 0;
    padding: 0 16px;
}
.section-header {
    text-align: center;
    margin-bottom: 32px;
}
.section-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px;
}
.section-header p {
    color: #94a3b8;
    font-size: 0.95rem;
}
.lb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.lb-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: relative;
    transition: transform .2s, box-shadow .2s;
}
.lb-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.lb-card.top-1 { border-color: #fbbf24; }
.lb-card.top-2 { border-color: #cbd5e1; }
.lb-card.top-3 { border-color: #d97706; }
.lb-rank {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}
.lb-rank.r-1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.lb-rank.r-2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.lb-rank.r-3 { background: linear-gradient(135deg, #d97706, #92400e); }
.lb-rank.r-other { background: #94a3b8; }
.lb-domain {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 12px 0 8px;
    word-break: break-all;
}
.lb-score {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}
.lb-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 0.78rem;
    color: #94a3b8;
}
.lb-meta span { display: flex; align-items: center; gap: 4px; }

/* === 4. AI Crawler Dynamics === */
.crawler-section {
    max-width: 100%;
    margin: 48px auto 0;
    padding: 0 16px;
}
.crawler-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.crawler-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
    min-height: 280px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.crawler-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Pie Chart */
.pie-chart-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 8px;
}
.pie-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pie-legend {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.8;
    max-width: 100%;
    word-break: break-word;
}
.pie-legend .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}
.crawler-summary {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-around;
    text-align: center;
}
.crawler-summary .cs-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
}
.crawler-summary .cs-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Discovery Timeline */
.discovery-list {
    max-height: 340px;
    overflow-y: auto;
}
.discovery-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.85rem;
}
.discovery-item:last-child { border: none; }
.discovery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
.discovery-dot.type-crawl { background: #3b82f6; }
.discovery-dot.type-analyze { background: #8b5cf6; }
.discovery-dot.type-push { background: #22c55e; }
.discovery-dot.type-default { background: #94a3b8; }
.discovery-info { flex: 1; min-width: 0; }
.discovery-domain {
    font-weight: 600;
    color: #1e293b;
    word-break: break-all;
    max-width: 100%;
    overflow: hidden;
}
.discovery-detail {
    color: #94a3b8;
    font-size: 0.78rem;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    max-width: 100%;
}
.discovery-meta {
    font-size: 0.72rem;
    color: #cbd5e1;
    margin-top: 2px;
    display: flex;
    gap: 8px;
}

/* Trend */
.trend-mini {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.trend-mini .trend-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 6px;
}
.trend-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
}
.trend-bar {
    width: 100%;
    align-self: stretch;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, #667eea, #764ba2);
    transition: height .4s ease;
    position: relative;
    min-height: 2px;
}
.trend-bar:hover { background: linear-gradient(180deg, #818cf8, #a78bfa); }
.trend-date {
    font-size: 0.6rem;
    color: #cbd5e1;
    text-align: center;
    margin-top: 3px;
}

/* === 5. Features Grid === */
.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;
    color: #1e293b;
}
.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 !important;
    margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: #1e293b; }
.feature-card p { color: #64748b; font-size: 0.92rem; line-height: 1.6; }

/* === 6. CTA Section === */
.cta-section {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(160deg, #f5f7ff 0%, #eef1fc 40%, #f0edff 100%);
}
.cta-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 12px;
}
.cta-section p {
    color: #64748b;
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 36px;
    border-radius: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(102,126,234,.3);
}
.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102,126,234,.4);
    color: #fff;
}
.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 36px;
    border-radius: 14px;
    border: 2px solid #667eea;
    color: #667eea;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: transform .2s, background .2s;
}
.btn-cta-outline:hover {
    transform: translateY(-2px);
    background: #667eea;
    color: #fff;
}

/* === Loading & Skeleton === */
.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); } }

.loading-indicator {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 0.9rem;
}
.ds-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: sumly-spin .7s linear infinite;
    margin-bottom: 10px;
}

/* === Navigation Bar Styles (for header_wechat.php) === */
.navbar .nav-link {
    color: #555;
    border-radius: 6px;
    transition: all 0.2s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #0052D9;
    background: #f0f5ff;
}
.navbar-toggler:focus { box-shadow: none; }

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
        margin-top: 8px;
    }
    .navbar-nav {
        text-align: center;
        width: 100%;
        margin: 0 !important;
        gap: 4px !important;
    }
    .navbar-nav .nav-item { width: 100%; }
    .navbar-nav .nav-link {
        padding: 10px 16px !important;
        font-size: 15px;
        border-radius: 8px;
        margin-bottom: 2px;
    }
    .navbar-btn-group {
        width: 100%;
        flex-direction: column;
        gap: 8px !important;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
    }
    .navbar-btn-group .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px !important;
        font-size: 15px;
        border-radius: 8px;
    }
    .navbar-brand img { height: 28px !important; }
}

/* === Responsive: Global === */
img, table, pre, iframe, video, embed, object {
    max-width: 100%;
    height: auto;
}
*, *::before, *::after { box-sizing: border-box; }

/* === Mobile Responsive Adjustments === */
@media (max-width: 767px) {
    .geo-hero { padding: 40px 16px 32px; }
    .geo-hero h1 { font-size: 1.8rem; }
    .geo-hero .hero-subtitle { font-size: 0.95rem; margin-bottom: 24px; }

    .analysis-card { padding: 20px; }
    .input-group-custom { flex-direction: column; }
    .input-group-custom input { width: 100%; }
    .btn-analyze { width: 100%; justify-content: center; }

    .geo-score-header { flex-direction: column; text-align: center; }

    .crawler-grid { grid-template-columns: 1fr; }

    .features { padding: 48px 16px; }
    .features h2 { font-size: 1.3rem; }
    .feature-grid { grid-template-columns: 1fr; }

    .cta-section { padding: 48px 16px; }
    .cta-section h2 { font-size: 1.5rem; }
}

.site-logo { height: 27px; width: auto; }
