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

body {
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
    background-color: #0d1117;
    color: #f0f6fc;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: bold;
    color: #58a6ff;
    text-decoration: none;
}

.nav-logo:hover {
    color: #79c0ff;
}

.nav-search form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: #f0f6fc;
    font-family: inherit;
    font-size: 0.875rem;
    width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #58a6ff;
}

.search-btn {
    background-color: #238636;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}

.search-btn:hover {
    background-color: #2ea043;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
    width: 100%;
}

.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    color: #8b949e;
    cursor: pointer;
    transition: all 0.2s;
}

.tag:hover, .tag.active {
    background-color: #388bfd;
    border-color: #58a6ff;
    color: #fff;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-card {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.post-card:hover {
    border-color: #58a6ff;
}

.post-card h2 {
    font-size: 1.1rem;
    color: #f0f6fc;
    margin-bottom: 0.5rem;
}

.post-card .meta {
    font-size: 0.8rem;
    color: #8b949e;
    display: flex;
    gap: 1rem;
}

.post-card .tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.post-card .tag {
    cursor: default;
}

.post-card .snippet {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #8b949e;
    white-space: pre;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.2em;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: #f0f6fc;
    font-family: inherit;
    cursor: pointer;
}

.pagination button:hover:not(:disabled) {
    border-color: #58a6ff;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.back-link {
    color: #58a6ff;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.back-link:hover {
    color: #79c0ff;
}

.post-detail {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 2rem;
}

.post-detail h1 {
    font-size: 1.5rem;
    color: #f0f6fc;
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #30363d;
}

.post-detail .meta {
    font-size: 0.85rem;
    color: #8b949e;
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.post-detail .content {
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}

.footer {
    text-align: center;
    padding: 2rem 0;
    color: #8b949e;
    font-size: 0.8rem;
    border-top: 1px solid #30363d;
}

.empty-state {
    text-align: center;
    color: #8b949e;
    padding: 3rem 0;
}

@media (max-width: 600px) {
    .nav-search form {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .post-card .meta {
        flex-direction: column;
        gap: 0.25rem;
    }
}