﻿:root {
    --primary: #1a3c6e;
    --bg: #f4f6f9;
    --card: #fff;
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, "Microsoft YaHei", sans-serif;
    background: var(--bg);
}
/* Header */
.header {
    background: var(--primary);
    color: #fff;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    font-size: 20px;
    font-weight: 600;
}

.search-wrap {
    flex: 1;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

    .search-wrap svg {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
    }

#search {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    outline: none;
    background: rgba(255,255,255,.18);
    color: #fff;
    transition: background .2s;
}

    #search::placeholder {
        color: rgba(255,255,255,.65);
    }

    #search:focus {
        background: rgba(255,255,255,.28);
    }

.search-info {
    color: rgba(255,255,255,.7);
    font-size: 13px;
    white-space: nowrap;
}
/* Layout */ .layout {
    display: flex;
    max-width: 1440px;
    margin: 0 auto;
}
/* Sidebar */
.sidebar {
    width: 200px;
    min-width: 200px;
    background: #fff;
    border-right: 1px solid #eee;
    padding: 24px 0;
}

    .sidebar a {
        display: block;
        padding: 10px 20px;
        font-size: 14px;
        color: #333;
        text-decoration: none;
        cursor: pointer;
    }

        .sidebar a.active, .sidebar a:hover {
            background: #f0f5ff;
            color: var(--primary);
        }

.sidebar-title {
    padding: 0 20px 12px;
    font-size: 13px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* Main */ .main {
    flex: 1;
    padding: 32px;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    margin: 24px 0 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
}

    .card h3 {
        margin: 0 0 6px;
        font-size: 15px;
    }

    .card p {
        font-size: 13px;
        color: #666;
    }

.tags {
    margin-top: 8px;
}

.tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f5ff;
    color: var(--primary);
    margin-right: 4px;
}

.no-result {
    text-align: center;
    padding: 60px;
    color: #aaa;
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }

    .sidebar-title {
        display: none;
    }
}
