/* ChatGPT-like styling */
body {
    font-family: 'Söhne', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica', 'Arial', sans-serif;
    background: #f7f7f8;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #10a37f 0%, #1a7f64 100%);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Table of Contents */
.table-of-contents {
    position: fixed;
    top: 120px;
    right: 2rem;
    width: 280px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.3s ease;
    z-index: 100;
}

.table-of-contents.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.table-of-contents h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-link {
    display: block;
    color: #6e6e80;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.toc-link:hover {
    color: #10a37f;
    border-left-color: #10a37f;
    background: #f0fdf4;
    border-radius: 0 4px 4px 0;
}

.toc-link.active {
    color: #10a37f;
    font-weight: 600;
    border-left-color: #10a37f;
    background: #f0fdf4;
    border-radius: 0 4px 4px 0;
}

.toc-item.level-3 .toc-link {
    padding-left: 1.5rem;
    font-size: 0.8125rem;
}

/* Social Share Bar */
.social-share-bar {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.social-share-bar.visible {
    opacity: 1;
    visibility: visible;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.share-btn i {
    font-size: 1.25rem;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.linkedin {
    background: #0077B5;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.copy-link {
    background: #6e6e80;
}

.share-btn.copy-link.copied {
    background: #10a37f;
}

.post-container {
    max-width: 48rem;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    background: white;
    min-height: 100vh;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .post-title {
        font-size: 1.75rem;
    }
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: #6e6e80;
    font-size: 0.875rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
    animation: slideInRight 0.6s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.post-meta i {
    font-size: 0.875rem;
}

.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: #f0f0f0;
    border-radius: 12px;
    font-weight: 500;
    color: #5a5a5a;
}

.admin-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-actions .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.admin-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Content styling */
.post-content {
    color: #374151;
    font-size: 1.0625rem;
    line-height: 1.8;
    animation: fadeIn 0.8s ease;
}

.post-content::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    float: left;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
    color: #10a37f;
}

.post-content h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #10a37f;
    position: relative;
    scroll-margin-top: 100px;
}

.post-content h1 .heading-anchor,
.post-content h2 .heading-anchor,
.post-content h3 .heading-anchor {
    opacity: 0;
    margin-left: 0.5rem;
    color: #10a37f;
    text-decoration: none;
    transition: opacity 0.2s ease;
    font-weight: 400;
}

.post-content h1:hover .heading-anchor,
.post-content h2:hover .heading-anchor,
.post-content h3:hover .heading-anchor {
    opacity: 1;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding-left: 1rem;
    scroll-margin-top: 100px;
}

.post-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10a37f 0%, #1a7f64 100%);
    border-radius: 2px;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
    scroll-margin-top: 100px;
}

.post-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.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.75rem;
    line-height: 1.8;
}

.post-content ul li {
    position: relative;
    list-style-type: disc !important;
}

/* Remove any custom bullets from styles.css */
.post-content ul li::before {
    display: none !important;
}

.post-content ul li::marker {
    color: #10a37f;
    font-size: 1.2em;
}

.post-content ol li {
    list-style-type: decimal !important;
}

.post-content ol li::marker {
    color: #10a37f;
    font-weight: 600;
}

.post-content strong {
    font-weight: 600;
    color: #202123;
}

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

.post-content a:hover {
    border-bottom-color: #10a37f;
    color: #0d8968;
}

.post-content blockquote {
    border-left: 4px solid #10a37f;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f0fdf4;
    border-radius: 0 8px 8px 0;
    color: #374151;
    font-style: italic;
    position: relative;
}

.post-content blockquote::before {
    content: '❝';
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-size: 3rem;
    color: #10a37f;
    opacity: 0.3;
    line-height: 1;
}

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

/* Inline code */
.post-content :not(pre) > code {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.875em;
    font-weight: 600;
    border: 1px solid #fbbf24;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Code blocks - ChatGPT style */
.code-block-wrapper {
    position: relative;
    margin: 2rem 0;
    border-radius: 12px;
    background: #F7F7F8 !important;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.code-block-wrapper:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #F7F7F8 !important;
    background-image: none !important;
    border-bottom: 1px solid #ECECF1;
}

.code-language {
    color: #565869;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: lowercase;
    font-family: 'SF Mono', monospace;
}

.copy-button {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    border: 1px solid #C5C5D2;
    color: #565869;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.copy-button:hover {
    background: #FFFFFF;
    border-color: #8E8EA0;
}

.copy-button.copied {
    background: #19C37D;
    border-color: #19C37D;
    color: white;
}

.copy-button svg {
    width: 16px;
    height: 16px;
}

.code-block-wrapper pre {
    margin: 0 !important;
    padding: 1rem !important;
    background: #F7F7F8 !important;
    border-radius: 0 !important;
    overflow-x: auto;
}

.code-block-wrapper pre[class*="language-"] {
    background: #F7F7F8 !important;
    box-shadow: none !important;
}

.code-block-wrapper pre[class*="language-"]::before,
.code-block-wrapper pre[class*="language-"]::after {
    display: none !important;
}

.code-block-wrapper code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace !important;
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    color: #1F2328 !important;
    background: transparent !important;
}

/* Remove any weird token backgrounds */
.code-block-wrapper .token {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.code-block-wrapper .token.tag,
.code-block-wrapper .token.attr-name,
.code-block-wrapper .token.namespace,
.code-block-wrapper .token.deleted {
    background: transparent !important;
    border: none !important;
}

/* Prism syntax highlighting - ChatGPT Light theme */
.code-block-wrapper .token.comment,
.code-block-wrapper .token.prolog,
.code-block-wrapper .token.doctype,
.code-block-wrapper .token.cdata {
    color: #6A737D;
    font-style: italic;
}

.code-block-wrapper .token.punctuation {
    color: #24292F;
}

.code-block-wrapper .token.property,
.code-block-wrapper .token.tag,
.code-block-wrapper .token.boolean,
.code-block-wrapper .token.number,
.code-block-wrapper .token.constant,
.code-block-wrapper .token.symbol,
.code-block-wrapper .token.deleted {
    color: #0550AE;
}

.code-block-wrapper .token.selector,
.code-block-wrapper .token.attr-name,
.code-block-wrapper .token.string,
.code-block-wrapper .token.char,
.code-block-wrapper .token.builtin,
.code-block-wrapper .token.inserted {
    color: #0A3069;
}

.code-block-wrapper .token.operator,
.code-block-wrapper .token.entity,
.code-block-wrapper .token.url,
.code-block-wrapper .language-css .token.string,
.code-block-wrapper .style .token.string {
    color: #CF222E;
}

.code-block-wrapper .token.atrule,
.code-block-wrapper .token.attr-value,
.code-block-wrapper .token.keyword {
    color: #CF222E;
    font-weight: 600;
}

.code-block-wrapper .token.function,
.code-block-wrapper .token.class-name {
    color: #8250DF;
    font-weight: 500;
}

.code-block-wrapper .token.regex,
.code-block-wrapper .token.important,
.code-block-wrapper .token.variable {
    color: #953800;
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: zoom-in;
}

.post-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.post-content figure {
    margin: 1.5rem 0;
}

.post-content figcaption {
    text-align: center;
    color: #6e6e80;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Featured media */
.featured-media-container {
    margin: 2.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    animation: scaleIn 0.6s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.featured-media-container img {
    width: 100%;
    display: block;
    margin: 0;
    transition: transform 0.5s ease;
}

.featured-media-container:hover img {
    transform: scale(1.05);
}

.featured-media-container video {
    display: block;
    width: 100%;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: #10a37f;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.4);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0d8968;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(16, 163, 127, 0.5);
}

.back-to-top i {
    font-size: 1.25rem;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: #10a37f;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 1280px) {
    .table-of-contents {
        display: none;
    }
    
    .social-share-bar {
        display: none;
    }
}

@media (max-width: 768px) {
    .post-container {
        padding: 2rem 1rem;
    }
    
    .post-content::first-letter {
        font-size: 2.5rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
    
    .post-title {
        font-size: 1.75rem;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .reading-progress {
        height: 3px;
    }
}

/* Print styles */
@media print {
    .reading-progress,
    .table-of-contents,
    .social-share-bar,
    .back-to-top,
    .admin-actions,
    .copy-button {
        display: none !important;
    }
    
    .post-container {
        max-width: 100%;
        padding: 0;
    }
    
    .post-content {
        color: #000;
    }
}
