/* ===== CSS Variables & Reset ===== */
:root {
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --accent: #f97316;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-sidebar: #f8fafc;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.25s ease;
    --sidebar-width: 280px;
    --max-width: 1280px;
}

* { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; }

/* ===== Header / Top Navigation ===== */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-nav { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition);
}

.logo:hover { color: var(--primary-dark); }

.logo-text { letter-spacing: -0.5px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-medium);
    transition: var(--transition);
}

.nav-link:hover { color: var(--primary); background: var(--primary-light); }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Category Page Layout ===== */
.category-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0;
    min-height: calc(100vh - 64px - 320px);
}

.category-layout {
    display: flex;
    gap: 0;
}

/* ===== Left Sidebar ===== */
.category-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.sidebar-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.category-list { padding: 4px 12px; }

.category-list li { margin-bottom: 2px; }

.category-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-medium);
    transition: var(--transition);
    cursor: pointer;
}

.category-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.category-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-white);
    font-size: 1rem;
    flex-shrink: 0;
}

.category-link.active .category-icon {
    background: var(--primary);
    color: white;
}

.category-name { flex: 1; }

.category-count {
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--border-light);
    padding: 2px 8px;
    border-radius: 12px;
}

.category-link.active .category-count {
    background: var(--primary);
    color: white;
}

/* ===== Right Content Area ===== */
.category-main {
    flex: 1;
    min-width: 0;
    padding: 32px 40px;
}

.category-content { max-width: 960px; }

.category-hero {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.category-hero-text { flex: 1; }

.category-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px;
}

.category-description {
    font-size: 1.05rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin: 0;
}

.category-hero-image {
    flex-shrink: 0;
    width: 280px;
    height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-light);
}

.category-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Software Grid ===== */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.software-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.software-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.software-card-link {
    display: block;
    padding: 20px;
    color: inherit;
}

.software-card-image {
    width: 100%;
    height: 140px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--bg-light);
}

.software-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.software-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.software-card-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* ===== Category Info Section ===== */
.category-info-section {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-top: 16px;
}

.category-info-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 28px;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.info-card {
    text-align: center;
    padding: 24px 16px;
}

.info-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}

.info-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.info-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* ===== Software Detail Page ===== */
.software-detail-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0;
}

.detail-breadcrumb {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.breadcrumb-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.breadcrumb-container a {
    color: var(--primary);
    transition: var(--transition);
}

.breadcrumb-container a:hover { color: var(--primary-dark); }

.breadcrumb-sep {
    margin: 0 8px;
    color: var(--border);
}

.breadcrumb-current { color: var(--text-dark); font-weight: 500; }

.detail-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.detail-hero {
    padding: 48px 0;
    background: var(--bg-white);
}

.detail-hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 48px;
    align-items: center;
}

.detail-hero-image {
    flex-shrink: 0;
    width: 400px;
    height: 280px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-light);
}

.detail-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero-content { flex: 1; }

.detail-hero-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.detail-hero-subtitle {
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 500;
    margin: 0 0 16px;
}

.detail-hero-description p {
    font-size: 1rem;
    color: var(--text-medium);
    line-height: 1.8;
    margin: 0;
}

.detail-screenshots {
    padding: 48px 0;
    background: var(--bg-light);
}

.detail-screenshots h2,
.detail-features h2,
.detail-capabilities h2,
.detail-related h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 32px;
    text-align: center;
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.screenshot-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-white);
}

.screenshot-item img {
    width: 100%;
    display: block;
}

.detail-features { padding: 48px 0; background: var(--bg-white); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    display: flex;
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.feature-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 6px;
}

.feature-content p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.detail-capabilities { padding: 48px 0; background: var(--bg-light); }

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.capability-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.capability-card:hover {
    box-shadow: var(--shadow-md);
}

.capability-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}

.capability-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.capability-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.detail-related { padding: 48px 0; background: var(--bg-white); }

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.related-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.related-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.related-card-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: var(--bg-light);
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-body {
    padding: 12px 16px;
}

.related-card-body h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--text-dark);
    color: #d1d5db;
    padding: 48px 0 0;
    margin-top: 64px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px;
}

.footer-section p {
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.footer-section a {
    display: block;
    font-size: 0.875rem;
    color: #9ca3af;
    padding: 4px 0;
    transition: var(--transition);
}

.footer-section a:hover { color: #ffffff; }

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
}

.footer-links{
    margin-left:100px;

}

/* ===== Mobile Sidebar Toggle ===== */
.sidebar-toggle-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.25rem;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .category-layout { position: relative; }

    .category-sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        height: 100vh;
        z-index: 150;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .category-sidebar.open { left: 0; }

    .category-main { padding: 24px 20px; }

    .category-hero { flex-direction: column; gap: 24px; }

    .category-hero-image { width: 100%; height: 180px; }

    .sidebar-toggle-btn { display: flex; }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 140;
    }

    .sidebar-overlay.active { display: block; }

    .detail-hero-container {
        flex-direction: column;
        gap: 24px;
    }

    .detail-hero-image { width: 100%; height: 200px; }

    .software-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border);
        padding: 12px;
        gap: 4px;
        box-shadow: var(--shadow-md);
    }

    .mobile-menu-btn { display: flex; }

    .category-sidebar { width: 280px; min-width: 280px; }

    .category-title { font-size: 1.5rem; }

    .software-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

    .software-card-image { height: 100px; }

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

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

    .footer-content { grid-template-columns: 1fr; gap: 32px; }

    .detail-hero-content h1 { font-size: 1.5rem; }

    .screenshot-gallery { grid-template-columns: 1fr; }

    .detail-hero { padding: 32px 0; }
}

@media (max-width: 480px) {
    .category-main { padding: 16px 12px; }

    .category-hero { margin-bottom: 24px; padding-bottom: 24px; }

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

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

    .category-info-section { padding: 24px 16px; }

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

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

/* ===== Loading Spinner ===== */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-light);
    gap: 12px;
}

.loading-spinner .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Transition animations ===== */
.category-content.fade-in {
    animation: fadeIn 0.35s ease;
}

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

/* ===== Scrollbar ===== */
.category-sidebar::-webkit-scrollbar {
    width: 4px;
}

.category-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.category-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* ===== Scraped Detail Content ===== */
.scraped-section {
    margin: 0;
}

.scraped-form-detail .app-banner {
    background: #f8f9fb;
    padding: 60px 0;
    color: #1a1a2e;
}

.scraped-form-detail .content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.scraped-form-detail .flex-content {
    display: flex;
    align-items: center;
    gap: 48px;
}

.scraped-form-detail .bnr-left {
    flex: 1;
}

.scraped-form-detail .bnr-left h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a1a2e;
    line-height: 1.3;
}

.scraped-form-detail .bnr-left p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
    margin: 0;
}

.scraped-form-detail .bnr-right {
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    overflow: hidden;
}

.scraped-form-detail .bnr-right .wechat-qr-container {
    padding: 24px 32px !important;
}

.scraped-form-detail .bnr-right .wechat-qr-container img {
    display: block;
    margin: 0 auto 12px;
    width: 160px;
    height: 160px;
}

.scraped-form-detail .bnr-right .wechat-qr-container p {
    font-size: 14px;
    color: #555;
    margin: 0;
    text-align: center;
}

.scraped-app-preview .app-preview {
    padding: 50px 0;
    background: #f8f9fb;
}

.scraped-app-preview .content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.scraped-app-preview .content-wrap h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 32px;
    text-align: center;
}

.scraped-app-preview .preview-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.scraped-app-preview .slider-wrap {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.scraped-app-preview .slider-wrap:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.scraped-app-preview .gallery-item {
    height: 100%;
}

.scraped-app-preview .main-img {
    width: 100%;
    height: auto;
    display: block;
}

.scraped-admin-tasks .admistrative-tasks {
    padding: 50px 0;
    background: #fff;
}

.scraped-admin-tasks .content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.scraped-admin-tasks .content-wrap > h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 32px;
    text-align: center;
    line-height: 1.4;
}

.scraped-admin-tasks .flex-content {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.scraped-admin-tasks .flex-part-three {
    flex: 1;
    min-width: 280px;
    background: #f8f9fb;
    border-radius: 12px;
    padding: 24px;
}

.scraped-admin-tasks .flex-part-three h3,
.scraped-admin-tasks .flex-part-three h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 12px;
}

.scraped-admin-tasks .flex-part-three p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    margin: 0;
}

.scraped-admin-tasks .flex-part-three ul {
    padding-left: 20px;
    margin: 8px 0 0;
}

.scraped-admin-tasks .flex-part-three ul li {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .scraped-form-detail .flex-content {
        flex-direction: column;
        gap: 32px;
    }

    .scraped-form-detail .bnr-left h2 {
        font-size: 1.5rem;
    }

    .scraped-form-detail .bnr-right {
        align-self: center;
    }

    .scraped-form-detail .app-banner {
        padding: 40px 0;
    }

    .scraped-app-preview .preview-slider {
        grid-template-columns: 1fr;
    }

    .scraped-app-preview .app-preview,
    .scraped-admin-tasks .admistrative-tasks {
        padding: 32px 0;
    }
}