:root {
    --primary: #2563eb;
    --secondary: #1e40af;
    --dark: #0f172a;
    --light: #f1f5f9;
    --accent: #f59e0b;
    --gray: #64748b;
    --light-gray: #cbd5e1;
    --sidebar-bg: #0f0c29;
    --sidebar-active: rgba(37, 99, 235, 0.2);
    --content-bg: #f0f2f5;
    --card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--content-bg);
    color: #333;
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 360px;
    background: linear-gradient(135deg, var(--dark), #1e293b);
    color: white;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    color: var(--primary);
}

.logo i {
    color: var(--accent);
}

.logo .logo-img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    vertical-align: middle;
    object-fit: contain;
    border-radius: 4px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}


.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* 修改点：背景透明 + 添加白色边框 */
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3); /* 半透明白色边框 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background-size: cover;
    background-position: center;
    /* 修改点：文字颜色改为白色确保可读性 */
    color: white;
}

.user-details p {
    background-color: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
}

.user-details h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.user-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-value {
    font-weight: bold;
    color: var(--accent);
}

.sidebar-menu {
    padding: 0 20px;
}

.menu-group {
    margin-bottom: 25px;
}

.menu-group-title {
    font-size: 14px;
    color: var(--light-gray);
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: rgba(255, 255, 255, 0.8);
}

.menu-item:hover {
    background: var(--sidebar-active);
    color: white;
}

.menu-item.active {
    background: var(--sidebar-active);
    color: white;
    font-weight: 500;
    border-left: 3px solid var(--primary);
}

.menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.menu-item .badge {
    margin-left: auto;
    background: var(--accent);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.footer-title {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--light-gray);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 0 20px 20px; /* 添加左内边距避免被左边栏压住 */
    margin-top: 0; /* 移除默认顶部外边距 */
}

/* 顶部工具栏 */
.topbar {
    background-color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--light);
    border-radius: 30px;
    padding: 10px 15px;
    width: 600px;
}

.search-bar input {
    border: none;
    background: transparent;
    padding: 0 10px;
    font-size: 14px;
    width: 100%;
    outline: none;
}

.search-bar i {
    color: var(--gray);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--gray);
    gap: 10px;
}

.loading-spinner {
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.error-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.category {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category.active {
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.categories {
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--light-gray) var(--light);
}

.categories::-webkit-scrollbar {
    height: 8px;
}

.categories::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 4px;
}

.categories::-webkit-scrollbar-thumb {
    background-color: var(--light-gray);
    border-radius: 4px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light);
    cursor: pointer;
    transition: all 0.3s;
}

.action-icon:hover {
    background: var(--light-gray);
}

.content {
    padding: 30px;
    flex: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.model-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.model-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--gray);
    font-size: 14px;
}



.model-stats {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 15px;
}

.model-actions {
    display: flex;
    gap: 10px;
}

.model-btn {
    flex: 1;
    background: var(--light);
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.model-btn.primary {
    background: var(--primary);
    color: white;
}

.model-btn:hover {
    background: var(--light-gray);
}

.model-btn.primary:hover {
    background: var(--secondary);
}

/* 模型分类 */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.category {
    background: var(--light);
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.category:hover, .category.active {
    background: var(--primary);
    color: white;
}

.model-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.model-image {
    height: 300px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (min-width: 768px) {
    .model-image {
        height: 380px;
    }
}

@media (min-width: 1200px) {
    .model-image {
        height: 480px;
    }
}

.model-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.model-info {
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.model-title {
    font-size: 14px;
    line-height: 1.2;
}

.model-author {
    font-size: 12px;
}

.model-stats {
    font-size: 11px;
    border-top: 1px solid var(--light);
    padding-top: 5px;
    margin-top: 5px;
}



.model-actions {
    display: none;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    grid-auto-rows: 1fr;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 移动端元素 */
.mobile-menu-toggle {
    display: none;
    padding: 15px;
    text-align: center;
    color: white;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle i {
    font-size: 20px;
}

/* 移动端统计信息 */
.mobile-stats {
    display: none;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 0 10px 15px; /* 修复：顶部0, 左右10px, 底部15px */
    flex-wrap: wrap;
}

.mobile-stat-item {
    text-align: center;
    padding: 8px;
    font-size: 13px;
}

.mobile-stat-item div:first-child {
    color: var(--light-gray);
    margin-bottom: 5px;
}

.mobile-stat-item div:last-child {
    font-weight: bold;
    color: var(--accent);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .sidebar {
        width: 240px;
    }
    
    .search-bar {
        width: 300px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 70px;
        overflow: visible;
    }
    
    .sidebar-header, .user-info, .user-details, .stat-name, 
    .menu-group-title, .menu-item span, .sidebar-footer {
        display: none;
    }
    
    .menu-item {
        padding: 15px;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .menu-item i {
        margin: 0;
        font-size: 20px;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* 修正点：在移动端媒体查询中 */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    /* 隐藏桌面端用户信息和统计信息 */
    .user-info, 
    .user-stats,
    .sidebar-footer {
        display: none;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 10px;
        display: flex;
        flex-direction: column;
    }
    
    .sidebar-header {
        display: flex;
        align-items: center;
        padding: 10px;
        order: 1;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 10px 0;
        order: 2;
    }

    /* 显示移动端元素 */
    .mobile-menu-toggle {
        display: block;
        order: 3;
    }

    .mobile-stats {
        order: 4;
        display: flex;
        justify-content: space-between;
        margin: 0 10px 15px;
    }
    
    .logo {
        margin: 0;
        flex: 1;
    }
    
    .menu-group {
        display: flex;
        margin: 0;
    }
    
    .menu-item {
        margin: 0 5px;
        white-space: nowrap;
    }
   
    .mobile-stat-item {
        flex: 1;
        min-width: 45%;
        margin: 5px;
    }

    .model-card {
        min-height: 250px;
    }
    
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .topbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .search-bar {
        width: 100%;
    }
}



























.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    padding-top: 25px; /* 添加顶部内边距避免顶到最上面 */
    gap: 30px; /* 增加卡片间距 */
}

.github-card {
    background: #ffffff; /* 改为纯白色背景 */
    border: 1px solid #e5e7eb; /* 添加浅灰色边框 */
    border-radius: 16px;
    padding: 25px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 更柔和的阴影 */
    border: 1px solid rgba(74, 85, 104, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    margin-bottom: 15px; /* 卡片底部间距 */
}

.github-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: rgba(99, 102, 241, 0.5);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;

    border-bottom: 1px solid #f0f2f5; /* 添加分隔线 */
    padding-bottom: 15px;
}

.avatar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.author-name {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.last-update {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.recommended {
    background: linear-gradient(135deg, #f59e0b, #ff9e6d);
    color: #1e293b;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    margin-left: 15px;
    letter-spacing: 1px;
}

.repo-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    margin-top: 5px;
    margin-bottom: 20px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-middle {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.data-box {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.data-box .label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.data-box .value {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
}

.runtime .value {
    color: #60a5fa;
}

.rank .value {
    color: #8b5cf6;
}

.github-stars .value {
    color: #f59e0b;
}

.gpu {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    padding: 15px 0;
    line-height: 1.6;
    margin-bottom: 15px;
    border-top: 1px solid rgba(74, 85, 104, 0.4);
    border-bottom: 1px solid rgba(74, 85, 104, 0.4);
}

.card-stats {
    display: flex;
    gap: 30px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    width: 20px;
    height: 20px;
    fill: #94a3b8;
}

.stat span {
    font-size: 15px;
    color: white;
    font-weight: 500;
}

.footer {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 30px 0;
    margin-top: 20px;
    border-top: 1px solid rgba(74, 85, 104, 0.4);
}

.repo-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #60a5fa, #8b5cf6);
    border-radius: 3px;
}

.actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
}

.action-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(74, 85, 104, 0.5);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(79, 70, 229, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}


/* 调整文字颜色为深色 */
.github-card .repo-name,
.github-card .gpu,
.github-card .author-name,
.github-card .data-box .value,
.github-card .stat span {
  color: #1f2937; /* 深灰色文字 */
}

/* 调整辅助文字颜色 */
.github-card .last-update,
.github-card .data-box .label,
.github-card .stat-icon {
  color: #6b7280; /* 中灰色文字 */
}

/* 调整数据框样式 */
.data-box {
  background: #f9fafb; /* 浅灰色背景 */
  border: 1px solid #e5e7eb; /* 浅灰色边框 */
}

/* 调整推荐标签样式 */
.recommended {
  background: linear-gradient(135deg, #fef3c7, #fcd34d); /* 浅黄色渐变 */
  color: #92400e; /* 深棕色文字 */
}

/* 调整操作按钮样式 */
.action-btn {
  background: #f3f4f6; /* 浅灰色背景 */
  color: #4b5563; /* 中灰色图标 */
  border: 1px solid #e5e7eb; /* 浅灰色边框 */
}

.action-btn:hover {
  background: #e5e7eb; /* 鼠标悬停时稍深的灰色 */
}

/* 调整分隔线颜色 */
.gpu {
  /* border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb; */

  color: #4b5563; /* 中等灰色文字更易读 */
  line-height: 1.6;
  font-size: 15px;
  margin-bottom: 20px;
}











/* 节点状态样式 */
.node-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.node-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.node-status.online {
    background-color: #10b981;
    color: white;
}

.node-status.busy {
    background-color: #f59e0b;
    color: white;
}

.node-status.offline {
    background-color: #64748b;
    color: white;
}

/* 时间戳样式 */
.timestamps {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

/* 收入信息样式 */
.income-info {
    padding: 12px 15px;
    background: #f3f4f6;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.income-label {
    color: #6b7280;
}

.income-value {
    font-size: 18px;
}

.income-value.high-income {
    color: #10b981;
}

.income-value.medium-income {
    color: #f59e0b;
}

.income-value.low-income {
    color: #ef4444;
}

/* 调整顶部布局 */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f2f5;
}



/* GPU图标样式 */
.icon-gpu {
    margin-right: 8px;
    font-size: 16px;
}

/* 使用自定义图标 */
.icon-gpu.custom {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url('path/to/your-icon.png'); /* 替换为您的图标路径 */
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}










/* 关键数字突出样式 */
.highlight-number {
    font-weight: 800;
    font-size: 18px;
    color: #1e40af;
    text-shadow: 0px 1px 1px rgba(0,0,0,0.1);
}

.blue-highlight {
    background: linear-gradient(transparent 60%, rgba(59, 130, 246, 0.3) 40%);
    padding: 0 2px;
}

/* 状态标签增强 */
.status-highlight {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2px 10px;
    border-radius: 12px;
    display: inline-block;
}

/* 时间信息增强 */
.time-highlight {
    font-weight: 600;
    color: #374151;
    position: relative;
    padding-left: 20px;
}

.time-highlight::before {
    content: "⏱";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

/* 任务数量增强 */
.task-count {
    position: relative;
    display: inline-block;
}

.task-count::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #a855f7);
    border-radius: 2px;
}

/* IP地址增强 */
.ip-highlight {
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
}

.ip-highlight::before {
    content: "🌐";
    margin-right: 6px;
    font-size: 16px;
    vertical-align: baseline;
}

/* UUID增强 */
.uuid-highlight {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #4b5563;
    background: #f9fafb;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    display: block;
    margin-top: 8px;
}

/* GPU型号增强 */
.gpu-model-highlight {
    font-weight: 700;
    color: #1e40af;
    display: inline-block;
    padding-right: 4px;
}