:root {
    --bg: #fafafa;
    --bg-card: #fff;
    --text: #1a1a1a;
    --text-muted: #888;
    --border: #ddd;
    --border-light: #eee;
    --sidebar-bg: #fff;
    --hover-bg: #f5f5f5;
    --link: #1a6fcc;
    --link-hover: #0d4a7a;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --bg-card: #1e1e1e;
        --text: #e0e0e0;
        --text-muted: #888;
        --border: #333;
        --border-light: #2a2a2a;
        --sidebar-bg: #1e1e1e;
        --hover-bg: #2a2a2a;
        --link: #6db3f2;
        --link-hover: #9dcafc;
    }
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: var(--text);
    background: var(--bg);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

header h1 a {
    color: inherit;
    text-decoration: none;
}

.hamburger {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    color: var(--text);
}

.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--sidebar-bg);
    box-shadow: -2px 0 8px rgba(0,0,0,0.3);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

.sidebar ul {
    list-style: none;
}

.sidebar li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
}

.sidebar li a:hover {
    background: var(--hover-bg);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.overlay.show {
    display: block;
}

.news-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.news-item h2 a {
    color: inherit;
    text-decoration: none;
}

.news-item h2 a:hover {
    text-decoration: underline;
}

time {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.content img, .excerpt img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.content video, .excerpt video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.excerpt {
    margin-top: 0.5rem;
}

footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
}

.content {
    margin-top: 1rem;
}

.content p,
.excerpt p {
    margin-bottom: 1em;
}

.content a,
.excerpt a {
    color: var(--link);
}

.content a:hover,
.excerpt a:hover {
    color: var(--link-hover);
}

.content ul, .content ol,
.excerpt ul, .excerpt ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.content li,
.excerpt li {
    margin-bottom: 0.25em;
}

.content blockquote,
.excerpt blockquote {
    margin: 0 0 1em;
    padding: 0.5em 1em;
    border-left: 3px solid var(--border);
    color: var(--text-muted);
}

.content pre,
.excerpt pre {
    margin-bottom: 1em;
    padding: 1rem;
    background: var(--border-light);
    border-radius: 4px;
    overflow-x: auto;
}

.content code,
.excerpt code {
    background: var(--border-light);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.875em;
}

.content pre code,
.excerpt pre code {
    background: none;
    padding: 0;
}

.content hr,
.excerpt hr {
    margin: 1.5em 0;
    border: none;
    border-top: 1px solid var(--border);
}

.content table,
.excerpt table {
    width: 100%;
    margin-bottom: 1em;
    border-collapse: collapse;
}

.content th, .content td,
.excerpt th, .excerpt td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}

.content th,
.excerpt th {
    background: var(--border-light);
    font-weight: 600;
}

.content h1, .content h2, .content h3,
.content h4, .content h5, .content h6,
.excerpt h1, .excerpt h2, .excerpt h3,
.excerpt h4, .excerpt h5, .excerpt h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.categories {
    margin-top: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.category-tag {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    background: var(--border-light);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.category-tag:hover {
    background: var(--border);
    color: var(--text);
}
