/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* SVG Icon Styles - 阿里云图标库Symbol引用 */
.icon {
   width: 1em; 
   height: 1em;
   vertical-align: -0.15em;
   fill: currentColor;
   overflow: hidden;
}

/* 特殊图标样式 */
.icon-hot {
   fill: #ff4757;
}

.icon-featured {
   fill: #ffa502;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background-color: #1a202c;
}

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

/* Header Styles */
.header {
    background: #020031;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #63b3ed;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo .icon {
    margin-right: 0.1rem;
    width: 2rem;
    height: 2rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #a0aec0;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #63b3ed;
    background-color: #2a4365;
}

.header-actions {
    display: flex;
    align-items: center;
    height: 100%;
}

/* 首页搜索框默认隐藏 */
.home-page .header-actions .search-box {
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

/* 首页和搜索页面右上角搜索框 - 默认隐藏 */
.home-page .header-actions .search-box,
.search-page .header-actions .search-box {
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

/* 只有明确添加显示类时才显示右上角搜索框 */
.home-page.show-header-search .header-actions .search-box,
.search-page.show-header-search .header-actions .search-box {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 移动端搜索框始终可见 */
@media (max-width: 768px) {
    .home-page .header-actions .search-box,
    .search-page .header-actions .search-box {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
}

/* 搜索页面主搜索容器样式 */
.search-page .search-container {
    margin: 2rem 0;
}

.search-page .search-header {
    text-align: center;
    padding: 3rem 0;
}

.search-page .search-header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.search-box {
    display: flex;
    align-items: center;
    background: #4a5568;
    border-radius: 0.5rem;
}

.search-input {
    border: none;
    background: transparent;
    padding: 0.5rem;
    font-size: 0.9rem;
    width: 250px;
    outline: none;
    color: #e2e8f0;
}

.search-input::placeholder {
    color: #a0aec0;
}

.search-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn:hover {
    background: transparent;
    opacity: 0.8;
}

.search-btn .icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: white;
    stroke: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg,  #020031 0%,#6d3353 100%);
    color: #e2e8f0;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.search-container {
    display: flex;
    background: #2d3748;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.hero-search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    outline: none;
    color: #e2e8f0;
    background: transparent;
}

.hero-search-input::placeholder {
    color: #a0aec0;
}

.hero-search-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-search-btn:hover {
    background: transparent;
    opacity: 0.8;
}

.hero-search-btn .icon {
    width: 1.8rem;
    height: 1.8rem;
    fill: white;
    stroke: white;
}

.search-tips {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Search Page Styles */
.search-page {
    padding: 2rem 0;
    min-height: 60vh;
}

.search-header {
    text-align: center;
    margin-bottom: 3rem;
}

.search-header h1 {
    font-size: 2.5rem;
    color: #e2e8f0;
    margin-bottom: 2rem;
}

.search-header .search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    background: #2d3748;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.search-header .search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    outline: none;
    color: #e2e8f0;
    background: transparent;
}

.search-header .search-input::placeholder {
    color: #a0aec0;
}

.search-header .search-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-header .search-btn:hover {
    background: transparent;
    opacity: 0.8;
}

.search-header .search-btn .icon {
    width: 1.8rem;
    height: 1.8rem;
    fill: white;
    stroke: white;
}

.results-header {
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 1.5rem;
    color: #e2e8f0;
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #f7fafc;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #a0aec0;
}

/* Search Results */
.search-results {
    padding: 3rem 0;
}

.results-count {
    color: #a0aec0;
    font-size: 1rem;
}

/* Categories */
.categories {
    padding: 4rem 0;
    background: #1a202c;
}

.categories-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 1rem 0;
    background: #1a202c;
}

.categories-tabs.sticky {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: rgba(26, 32, 44, 0);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    padding: 0.3rem 0.5rem !important;
    margin-bottom: 0;
    width: calc(100vw - 20px);
    max-width: 1144px;
    gap: 0.3rem !important;
}

/* 内容容器 */
.categories-content {
    padding-top: 1rem;
}

/* 为了避免内容跳动，添加占位空间 */
.categories-tabs-placeholder {
    height: 0;
    display: block;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none;
}

/* 分类标签样式 */
.category-tab {
    display: flex;
    align-items: center;
    gap: 0rem;
    padding: 0.75rem 1.25rem;
    background: #2d3748;
    color: #a0aec0;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.category-tab:hover {
    background: #4a5568;
    color: #e2e8f0;
    transform: translateY(-1px);
}

.category-tab.active {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

/* 本站热门图标特殊样式 - 红色闪光效果 */
.category-tab[data-category="site-popular"] .icon {
    color: #e53e3e;
    filter: drop-shadow(0 0 4px rgba(229, 62, 62, 0.6));
    animation: site-popular-glow 2s ease-in-out infinite alternate;
}

@keyframes site-popular-glow {
    from {
        filter: drop-shadow(0 0 4px rgba(229, 62, 62, 0.6));
    }
    to {
        filter: drop-shadow(0 0 8px rgba(229, 62, 62, 0.8));
    }
}

.category-tab .icon {
    width: 1.3em;
    height: 1.3em;
    margin-right: 0.2rem;
}

/* 恢复为原样式：激活态图标不额外添加发光效果 */

.category-tab .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: bold;
}

.category-tab.active .count {
    background: rgba(255, 255, 255, 0.3);
}

/* Sticky状态下的紧凑样式 */
.categories-tabs.sticky .category-tab {
    padding: 0.3rem 0.7rem !important;
    font-size: 0.85rem !important;
    gap: 0.2rem !important;
    border-radius: 0.4rem !important;
    transition: all 0.2s ease;
    border-width: 1px;
}

.categories-tabs.sticky .category-tab .icon {
    display: none !important;
}

.categories-tabs.sticky .category-tab span {
    margin-left: 0 !important;
}

.categories-tabs.sticky .category-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.categories-tabs.sticky .category-tab.active {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    box-shadow: 0 2px 12px rgba(66, 153, 225, 0.3);
}

.categories-tabs.sticky .category-tab .icon {
    width: 0.9em;
    height: 0.9em;
}

.categories-tabs.sticky .category-tab .count {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
}

/* Featured Section */
.featured {
    padding: 4rem 0;
    background: #2d3748;
}

/* Compact Extension Grid */
.extensions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    margin-bottom: 16px;
    padding: 0 8px;
}

/* Compact & Clean Extension Card Design */
.extension-card {
    background: #2d3748;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(74, 85, 104, 0.8);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: fit-content;
}

/* 微妙的背景渐变效果 */
.extension-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        145deg,
        rgba(66, 153, 225, 0.03) 0%,
        rgba(99, 179, 237, 0.05) 50%,
        rgba(66, 153, 225, 0.03) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
    border-radius: 12px;
}

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



.extension-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.25), 
        0 4px 15px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(66, 153, 225, 0.3),
        0 0 30px rgba(66, 153, 225, 0.12);
    border-color: rgba(66, 153, 225, 0.6);
    background: #334155;
}

/* 紧凑头部设计 */
.extension-top-section {
    background: transparent;
    position: relative;
    z-index: 3;
}

.extension-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.extension-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: #4a5568;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.extension-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    border-radius: 8px;
    /* 防止图片加载时的布局移动 */
    display: block;
    background-color: #4a5568;
}

.extension-card:hover .extension-icon img {
    transform: scale(1.08);
    filter: brightness(1.1) saturate(1.2);
}

.extension-card:hover .extension-icon {
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(66, 153, 225, 0.3);
    border-color: rgba(66, 153, 225, 0.6);
}

/* 精选标记 - 覆盖在图标上 */
.extension-featured-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: transparent;
    color: #fbbf24;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}

@keyframes featured-glow {
    from {
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5);
    }
    to {
        box-shadow: 0 6px 16px rgba(251, 191, 36, 0.7);
    }
}

.extension-featured-badge:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.8));
}

.extension-featured-badge .icon {
    width: 35px;
    height: 35px;
    margin-right: 0;
}

/* 保持徽章内部图标尺寸由外层继承，不额外添加阴影效果 */

.extension-meta {
    flex: 1;
    min-width: 0;
}

/* 名称和ID区域 */
.extension-name {
    font-size: 16px;
    font-weight: 600;
    color: #f7fafc;
    margin: 0 0 4px 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.extension-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.extension-name a:hover {
    color: #4299e1;
}

.extension-icon a {
    display: block;
    transition: transform 0.2s ease;
}

.extension-icon a:hover {
    transform: scale(1.05);
}

.extension-id {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 6px;
}

/* 分类和标签区域 */
.extension-category-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.extension-category-row::-webkit-scrollbar {
    display: none;
}

.extension-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #9C27B0;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.extension-version-support {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.version-badge.version-v2 {
    background: #f59e0b;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

.version-badge.version-v3 {
    background: #4CAF50;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.version-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.extension-category {
    display: inline-flex;
    align-items: center;
    background: #334155;
    color: #e5e7eb;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.extension-category .icon {
    width: 1em;
    height: 1em;
    opacity: 0.9;
}

/* 简洁描述设计 - 固定两行高度 */
.extension-description {
    font-size: 14px;
    color: #a0aec0;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 39px; /* 13px * 1.5 * 2 = 39px */
    padding: 0;
}

/* 现代化统计设计 */
.extension-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-bottom: 12px;
    background: #e2e8f000;
    border-radius: 8px;
    overflow: hidden;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 0px;
    background: #4c556621;
    position: relative;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: #2d3748;
    transform: translateY(-1px);
}

.extension-card:hover .stat-item {
    background: rgba(66, 153, 225, 0.08);
}

.extension-card:hover .stat-value {
    color: #90cdf4;
}

.extension-card:hover .stat-label {
    color: #cbd5e0;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 2px;
    border-radius: 1px;
    margin-bottom: 4px;
}

.stat-item:nth-child(1)::before {
    background: #8c8f9387; /* 版本  */
}

.stat-item:nth-child(2)::before {
    background: #8c8f9387; /* 大小  */
}

.stat-item:nth-child(3)::before {
    background: #8c8f9387; /* 时间  */
}

.stat-item:nth-child(4)::before {
    background: #8c8f9387; /* 下载次数  */
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #f7fafc;
    line-height: 1.3;
    margin-top: 6px;
    white-space: nowrap;
}

.stat-label {
    font-size: 10px;
    color: #a0aec0;
    font-weight: 500;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

/* 消息提示动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 搜索结果样式 */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #a0aec0;
    grid-column: 1 / -1;
}

.no-results .icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 下载模态框样式 */
.download-options {
    text-align: center;
}

.version-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* 紧凑按钮设计 */
.extension-actions {
    display: flex;
    gap: 8px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.btn .icon {
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0;
    flex-shrink: 0;
}

.btn-primary {
    background: #4299e1;
    color: white;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.25);
    flex: 2;
}



.btn-primary:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.25);
}

.btn-secondary {
    background: #4a5568;
    color: #e2e8f0;
    border: 1px solid #2d3748;
}

.btn-secondary:hover {
    background: #2d3748;
    border-color: #1a202c;
    color: #f7fafc;
}

.btn-outline {
    background: transparent;
    color: #63b3ed;
    border: 1px solid #2a4365;
}

.btn-outline:hover {
    background: #2a4365;
    border-color: #2c5282;
    color: #90cdf4;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-btn:hover {
    background: #3182ce;
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #2d3748;
    border-radius: 1rem;
    max-width: 800px;
    width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #4a5568;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f7fafc;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #4a5568;
    color: #f7fafc;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* 自定义滚动条样式 */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #2d3748;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* History Modal Styles */
.history-modal-content {
    max-width: 900px;
    width: 95%;
}

.history-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: #a0aec0;
}

.history-loading .icon {
    width: 1.2rem;
    height: 1.2rem;
    animation: spin 1s linear infinite;
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.version-item {
    background: #4a5568;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    border: 1px solid #2d3748;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.version-item:hover {
    background: #2d3748;
    border-color: #4a5568;
    transform: translateY(-1px);
}

.version-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.version-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.version-support-badge {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.version-support-badge.v2 {
    background: #f59e0b;
}

/* 新增：V3颜色区分 */
.version-support-badge.v3 {
    background: #10b981;
}

.version-support-badge.both {
    background: #8b5cf6;
}

.version-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f7fafc;
    min-width: 80px;
}

.version-download-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.version-download-btn .icon {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0;
    flex-shrink: 0;
}

.version-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    margin: 0 1.5rem;
}

.version-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 80px;
}

.version-stat-label {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-weight: 500;
}

.version-stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f7fafc;
}

.no-versions {
    text-align: center;
    padding: 3rem 1rem;
    color: #a0aec0;
}

.no-versions .icon {
    width: 1.2rem;
    height: 1.2rem;
    color: #a0aec0;
}

.no-versions h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

/* 历史版本模态框响应式设计 */
@media (max-width: 768px) {
    .modal-header {
        padding: 0.5rem;
    }
    
    .modal-body {
        padding: 0.5rem;
    }
    
    .history-modal-content {
        max-width: 95%;
        margin: 1rem;
    }
    
    .version-item {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .version-header {
        gap: 0.75rem;
    }
    
    .version-title {
        gap: 0.5rem;
    }
    
    /* 保留版本支持标签，但隐藏统计信息中的版本支持项 */
    .version-stat:last-child {
        display: none;
    }
    
    .version-number {
        font-size: 0.875rem;
        min-width: auto;
    }
    
    .version-stats {
        gap: 1rem;
        margin: 0 0.75rem;
    }
    
    .version-stat {
        min-width: 60px;
    }
    
    .version-stat-label {
        font-size: 0.625rem;
        margin-bottom: 0.125rem;
    }
    
    .version-stat-value {
        font-size: 0.75rem;
    }
    
    .version-download-btn {
        padding: 0;
        min-width: auto;
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
    }
    
    .version-download-btn .icon {
        width: 1.1rem;
        height: 1.1rem;
        flex-shrink: 0;
        color: #4299e1;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .modal-header {
        padding: 0.5rem;
    }
    
    .modal-body {
        padding: 0.5rem;
    }
    
    .history-modal-content {
        max-width: 98%;
        margin: 0.5rem;
    }
    
    .version-item {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    .version-header {
        gap: 0.5rem;
    }
    
    .version-title {
        gap: 0.375rem;
    }
    
    .version-number {
        font-size: 0.75rem;
    }
    
    .version-stats {
        gap: 0.75rem;
        margin: 0 0.5rem;
    }
    
    .version-stat {
        min-width: 50px;
    }
    
    .version-stat-label {
        font-size: 0.5rem;
        margin-bottom: 0.125rem;
    }
    
    .version-stat-value {
        font-size: 0.625rem;
    }
    
    .version-download-btn {
        padding: 0;
        min-width: auto;
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
    }
    
    .version-download-btn .icon {
        width: 1.8rem;
        height: 1.8rem;
        flex-shrink: 0;
        color: #4299e1;
    }
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #374151;
    color: #94a3b8;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #4b5563;
    color: #f1f5f9;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #94a3b8;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 32, 44, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #63b3ed;
    text-align: center;
}

.loading-spinner .icon {
    width: 2.5rem;
    height: 2.5rem;
    animation: spin 1s linear infinite;
}

.loading-spinner span {
    font-size: 1.1rem;
    font-weight: 500;
    color: #e2e8f0;
}

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

/* Extension Card Animations */
/* 平缓的卡片进入动画 */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.extension-card {
    padding: 16px;
    animation: cardFadeIn 0.8s ease-out;
    animation-fill-mode: both;
}

/* 为不同位置的卡片设置不同的延迟 */
.extension-card:nth-child(1) { animation-delay: 0.05s; }
.extension-card:nth-child(2) { animation-delay: 0.1s; }
.extension-card:nth-child(3) { animation-delay: 0.15s; }
.extension-card:nth-child(4) { animation-delay: 0.2s; }
.extension-card:nth-child(5) { animation-delay: 0.25s; }
.extension-card:nth-child(6) { animation-delay: 0.3s; }
.extension-card:nth-child(7) { animation-delay: 0.35s; }
.extension-card:nth-child(8) { animation-delay: 0.4s; }
.extension-card:nth-child(9) { animation-delay: 0.45s; }
.extension-card:nth-child(10) { animation-delay: 0.5s; }
.extension-card:nth-child(11) { animation-delay: 0.55s; }
.extension-card:nth-child(12) { animation-delay: 0.6s; }

/* 为动态加载的卡片提供特殊动画 */
.extension-card.card-loaded {
    animation: cardFadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

/* Responsive Design */
/* 中等屏幕 - 显示2列 */
@media (max-width: 1024px) {
    .extensions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* 小屏幕 - 显示1列，但保持卡片样式与多列一致 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 3.5rem;
    }
    
    .header-left {
        height: 100%;
        justify-content: flex-start;
        align-items: center;
        display: flex;
    }
    
    .header-actions {
        height: 100%;
        justify-content: flex-end;
        align-items: center;
        display: flex;
    }
    
    /* 移动端搜索框样式 */
    .header-actions .search-box {
        display: flex !important;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        position: relative;
        align-items: center;
    }
    
    /* 移动端搜索输入框默认隐藏 */
    .header-actions .search-input {
        width: 0;
        padding: 0;
        border: none;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        background: transparent;
        color: #e2e8f0;
        font-size: 0.9rem;
    }
    
    /* 移动端搜索按钮样式 */
    .header-actions .search-btn {
        background: transparent;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.5rem;
        transition: all 0.3s ease;
        color: white;
        min-width: 40px;
        height: 40px;
    }
    
    .header-actions .search-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* 搜索框展开状态 */
    .header-actions.search-expanded {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 3.5rem;
        background: #020031;
        z-index: 1000;
        padding: 0 1.3rem;
        display: flex;
        align-items: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .header-actions.search-expanded .search-box {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        background: #4a5568;
        border-radius: 0.5rem;
        overflow: hidden;
    }
    
    .header-actions.search-expanded .search-input {
        width: 100%;
        padding: 0.75rem 1rem;
        opacity: 1;
        visibility: visible;
        border: none;
        background: transparent;
        color: #e2e8f0;
        font-size: 1rem;
        outline: none;
    }
    
    .header-actions.search-expanded .search-btn {
        background: transparent;
        border: none;
        padding: 0.75rem;
        border-radius: 0;
        color: white;
        min-width: 50px;
        height: auto;
    }
    
    /* 搜索展开时完全隐藏header-left和header-content */
    .header-content.search-expanded {
        position: relative;
    }
    
    .header-content.search-expanded .header-left {
        display: none;
    }
    
    .header-content.search-expanded .header-actions:not(.search-expanded) {
        display: none;
    }
    
    .nav {
        gap: 1rem;
    }

    .categories {
        padding: 1.5rem 0;
        background: #1a202c;
    }
    
    /* 分类选项（移动端：单行可横向滑动、紧凑、去图标） */
    .categories-tabs {
        display: flex !important;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        padding: 8px 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        background: #1a202c;
        margin-bottom: 0.5rem;
    }

    .categories-tabs::-webkit-scrollbar { display: none; }

    .category-tab {
        scroll-snap-align: start;
        padding: 6px 10px;
        font-size: 0.9rem;
        border-radius: 10px;
        gap: 6px;
        flex: 0 0 auto;
    }

    /* 移动端隐藏分类图标，仅显示文字，保持紧凑 */
    .categories-tabs .category-tab .icon { display: none; }
    
    .search-input {
        width: 200px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        display: none; /* 移动端隐藏hero-title */
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .search-container {
        max-width: 400px;
    }
    
    .hero-search-btn {
        border-radius: 0 0 0.75rem 0.75rem;
    }
    
    /* 只改变网格为单列，保持卡片样式不变 */
    .extensions-grid {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 0 8px;
    }

    /* 移除所有卡片内部样式覆盖，保持与多列时一致 */
    /* 只在必要时调整footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* 移动端调整返回顶部按钮位置 */
    .back-to-top-btn {
        right: 0.5rem !important;
    }
}

/* 极小屏幕 - 可以适当调整一些细节 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
        display: none; /* 极小屏幕也隐藏hero-title */
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* 保持卡片网格为单列，稍微调整间距 */
    .extensions-grid {
        gap: 20px;
        padding: 0;
    }
    
    /* 只调整模态框样式 */
    .modal-content {
        width: 96%;
        border-radius: 14px;
        max-height: 85vh;
    }
}

/* 返回顶部按钮样式 */
.back-to-top-btn {
    position: fixed;
    right: 2rem;
    bottom: 2.5rem;
    z-index: 1200;
    background: transparent;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: all 0.3s ease;
}

.back-to-top-btn:hover {
    background: transparent;
    opacity: 1;
    transform: translateY(-2px);
}

.back-to-top-btn .icon {
    width: 45px;
    height: 45px;
    fill: white;
    stroke: white;
    margin-right: 0;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
}