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

body {
    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif;
    background-color: #f7f8fa;
    color: #333;
    line-height: 1.5;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 280px;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,.02);
    border-right: 1px solid #f0f0f0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.logo h1 {
    color: #1a1a1a;
    font-size: 22px;
    font-weight: 600;
}

.category-menu {
    margin-top: 20px;
}

.category-menu ul {
    list-style: none;
}

.category-menu li {
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.category-menu li:hover {
    background-color: #f5f7fa;
    color: #165dff;
}

.category-menu li.active {
    background-color: #e8f3ff;
    color: #165dff;
    font-weight: 500;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 24px 32px;
}

.search-bar {
    margin: 20px 0;
    display: flex;
    gap: 12px;
    max-width: 800px;
}

#searchInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #165dff;
    box-shadow: 0 0 0 2px rgba(22,93,255,.1);
}

#searchBtn {
    padding: 12px 24px;
    background-color: #165dff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#searchBtn:hover {
    background-color: #0e4bcc;
}

/* 网站卡片样式 */
.sites-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.site-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid #e5e6eb;
}

.site-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

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

.site-icon {
    width: 36px;
    height: 36px;
    margin-right: 12px;
    border-radius: 8px;
}

.site-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.site-desc {
    color: #86909c;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.site-link {
    color: #165dff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.site-link:hover {
    color: #0e4bcc;
}

/* 主内容区底部链接样式 */
.main-footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.main-footer a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: #165dff;
}

/* 修改顶部标题栏样式 */
.main-header {
    display: none;
    background: #fff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    border-bottom: 1px solid #f0f0f0;
    z-index: 997;
}

.header-container {
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* 修改菜单按钮样式 */
.mobile-menu-btn {
    display: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s ease;
}

.mobile-menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 菜单按钮动画效果 */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 修改移动端样式 */
@media screen and (max-width: 768px) {
    .main-header {
        display: block;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    
    .overlay.active {
        display: block;
    }
} 