/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
}

/* ========== 布局容器 ========== */
.container {
    display: flex;
    height: 100vh;
}

/* ========== 侧边栏 ========== */
.sidebar {
    width: 220px;
    background: #2c3e50;
    color: white;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h1 {
    font-size: 20px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    background: #3498db;
}

/* ========== 主内容区 ========== */
.content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

/* ========== 工具列表 ========== */
.tool-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.tool-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.tool-card .icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.tool-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #2c3e50;
}

.tool-card p {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
}

/* ========== 工具详情页 ========== */
.tool-page {
    max-width: 1200px;
}

.back-btn {
    padding: 10px 20px;
    background: #ecf0f1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: #bdc3c7;
}

.tool-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        padding: 15px;
    }
    .content {
        padding: 20px;
    }
}
