/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.logo i {
    font-size: 24px;
    color: #ff6b35;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-link,
.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.blog-link:hover,
.github-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 250px;
    height: calc(100vh - 60px);
    background: #2c3e50;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: #ecf0f1;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #3498db;
    color: #fff;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: #3498db;
    color: #fff;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

/* 主要内容区域 */
.main-content {
    margin-top: 60px;
    margin-left: 0;
    padding: 20px;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 60px);
    background: #fff;
}

.main-content.sidebar-open {
    margin-left: 250px;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* 网站卡片网格 */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.site-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e1e8ed;
}

.site-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.site-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #f8f9fa;
    color: #333;
    overflow: hidden;
}

.site-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.site-icon i {
    color: #666;
}

.site-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.site-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
}

/* 分类标题 */
.category-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .main-content.sidebar-open {
        margin-left: 0;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header {
        padding: 0 15px;
    }
    
    .logo span {
        display: none;
    }
    
    .header-right {
        gap: 5px;
    }
    
    .blog-link,
    .github-link {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 250px;
    }
    
    .sidebar-toggle {
        display: none;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #666;
    font-size: 18px;
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
} 