:root {
    --primary: #667eea;
    --primary-dark: #5a6fd6;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --accent: #ff6b35;
    --bg: #ffffff;
    --bg-gray: #f5f7fa;
    --bg-dark: #1d1d1f;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-light: #f5f5f7;
    --border: #d2d2d7;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --nav-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ─── Navigation ─── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 24px;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar .logo-img {
    width: 30px;
    height: 30px;
    border-radius: 7px;
}

.navbar .logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a, .nav-links .nav-dropdown {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    flex-shrink: 0;
}

.nav-links a:hover { color: var(--primary); }

.nav-main-link {
    padding: 6px 12px;
}

.nav-main-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.nav-main-link:hover::after { transform: scaleX(1); }

.nav-cat-link {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 14px;
    color: var(--text-secondary) !important;
    transition: all 0.2s;
}

.nav-cat-link:hover {
    background: var(--bg-gray);
    color: var(--text-primary) !important;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 4px;
}

.nav-cta {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff !important;
    padding: 6px 18px;
    border-radius: 16px;
    font-weight: 500;
    font-size: 13px;
    margin-left: 8px;
}

.nav-cta:hover { opacity: 0.9; }

/* ─── Dropdown ─── */
.nav-dropdown { position: relative; flex-shrink: 0; }

.nav-dropdown .more-link {
    cursor: pointer;
    letter-spacing: 2px;
    font-size: 14px;
    padding: 4px 10px;
}

.nav-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(2px);
}

.nav-dropdown .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
}

.nav-dropdown .dropdown-menu a:hover {
    background: var(--bg-gray);
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    color: var(--text-primary);
}

/* ─── Carousel ─── */
.carousel {
    position: relative;
    height: 520px;
    overflow: hidden;
    margin-top: var(--nav-height);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.carousel-slide:not(:first-child) .carousel-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 100%);
}

.carousel-slide:first-child .carousel-bg { display: none; }
.carousel-slide:first-child {
    background: linear-gradient(180deg, #f8f9ff 0%, #fff 100%);
}

.carousel-overlay { display: none; }

.carousel-slide:not(:first-child) .carousel-overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}

.carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 640px;
    padding: 0 20px;
}

.carousel-slide:first-child .carousel-content h1 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.carousel-slide:first-child .carousel-content .gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.carousel-slide:first-child .carousel-content p {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
}

.carousel-slide:not(:first-child) .carousel-content h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.2;
}

.carousel-slide:not(:first-child) .carousel-content p {
    font-size: 17px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 28px;
}

.carousel-slide:not(:first-child) .btn-outline {
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}

.carousel-slide:not(:first-child) .btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
}

.carousel-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.carousel.dark-dots .carousel-dot {
    background: rgba(255,255,255,0.4);
}

.carousel.dark-dots .carousel-dot.active {
    background: #fff;
}

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102,126,234,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(102,126,234,0.05);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-accent:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

.btn-sm { padding: 8px 20px; font-size: 13px; }

/* ─── Sections ─── */
.section {
    padding: 80px 20px;
}

.section-gray { background: var(--bg-gray); }

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto;
}

/* ─── Software Cards ─── */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.software-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.software-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.3s;
}

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

.software-card:hover::before { opacity: 1; }

.software-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    overflow: hidden;
}

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

.software-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.software-card .card-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.software-card .card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.software-card .card-tags span {
    font-size: 11px;
    padding: 3px 10px;
    background: var(--bg-gray);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ─── Category Tabs ─── */
.category-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.category-tabs a {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all 0.25s;
}

.category-tabs a:hover,
.category-tabs a.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    border-color: transparent;
}

/* ─── Container ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Detail Page ─── */
.detail-hero {
    padding: 120px 20px 60px;
    background: linear-gradient(180deg, #f8f9ff 0%, #fff 100%);
}

.detail-header { max-width: 800px; margin: 0 auto; }

.detail-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 24px;
}

.detail-header .back-link:hover { color: var(--primary); }

.detail-header h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-header .summary {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.detail-header .tags { margin-bottom: 24px; }

.detail-body { padding: 60px 20px 80px; }

.detail-body .section-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.detail-body .description {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    max-width: 720px;
    margin-bottom: 48px;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-width: 720px;
}

.features-list li {
    list-style: none;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: var(--radius);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list li::before {
    content: '✓';
    color: var(--primary);
    font-weight: 700;
}

/* ─── Screenshots ─── */
.screenshots-strip {
    max-width: 800px;
    margin: 0 auto 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.screenshot-item {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    background: #fff;
}

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

.detail-cta {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-gray);
    border-radius: var(--radius-lg);
    margin-top: 48px;
}

.detail-cta h3 { font-size: 24px; margin-bottom: 12px; }
.detail-cta p { color: var(--text-secondary); margin-bottom: 24px; }

/* ─── Forms ─── */
.form-card {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    padding: 48px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.form-card .form-group { margin-bottom: 20px; }

.form-card label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-card input,
.form-card textarea,
.form-card select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
    background: #fff;
}

.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.form-card textarea { min-height: 120px; resize: vertical; }

.form-card .help-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ─── Wishlist Page ─── */
.wishlist-hero {
    padding: 120px 20px 40px;
    text-align: center;
    background: linear-gradient(180deg, #f8f9ff 0%, #fff 100%);
}

.wishlist-hero h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 12px; }
.wishlist-hero p { color: var(--text-secondary); font-size: 17px; }

/* ─── About Page ─── */
.about-hero {
    padding: 120px 20px 40px;
    text-align: center;
    background: linear-gradient(180deg, #f8f9ff 0%, #fff 100%);
}

.about-hero h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 12px; }

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 40px auto;
}

.about-service {
    text-align: center;
    padding: 32px 20px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.about-service:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.about-service .service-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.about-service h3 { font-size: 16px; margin-bottom: 6px; }
.about-service p { font-size: 13px; color: var(--text-secondary); }

.about-contact {
    max-width: 560px;
    margin: 40px auto;
    text-align: center;
    padding: 40px;
    background: var(--bg-gray);
    border-radius: var(--radius-lg);
}

.about-contact img {
    width: 140px;
    height: 140px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.about-contact h3 { margin-bottom: 8px; }
.about-contact p { color: var(--text-secondary); font-size: 15px; }

/* ─── Flash Messages ─── */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-danger {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #f8bbd0;
}

/* ─── Footer ─── */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 40px 20px;
    text-align: center;
}

.footer .brand {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer .brand .gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer p {
    color: #86868b;
    font-size: 13px;
    margin-bottom: 4px;
}

.footer .social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 16px 0;
}

.footer .social-links a {
    color: #86868b;
    text-decoration: none;
    font-size: 13px;
}

.footer .social-links a:hover { color: #fff; }

/* ─── Responsive ─── */
/* ─── Prose (rich content) ─── */
.prose {
    max-width: 800px;
    margin: 0 auto 48px;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.prose h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 16px;
    color: var(--text-primary);
}

.prose h3 {
    font-size: 19px;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--text-primary);
}

.prose p {
    margin-bottom: 16px;
}

.prose img {
    max-width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin: 24px auto;
    display: block;
}

/* ─── 正文插图（图文交替） ─── */
.prose figure {
    margin: 32px auto;
    max-width: 100%;
}
.prose figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin: 0;
    display: block;
}
.prose figcaption {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: center;
    padding: 0 12px;
}

.prose ul, .prose ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.prose li {
    margin-bottom: 8px;
}

.prose strong {
    font-weight: 600;
    color: var(--text-primary);
}

.prose blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 24px 0;
    background: var(--bg-gray);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
}

.prose code {
    background: var(--bg-gray);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'SF Mono', Consolas, monospace;
}

.prose pre code {
    padding: 16px;
    display: block;
    overflow-x: auto;
}

.prose hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* 微信公众号文章适配 */
.prose section {
    margin-bottom: 16px;
}
.prose section p {
    margin-bottom: 12px;
}
.prose img {
    max-width: 100%;
    height: auto;
}
.prose p[style*="line-height:3"],
.prose p[style*="line-height: 3"] {
    line-height: 2 !important;
    margin-bottom: 12px;
}
.prose strong {
    color: var(--text-primary);
}
.prose em {
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .navbar { padding: 0 16px; gap: 12px; }
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        padding: 16px;
        border-bottom: 1px solid var(--border);
        gap: 8px;
        align-items: stretch;
        max-height: 70vh;
        overflow-y: auto;
    }
    .nav-links.open a,
    .nav-links.open .nav-dropdown {
        flex-shrink: 1;
    }
    .nav-links.open .nav-divider { display: none; }
    .nav-links.open .nav-cat-link { padding: 8px 12px; }
    .mobile-toggle { display: block; }
    .hero { padding: 100px 20px 60px; }
    .section { padding: 60px 20px; }
    .software-grid { grid-template-columns: 1fr; }
    .screenshots-gallery { grid-template-columns: 1fr; }
    .form-card { padding: 28px; }
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-primary); }

/* ─── Animations ─── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ─── Search Bar ─── */
.search-bar {
    max-width: 400px;
    margin: 0 auto 32px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.search-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102,126,234,0.15); }

.search-bar::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.4;
}

/* ─── Page Header ─── */
.page-header {
    padding: 120px 20px 40px;
    text-align: center;
    background: linear-gradient(180deg, #f8f9ff 0%, #fff 100%);
}

.page-header h1 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 8px; }
.page-header p { color: var(--text-secondary); font-size: 17px; }
