/* Blog styles */

/* Blog list page */
.blog-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-list h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.blog-preview {
    display: block;
    text-decoration: none;
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.blog-preview:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    text-decoration: none;
}

.blog-preview h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.post-meta {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.post-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 10px;
}

.no-posts {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 0;
}

/* Blog post page */
.blog-post {
    max-width: 800px;
    margin: 2rem auto;
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 2rem;
}

.post-header {
    margin-bottom: 25px;
}

.post-title {
    font-size: 2rem;
    color: var(--accent-color);
}

.post-content {
    color: var(--text-primary);
    line-height: 1.6;
}

.post-content h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

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

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--accent-color);
}

.post-content h3,
.post-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--accent-color);
}

.post-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-content a {
    color: #0969da;
    text-decoration: none;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.2em;
    padding-left: 2em;
}

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

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1em 0;
}

.post-content code {
    font-family: monospace;
    background-color: var(--bg-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

.post-content table {
    border-collapse: collapse;
}

.post-content th,
.post-content td {
    padding: 5px 10px;
    text-align: left;
}

.post-content thead {
    border-bottom: 2px solid var(--border-color, #e0e0e0);
}

.post-content tr {
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.post-content tr:last-child {
    border-bottom: none;
}

.language-javascript, .language-html, .language-css {
    padding-left: 0 !important;
    padding-top: 15px !important;
}

.line-numbers .line-numbers-rows {
    padding: 1em 0;
}

.post-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Book Recommendations Styles */
.book-recommendations {
    margin: 30px 0;
}

.book {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.book:last-child {
    border-bottom: none;
}

.book-details {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.book-cover {
    flex: 0 0 200px;
}

.book-cover img {
    max-width: 100%;
    border: 1px solid #ddd;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}

.book-info {
    flex: 1;
}

.purchase-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.purchase-link:hover {
    background-color: #45a049;
}

@media (max-width: 768px) {
    .book-details {
        flex-direction: column;
    }
    
    .book-cover {
        flex: 0 0 auto;
        margin-bottom: 20px;
    }
}

.post-like-row {
  margin: 2em 0 1em 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5em;
  flex-wrap: nowrap;
}

.post-like-row > .like-btn,
.post-like-row > .like-count {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Prism code block header styles */
.code-header {
    background: #393939;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 1em;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    font-size: 0.95em;
}

.code-lang {
    font-family: monospace;
    font-size: 0.95em;
    opacity: 0.7;
}

.code-copy {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 0.95em;
    transition: color 0.2s;
}

.code-copy:hover {
    color: #fff;
}

pre[class*="language-"] {
    margin-top: 0 !important;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

hr {
    margin-top: 35px;
}
