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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e8e8e8;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-back:hover {
    background: #f5f5f5;
    color: #667eea;
}

.nav-back svg {
    transition: transform 0.2s;
}

.nav-back:hover svg {
    transform: translateX(-2px);
}

.nav-logo {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.nav-logo:hover {
    color: #667eea;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #007aff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading p {
    margin-top: 16px;
    color: #999;
    font-size: 14px;
}

/* Main */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
    align-items: center;
}

.hero-left {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.software-icon {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    margin-top: 12px;
}

.software-info {
    flex: 1;
}

.software-name {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin-bottom: 12px;
    line-height: 1.3;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.badge {
    padding: 5px 12px;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Version Selector */
.version-selector {
    margin-bottom: 16px;
}

.version-selector label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.select-trigger:hover {
    border-color: #667eea;
    background: #f9f9ff;
}

.select-trigger.active {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select-trigger svg {
    transition: transform 0.2s;
    color: #999;
}

.select-trigger.active svg {
    transform: rotate(180deg);
    color: #667eea;
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.select-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.select-option:hover {
    background: #f5f5ff;
    color: #667eea;
}

.select-option.selected {
    background: #667eea;
    color: white;
    font-weight: 500;
}

.select-option .option-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    margin-left: 8px;
}

.select-option.selected .option-badge {
    background: rgba(255, 255, 255, 0.2);
}

.select-option:first-child {
    border-radius: 10px 10px 0 0;
}

.select-option:last-child {
    border-radius: 0 0 10px 10px;
}

.select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.select-dropdown::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.select-dropdown::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.select-dropdown::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-like {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-like:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

/* Category Tags - 绿色打勾样式 */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #52c41a;
    font-weight: 500;
}

.category-tag svg {
    flex-shrink: 0;
}

.hero-right {
    position: relative;
}

.preview-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Stats Bar */
.stats-bar {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-item {
    text-align: center;
    padding: 0 10px;
    border-right: 1px solid #f0f0f0;
}

.stat-item:last-child {
    border-right: none;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.stat-unit {
    font-size: 14px;
    color: #999;
    margin-left: 2px;
}

/* Section */
.section {
    background: white;
    border-radius: 12px;
    padding: 30px 40px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
}

.section-content {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 24px 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #000;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
}

.tag:hover {
    background: #667eea;
    color: white;
}

/* Version Selector */
.version-selector {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.version-selector label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.version-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.version-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Download Links */
.download-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: #f9f9f9;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.download-link:hover {
    background: #f0f0f0;
    border-color: #667eea;
    transform: translateX(4px);
}

.link-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.link-info {
    flex: 1;
}

.link-name {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
}

.link-status {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    margin-top: 4px;
}

.link-status.checking {
    background: #fff3cd;
    color: #856404;
}

.link-status.available {
    background: #d4edda;
    color: #155724;
}

.link-status.unavailable {
    background: #f8d7da;
    color: #721c24;
}

.link-code {
    display: block;
    font-size: 13px;
    color: #667eea;
    margin-top: 4px;
    font-weight: 500;
}

/* Screenshots */
.screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.screenshot-item {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
    cursor: pointer;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0 20px;
    color: #999;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .stats-bar {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .main {
        padding: 30px 16px;
    }

    .hero-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .software-icon {
        width: 100px;
        height: 100px;
    }

    .software-name {
        font-size: 26px;
    }

    .badge-row {
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-download,
    .btn-like {
        width: 100%;
        justify-content: center;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        padding: 24px 20px;
    }

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

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


/* Download Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #000;
}

.modal-body {
    padding: 24px 30px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.download-link:hover {
    background: #f0f0f0;
    border-color: #667eea;
    transform: translateX(4px);
}

.link-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.link-info {
    flex: 1;
}

.link-name {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
}

.link-status {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    margin-top: 4px;
}

.link-status.checking {
    background: #fff3cd;
    color: #856404;
}

.link-status.available {
    background: #d4edda;
    color: #155724;
}

.link-status.unavailable {
    background: #f8d7da;
    color: #721c24;
}

.link-code {
    display: block;
    font-size: 13px;
    color: #667eea;
    margin-top: 4px;
    font-weight: 500;
}


/* Markdown Content Styles */
.markdown-content {
    line-height: 1.8;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #000;
}

.markdown-content h1 {
    font-size: 24px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.markdown-content h2 {
    font-size: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
}

.markdown-content h3 {
    font-size: 18px;
}

.markdown-content p {
    margin-bottom: 16px;
}

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

.markdown-content li {
    margin-bottom: 8px;
}

.markdown-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    color: #d63384;
}

.markdown-content pre {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    color: #333;
}

.markdown-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 16px;
    margin: 16px 0;
    color: #666;
    font-style: italic;
}

.markdown-content a {
    color: #667eea;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    text-align: left;
}

.markdown-content table th {
    background: #f5f5f5;
    font-weight: 600;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 24px 0;
}

/* 安装说明样式 */
#installationGuide {
    line-height: 1.8;
    color: #374151;
}

#installationGuide p {
    margin-bottom: 16px;
}

#installationGuide strong {
    color: #1f2937;
    font-weight: 600;
}

#installationGuide em {
    font-style: italic;
    color: #6b7280;
}

#installationGuide code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: #dc2626;
}

#installationGuide .install-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

#installationGuide .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

#installationGuide .step-text {
    flex: 1;
    padding-top: 4px;
}

#installationGuide .install-item {
    margin-bottom: 8px;
    padding-left: 8px;
    color: #4b5563;
}
