/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Theme variables */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --secondary-color: #6b7280;
    --hover-color: #2563eb;
    --secondary-color-rgb: 107, 114, 128;
}

/* Dark theme variables */
.dark-theme {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --secondary-color: #9ca3af;
    --hover-color: #60a5fa;
    --secondary-color-rgb: 156, 163, 175;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Header styles */
header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--secondary-color);
}

/* Post container styles */
.posts-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Post card styles */
.post-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
}

.post-card h2 {
    margin-bottom: 1rem;
}

.post-card a {
    color: var(--text-color);
    text-decoration: none;
}

.post-card a:hover {
    color: var(--hover-color);
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--bg-color);
}

.theme-toggle .sun {
    display: none;
}

.dark-theme .theme-toggle .moon {
    display: none;
}

.dark-theme .theme-toggle .sun {
    display: block;
}

/* Post popup styles */
.post-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.post-popup-content {
    background: var(--bg-color);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.post-popup-content::-webkit-scrollbar {
    display: none;
}

.post-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.post-content {
    line-height: 1.8;
}

.post-content h1 {
    font-size: 2.5rem;
    margin: 1.5rem 0;
}

.post-content h2 {
    font-size: 2rem;
    margin: 1.2rem 0;
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 1rem 0;
}

.post-content p {
    margin: 1rem 0;
}

.post-content ul, .post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

/* Code blocks and inline code */
.post-content code {
    font-family: monospace;
    background: var(--secondary-color);
    color: var(--bg-color);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--secondary-color);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: var(--bg-color);
}

/* Blockquotes */
.post-content blockquote {
    border-left: 4px solid var(--secondary-color);
    margin: 1rem 0;
    padding: 0.5rem 0 0.5rem 1rem;
    font-style: italic;
    background: rgba(var(--secondary-color-rgb), 0.1);
} 