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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a0a0ae3;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

/* Header */
header {
    border-bottom: 1px solid #222;
    padding: 1.5rem 0;
    margin-bottom: 3rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #FF5964;
    text-decoration: none;
    transition: color 0.2s ease;
}

.logo a:hover {
    color: #FF8360;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: #7dd3fc;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #bae6fd;
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

/* Posts */
.post {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #1a1a1a;
}

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

.post-date {
    display: block;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.post-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-title a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: #ff6b9d;
}

.post-excerpt {
    color: #b0b0b0;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    color: #fbbf24;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #fcd34d;
}

/* Footer */
footer {
    border-top: 1px solid #222;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

footer p {
    color: #666;
    font-size: 0.9rem;
}

/* Syntax Highlighting Styles */
pre[class*="language-"] {
    background-color: #111;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
}

code[class*="language-"] {
    color: #e0e0e0;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    text-shadow: none;
}

/* Inline code */
:not(pre) > code {
    background-color: #1a1a1a;
    color: #7dd3fc;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
}

/* Syntax highlighting tokens */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6a737d;
}

.token.punctuation {
    color: #8c8c8c;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f97583;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #9ecbff;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #7dd3fc;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #ffa657;
}

.token.function,
.token.class-name {
    color: #b392f0;
}

.token.regex,
.token.important,
.token.variable {
    color: #ffab70;
}

/* Line numbers */
pre[class*="language-"].line-numbers {
    position: relative;
    padding-left: 3.8em;
    counter-reset: linenumber;
}

pre[class*="language-"].line-numbers > code {
    position: relative;
    white-space: inherit;
}

.line-numbers .line-numbers-rows {
    position: absolute;
    pointer-events: none;
    top: 0;
    font-size: 100%;
    left: -3.8em;
    width: 3em;
    letter-spacing: -1px;
    border-right: 1px solid #222;
    user-select: none;
    padding: 1.5rem 0;
}

.line-numbers-rows > span {
    display: block;
    counter-increment: linenumber;
}

.line-numbers-rows > span:before {
    content: counter(linenumber);
    color: #666;
    display: block;
    padding-right: 0.8em;
    text-align: right;
}

/* Language label */
pre[class*="language-"]::before {
    content: attr(data-language);
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    background-color: #222;
    color: #fbbf24;
    font-size: 0.75rem;
    border-radius: 3px;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    letter-spacing: 0.5px;
}

.copy-btn {
    position: absolute;
    top: 3rem;
    right: 0.5rem;
    background-color: #222;
    color: #fbbf24;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.copy-btn:hover {
    background-color: #333;
    color: #fcd34d;
}

.copy-btn.copied {
    background-color: #166534;
    color: #86efac;
    border-color: #166534;
}

/* Image lightbox */
.gallery-image {
    cursor: pointer;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    transition: opacity 0.2s ease;
}

.gallery-image:hover {
    opacity: 0.85;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: #ff6b9d;
}

/* Posts List Page */
.posts-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

.posts-list h1 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #ff6b9d;
}

.post-item {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #1a1a1a;
}

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

.post-item h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.post-item h2 a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-item h2 a:hover {
    color: #ff6b9d;
}

.post-item time {
    display: block;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.post-item .author {
    color: #7dd3fc;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.post-item .post-excerpt {
    color: #b0b0b0;
    line-height: 1.7;
    margin: 1rem 0;
}

.post-item .read-more {
    display: inline-block;
    color: #fbbf24;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
    margin-bottom: 1rem;
}

.post-item .read-more:hover {
    color: #fcd34d;
}

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

.post-item .tag {
    background-color: #1a1a1a;
    color: #fbbf24;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid #222;
}

.draft-badge {
    display: inline-block;
    background-color: #ff6b9d;
    color: #0a0a0a;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    text-transform: uppercase;
}

/* Pagination Styles */
.pagination {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #222;
}

.pagination-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.pagination-prev,
.pagination-next {
    color: #7dd3fc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid #222;
}

.pagination-prev:hover,
.pagination-next:hover {
    color: #bae6fd;
    background-color: #1a1a1a;
}

.pagination-prev.disabled,
.pagination-next.disabled {
    color: #444;
    cursor: not-allowed;
    border-color: #1a1a1a;
}

.pagination-info {
    color: #888;
    font-size: 0.9rem;
}

.pagination-numbers {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-number {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    color: #7dd3fc;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #222;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    text-align: center;
}

.pagination-number:hover {
    background-color: #1a1a1a;
    color: #bae6fd;
}

.pagination-number.active {
    background-color: #7dd3fc;
    color: #0a0a0a;
    font-weight: 600;
    border-color: #7dd3fc;
}

/* Individual Post Page */
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #222;
}

.post-header h1 {
    font-size: 2.5rem;
    color: #ff6b9d;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-header time {
    display: block;
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.post-header .author {
    color: #7dd3fc;
    font-size: 0.95rem;
}

.post-content {
    color: #b0b0b0;
    line-height: 1.8;
}

.post-content h2 {
    color: #e0e0e0;
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    color: #e0e0e0;
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

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

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

.post-content a {
    color: #7dd3fc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.post-content a:hover {
    color: #bae6fd;
    border-bottom-color: #7dd3fc;
}

.post-content code {
    background-color: #1a1a1a;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: block;
}

/* Callout Boxes */
.callout {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    border-left: 4px solid;
    background-color: #1a1a1a;
}

.callout-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.callout-content {
    flex: 1;
    color: #e0e0e0;
}

.callout-content p:last-child {
    margin-bottom: 0;
}

.callout-tip {
    border-left-color: #fbbf24;
    background-color: rgba(251, 191, 36, 0.1);
}

.callout-warning {
    border-left-color: #f97583;
    background-color: rgba(249, 117, 131, 0.1);
}

.callout-info {
    border-left-color: #7dd3fc;
    background-color: rgba(125, 211, 252, 0.1);
}

.callout-note {
    border-left-color: #b392f0;
    background-color: rgba(179, 146, 240, 0.1);
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #222;
}

.post-footer a {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-footer a:hover {
    color: #fcd34d;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content,
    .container,
    .posts-list {
        padding: 0 1.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    nav {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .post-title {
        font-size: 1.5rem;
    }

    pre {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .copy-btn {
        top: 0.3rem;
        right: 0.3rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .posts-list h1,
    .post-header h1 {
        font-size: 2rem;
    }

    .post-item h2 {
        font-size: 1.4rem;
    }

    .post-content h2 {
        font-size: 1.5rem;
    }

    .post-content h3 {
        font-size: 1.2rem;
    }

    .pagination-links {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .pagination-numbers {
        gap: 0.25rem;
    }

    .pagination-number {
        padding: 0.4rem 0.6rem;
        min-width: 2rem;
        font-size: 0.85rem;
    }
}