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

/* SVG Icon Styles */
.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
}

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;
    padding: 1rem 0;
}

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

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

.logo .icon {
    margin-right: 0.5rem;
    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;
}

/* 首页搜索框默认隐藏 */
.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);
}

/* 搜索页面主搜索容器样式 */
.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;
    padding: 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: #4299e1;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #3182ce;
}

/* 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: #4299e1;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-search-btn:hover {
    background: #3182ce;
}

.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: #4299e1;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-header .search-btn:hover {
    background: #3182ce;
}

.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 - 40px);
    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: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #4a5568;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #a0aec0;
}

.category-tab:hover {
    background: #2d3748;
    transform: translateY(-2px);
}

.category-tab.active {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
}

.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;
    width: 28px;
    height: 28px;
    background: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
}

.extension-featured-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.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: wrap;
}

.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;
    gap: 4px;
    background: #607D8B;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
}

/* 简洁描述设计 - 固定两行高度 */
.extension-description {
    font-size: 14px;
    color: #a0aec0;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-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-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.5rem;
    height: 1.5rem;
    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;
}

.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;
}

.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: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

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

/* 历史版本模态框响应式设计 */
@media (max-width: 768px) {
    .history-modal-content {
        max-width: 95%;
        margin: 1rem;
    }
    
    .version-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .version-header {
        width: 100%;
        justify-content: space-between;
    }
    
    .version-stats {
        width: 100%;
        margin: 0;
        gap: 1rem;
        justify-content: space-around;
    }
    
    .version-stat {
        min-width: 60px;
    }
}

/* 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: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    /* 隐藏导航栏搜索框 */
    .header-actions .search-box {
        display: none !important;
    }
    
    /* 隐藏分类选项 */
    .categories-tabs {
        display: none !important;
    }
    
    .search-input {
        width: 200px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .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;
    }
}

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

/* 返回顶部按钮样式 */
.back-to-top-btn {
    position: fixed;
    right: 2rem;
    bottom: 2.5rem;
    z-index: 1200;
    background: rgba(66,153,225,0.95);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.2s, background 0.2s;
}
.back-to-top-btn:hover {
    background: #3182ce;
    opacity: 1;
}
.back-to-top-btn .icon {
    width: 28px;
    height: 28px;
    fill: currentColor;
}