/* 基础重置和变量 */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-color-rgb: 37, 99, 235;
    --secondary-color: #f8fafc;
    --text-dark: #0f172a;
    --text-medium: #475569;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --hover-color: #f1f5f9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
}

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

/* 导航栏 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.2s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 搜索区域 */
.search-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 5rem 1rem 4rem;
    text-align: center;
}

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

.search-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 3rem;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 1rem 4rem 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    outline: none;
    transition: all 0.2s ease;
    background: white;
    box-shadow: var(--shadow);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgb(37 99 235 / 0.1);
}

.advanced-search-btn {
    position: absolute;
    right: 4rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    color: var(--text-medium);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advanced-search-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.search-suggestions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.suggestion-label {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.suggestion-tag {
    background: white;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* 高级搜索面板 */
.advanced-search-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    margin-top: 0.5rem;
}

.advanced-search-panel.show {
    display: block;
}

.advanced-search-content {
    padding: 1.5rem;
}

.advanced-search-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgb(37 99 235 / 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.apply-btn,
.reset-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apply-btn {
    background: var(--primary-color);
    color: white;
}

.apply-btn:hover {
    background: var(--primary-dark);
}

.reset-btn {
    background: white;
    color: var(--text-medium);
    border: 1px solid var(--border-color);
}

.reset-btn:hover {
    background: var(--hover-color);
    border-color: var(--text-medium);
}

/* 排行榜区域 */
.leaderboard-section {
    padding: 4rem 1rem;
    background: var(--secondary-color);
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-medium);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.leaderboard-content {
    max-width: 800px;
    margin: 0 auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.leaderboard-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    width: 3rem;
    text-align: center;
    margin-right: 1rem;
}

.leaderboard-rank.top-3 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.leaderboard-author {
    font-size: 0.9rem;
    color: var(--text-light);
}

.leaderboard-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

.leaderboard-stat {
    text-align: center;
}

.leaderboard-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.leaderboard-stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 页面标题样式 */
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
    text-align: center;
    margin-bottom: 3rem;
}

.page-search-box {
    max-width: 500px;
    margin: 0 auto 3rem auto;
    position: relative;
}

.page-search-box .search-input {
    width: 100%;
    padding: 1rem 4rem 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    outline: none;
    transition: all 0.2s ease;
    background: white;
    box-shadow: var(--shadow);
}

.page-search-box .search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-search-box .search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

/* 关于页面样式 */
.about-section {
    padding: 4rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.about-content {
    line-height: 1.8;
    font-size: 1rem;
}

.about-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text-dark);
}

.about-content ul {
    list-style: none;
    padding-left: 0;
}

.about-content li {
    padding: 0.5rem 0;
    font-size: 1rem;
}

/* 导航链接活动状态 */
.nav-links .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-links .nav-link.active::after {
    width: 100%;
}

/* 模型详情页面样式 */
.model-detail-section {
    padding: 2rem 1rem 4rem;
    min-height: calc(100vh - 80px);
    position: relative;
}

/* 侧边导航目录 */
.model-nav {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.nav-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.nav-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-content {
    padding: 0.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-medium);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item:hover {
    background: var(--hover-color);
    color: var(--text-dark);
    transform: translateX(2px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--primary-color-rgb), 0.05));
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.nav-icon {
    margin-right: 0.75rem;
    font-size: 1rem;
    width: 20px;
    display: inline-block;
}

.nav-badge {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

/* 模型内容区域 */
.model-content {
    margin-left: 320px;
    max-width: calc(100vw - 360px);
}

.back-navigation {
    margin-bottom: 2rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: var(--text-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.back-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(-2px);
}

.model-detail-article {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.model-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2rem;
    background: linear-gradient(135deg, var(--secondary-color), #fff);
    border-bottom: 1px solid var(--border-color);
}

.model-title-section h1.model-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.model-author {
    color: var(--text-medium);
    font-size: 1rem;
}

.model-author a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.model-author a:hover {
    text-decoration: underline;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* 统计信息区域 */
.model-stats-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--secondary-color);
    border-radius: var(--radius);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 内容区域 */
.model-description-section,
.model-tags-section,
.model-files-section,
.model-usage-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.model-usage-section {
    border-bottom: none;
}

.model-description-section h2,
.model-tags-section h2,
.model-files-section h2,
.model-usage-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.files-count {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-medium);
}

.description-content {
    line-height: 1.7;
    color: var(--text-dark);
    font-size: 1rem;
}

/* README内容样式 */
.readme-content {
    line-height: 1.8;
    color: var(--text-dark);
    max-width: none;
}

.readme-content h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.readme-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 1rem 0;
}

.readme-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.25rem 0 0.75rem 0;
}

.readme-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-medium);
    margin: 1rem 0 0.5rem 0;
}

.readme-content h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-medium);
    margin: 0.75rem 0 0.5rem 0;
}

.readme-content h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0.75rem 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.readme-content p {
    margin: 0.75rem 0;
    line-height: 1.8;
    text-align: justify;
}

.readme-content ul, .readme-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.readme-content ul {
    list-style-type: disc;
}

.readme-content ol {
    list-style-type: decimal;
}

.readme-content li {
    margin: 0.4rem 0;
    line-height: 1.7;
}

/* 段落间隙 */
.paragraph-break {
    display: block;
    height: 1rem;
    margin: 0;
}

.readme-content code {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 0.9em;
    font-weight: 500;
}

.readme-content .code-block {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    color: var(--text-dark);
}

.readme-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.readme-content a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.readme-content strong {
    font-weight: 600;
    color: var(--text-dark);
}

.readme-content em {
    font-style: italic;
    color: var(--text-medium);
}

/* 加载状态样式 */
.loading-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
    font-style: italic;
}

.loading-spinner {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* README表格样式 */
.readme-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.readme-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    vertical-align: top;
}

.readme-table tr:last-child td {
    border-bottom: none;
}

.readme-table td:last-child {
    border-right: none;
}

.readme-table tr:nth-child(even) {
    background: var(--secondary-color);
}

/* README图片样式 */
.readme-image {
    margin: 1.5rem 0;
    text-align: center;
}

.readme-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.readme-image img:hover {
    transform: scale(1.02);
}

.image-caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-medium);
    font-style: italic;
}

/* 行内图片样式 */
.readme-image-inline {
    display: inline-block;
    margin: 0.5rem;
    text-align: center;
}

.readme-image-inline img {
    max-width: 100%;
    max-height: 300px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* README引用块样式 */
.readme-content blockquote {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, var(--secondary-color), #fff);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    position: relative;
}

.readme-content blockquote::before {
    content: '"';
    font-size: 3rem;
    color: var(--primary-color);
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    opacity: 0.3;
}

/* README水平线样式 */
.readme-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    margin: 2rem 0;
}

/* 错误信息样式 */
.error-message {
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    border: 1px solid #fc8181;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1rem 0;
    color: #742a2a;
}

.error-message h3 {
    color: #c53030;
    margin-bottom: 1rem;
}

.error-message p {
    margin: 0.75rem 0;
    line-height: 1.6;
}

/* 标签样式 */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    padding: 0.4rem 0.8rem;
    background: var(--primary-color);
    color: white;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 500;
    transition: transform 0.2s ease;
}

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

/* 文件列表样式 */
.files-container {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: var(--hover-color);
}

.file-info {
    flex: 1;
}

.file-name {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.file-metadata {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-medium);
    font-weight: 600;
    background: var(--secondary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.file-type {
    font-size: 0.75rem;
    color: white;
    background: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-download:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* 使用说明样式 */
.usage-content {
    line-height: 1.7;
}

.usage-content ul {
    margin: 1rem 0;
    padding-left: 0;
    list-style: none;
}

.usage-content li {
    margin: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.usage-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 1rem 0;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tool-item {
    padding: 0.4rem 0.8rem;
    background: var(--secondary-color);
    color: var(--text-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tool-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 移动端导航按钮 */
.mobile-nav-btn {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-nav-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* 主要内容区域 */
.featured-section,
.results-section,
.leaderboard-section {
    padding: 4rem 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.results-count {
    color: var(--text-medium);
    font-size: 1rem;
}

/* 模型网格布局 */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.model-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.model-card:hover::before {
    transform: scaleX(1);
}

.model-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.model-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.model-author {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.model-description {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.model-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.model-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.model-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.model-tag {
    background: var(--secondary-color);
    color: var(--text-medium);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.model-actions {
    display: flex;
    gap: 0.75rem;
}

.model-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.model-btn.primary {
    background: var(--primary-color);
    color: white;
}

.model-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.model-btn.secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.model-btn.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* 加载更多按钮 */
.load-more-container {
    text-align: center;
}

.load-more-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    color: var(--text-light);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
}

/* 增强的模型卡片样式 */
.model-info {
    margin-bottom: 1rem;
}

.model-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.detail-item {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: var(--text-medium);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.detail-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.stat svg {
    opacity: 0.7;
}

.model-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.tag {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
}

.tag:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
}

.tag-more {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: var(--text-medium);
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(0,0,0,0.1);
}

.model-updated {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: right;
}

.update-label {
    font-weight: 500;
    margin-right: 0.25rem;
}

/* 排行榜增强样式 */
.leaderboard-item .model-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.model-tags-inline {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-left: 1rem;
}

.tag-small {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.model-details-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.detail-chip {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-medium);
    font-size: 1.1rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* 页脚 */
.footer {
    background: var(--secondary-color);
    padding: 3rem 1rem 2rem;
    border-top: 1px solid var(--border-color);
}

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

.footer-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links h4,
.footer-tech h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

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

.footer-links a {
    color: var(--text-medium);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.footer-tech p {
    color: var(--text-medium);
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .search-section {
        padding: 3rem 1rem 2rem;
    }
    
    .search-title {
        font-size: 2rem;
    }
    
    .search-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem auto;
        padding: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 1200px) {
    .model-nav {
        left: 1rem;
        width: 260px;
    }
    
    .model-content {
        margin-left: 280px;
        max-width: calc(100vw - 300px);
    }
}

@media (max-width: 768px) {
    .leaderboard-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .leaderboard-stats {
        margin-left: 0;
        justify-content: center;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    /* 模型详情页面响应式 */
    .model-content {
        margin-left: 0;
        max-width: 100%;
    }
    
    .model-nav {
        position: fixed;
        left: -100%;
        top: 0;
        width: 100%;
        height: 100vh;
        background: white;
        backdrop-filter: none;
        border-radius: 0;
        transform: none;
        max-height: none;
        transition: left 0.3s ease;
        border: none;
        box-shadow: none;
    }
    
    .model-nav.show {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .mobile-nav-btn {
        display: flex;
    }
    
    .model-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .model-title-section h1.model-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .model-description-section,
    .model-tags-section,
    .model-files-section,
    .model-usage-section {
        padding: 1.5rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .file-metadata {
        justify-content: flex-start;
    }
    
    .btn-download {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .search-input {
        font-size: 1rem;
        padding: 0.875rem 7rem 0.875rem 1rem;
    }
    
    .advanced-search-btn {
        right: 3.5rem;
        padding: 0.6rem;
    }
    
    .search-btn {
        padding: 0.6rem;
    }
    
    .search-suggestions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .suggestion-tag {
        text-align: center;
    }
    
    .model-actions {
        flex-direction: column;
    }
    
    .leaderboard-rank {
        font-size: 1.2rem;
        width: 2rem;
    }
    
    .leaderboard-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .advanced-search-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.5);
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .advanced-search-content {
        background: white;
        border-radius: var(--radius-lg);
        max-height: 90vh;
        overflow-y: auto;
        width: 100%;
        max-width: 400px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .model-detail-section {
        padding: 1rem;
    }
    
    .tools-list {
        justify-content: center;
    }
}

/* 动画优化 */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 