/* ===========================
   Post Page Styles
   =========================== */

/* Image Gallery Layout Styles */
.image-gallery {
    margin: 10px 0;
    clear: both;
    contain: layout;
    display: block;
    width: 100%;
}

/* 2열 레이아웃 */
.image-gallery.layout-double {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.image-gallery.layout-double > img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-gallery.layout-double > img:hover {
    transform: scale(1.02);
}

/* 3열 레이아웃 */
.image-gallery.layout-triple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.image-gallery.layout-triple > img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-gallery.layout-triple > img:hover {
    transform: scale(1.02);
}

/* 퍼즐/메이슨리 레이아웃 */
.image-gallery.layout-masonry {
    display: grid;
    gap: 10px;
    aspect-ratio: 1;
    max-width: 600px;
    margin: 20px auto;
}

.image-gallery.layout-masonry.puzzle-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.image-gallery.layout-masonry.puzzle-5 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.image-gallery.layout-masonry.puzzle-5 .puzzle-item-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
}

.image-gallery.layout-masonry.puzzle-5 .puzzle-item-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.image-gallery.layout-masonry.puzzle-5 .puzzle-item-3 {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

.image-gallery.layout-masonry.puzzle-5 .puzzle-item-4 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.image-gallery.layout-masonry.puzzle-5 .puzzle-item-5 {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.puzzle-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
    height: 100%;
}

.puzzle-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
}

.puzzle-item:hover img {
    transform: scale(1.05);
}


/* 슬라이더 레이아웃 */
.image-gallery.layout-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 500px;
    height: 70vh;
    max-height: 700px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
    transform: translateX(0);
}

.slider-image-wrapper {
    min-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px 15px;
    cursor: pointer;
    font-size: 28px;
    transition: all 0.3s;
    z-index: 100;
    border-radius: 5px;
    font-weight: bold;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev { left: 20px; }
.slider-nav.next { right: 20px; }

.slider-controls,
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    padding: 0;
}

.slider-dot.active,
.slider-dot:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Link Preview 스타일 */
.link-preview {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px;
    margin: 15px 0;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    max-width: 100%;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    user-select: none;
}

.link-preview:hover {
    background: rgba(255,255,255,0.08);
}

.link-preview * {
    pointer-events: none;
}

.link-preview img {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 !important;
}

.preview-content {
    flex: 1;
    overflow: hidden;
    word-wrap: break-word;
}

.preview-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-description {
    color: rgba(255,255,255,0.7);
    font-size: 0.9em;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 이미지 크기 제한 */
.post-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 10px auto;
}

/* 라이트박스 */
.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
}

.image-lightbox.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: #ff4757;
}

/* Post specific styles */
.post-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 20px 50px;
}

/* Table of Contents */
.table-of-contents {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.toc-header svg {
    width: 20px;
    height: 20px;
    stroke: #667eea;
    opacity: 0.8;
}

.toc-title {
    margin: 0;
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 600;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    font-size: 0.95rem;
}

.toc-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #fff;
    transform: translateX(4px);
}

.toc-link.active {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    font-weight: 600;
}

.toc-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #667eea;
    border-radius: 2px;
}

/* H2 목차 항목 */
.toc-link.toc-h2 {
    padding-left: 20px;
}

.toc-link.toc-h2::before {
    content: '▸';
    position: absolute;
    left: 8px;
    color: #667eea;
    opacity: 0.6;
}

/* H3 목차 항목 - 들여쓰기 */
.toc-link.toc-h3 {
    padding-left: 40px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.toc-link.toc-h3::before {
    content: '◦';
    position: absolute;
    left: 28px;
    color: #667eea;
    opacity: 0.4;
}

.toc-link.toc-h3:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Heading anchor styling */
.post-content h2[id],
.post-content h3[id] {
    scroll-margin-top: 80px; /* Account for fixed navbar */
    position: relative;
}

.post-content h2[id]:hover::before,
.post-content h3[id]:hover::before {
    content: '#';
    position: absolute;
    left: -20px;
    color: #667eea;
    opacity: 0.5;
}

/* Post Header Styles - Refactored from inline styles */
.post-header {
    display: block !important;
    margin-bottom: 30px !important;
    border: none !important;
    padding-bottom: 0 !important;
}

.post-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    display: block !important;
    width: 100% !important;
}

/* Contact type prefix style */
.post-title-prefix {
    background: linear-gradient(135deg, #ff6b6b, #ff8787) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 0.8em !important;
}

.post-meta {
    display: flex !important;
    gap: 20px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.9rem !important;
    flex-wrap: wrap !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 0 !important;
    width: 100% !important;
}

.post-meta-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.post-meta-icon {
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
}

.post-meta-actions {
    margin-left: auto !important;
    display: flex;
    gap: 8px;
}

.post-content {
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    margin-bottom: 40px;
}

.post-content h2 {
    margin: 25px 0 12px;
    font-size: 1.8rem;
    color: #fff;
}

.post-content h3 {
    margin: 20px 0 10px;
    font-size: 1.4rem;
    color: #fff;
}

.post-content p {
    margin-bottom: 10px;
}

.post-content a,
.post-link {
    color: #667eea;
    text-decoration: underline;
}

.post-content a:hover,
.post-link:hover {
    color: #7c8fff;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 15px;
}

.action-left {
    display: flex;
    gap: 10px;
}

.like-button,
.share-button,
.edit-button,
.delete-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.like-button:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.like-button.liked {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    color: #667eea;
}

.share-button {
    background: rgba(255, 212, 0, 0.1);
    border-color: rgba(255, 212, 0, 0.3);
    color: #ffd400;
}

.share-button:hover {
    background: rgba(255, 212, 0, 0.2);
    border-color: #ffd400;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 212, 0, 0.3);
}

/* Share count badge */
.share-count {
    background: rgba(255, 212, 0, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    margin-left: 4px;
}

/* Icon Buttons in Header */
.icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: rgba(255, 255, 255, 0.7);
}

.icon-btn svg {
    transition: all 0.2s ease;
}

.icon-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.share-icon-btn:hover {
    color: #ffd400;
    border-color: rgba(255, 212, 0, 0.4);
    background: rgba(255, 212, 0, 0.1);
}

.share-icon-btn:hover svg {
    stroke: #ffd400;
}

.edit-icon-btn:hover {
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.1);
}

.edit-icon-btn:hover svg {
    stroke: #667eea;
}

.delete-icon-btn:hover {
    color: #ff4757;
    border-color: rgba(255, 71, 87, 0.4);
    background: rgba(255, 71, 87, 0.1);
}

.delete-icon-btn:hover svg {
    stroke: #ff4757;
}

/* Tooltip for icon buttons */
.icon-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.edit-button {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    color: #667eea;
}

.edit-button:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.delete-button {
    background: rgba(255, 71, 87, 0.1);
    border-color: #ff4757;
    color: #ff4757;
}

.delete-button:hover {
    background: rgba(255, 71, 87, 0.2);
    transform: translateY(-2px);
}

.back-button {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===========================
   Code Block Styles
   =========================== */

/* 코드 블록 래퍼 */
.code-block-wrapper {
    position: relative;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 코드 헤더 */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

/* 언어 라벨 */
.code-language {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 복사 버튼 */
.copy-code-btn {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    opacity: 1 !important;
    visibility: visible !important;
}

.copy-code-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
}

.copy-code-btn.copied {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.copy-code-btn svg {
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

.copy-text {
    font-weight: 500;
    display: inline-block !important;
    white-space: nowrap;
}

/* 코드 블록 스타일 */
.code-block-wrapper pre {
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: pre-wrap;
    background: transparent;
    font-size: 0.95rem;
}

.code-block-wrapper code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 인라인 코드 스타일 */
.inline-code {
    padding: 2px 6px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 4px;
    color: #a78bfa;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Prism.js 테마 오버라이드 */
.code-block-wrapper pre[class*="language-"] {
    background: transparent;
}

.code-block-wrapper code[class*="language-"] {
    text-shadow: none;
}

/* 라인 넘버 스타일 (Prism 플러그인 사용 시) */
.code-block-wrapper pre.line-numbers {
    position: relative;
    padding-left: 3.8em;
    counter-reset: linenumber;
}

.code-block-wrapper pre.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 rgba(255, 255, 255, 0.1);
}

.line-numbers-rows > span {
    display: block;
    counter-increment: linenumber;
}

.line-numbers-rows > span:before {
    content: counter(linenumber);
    color: rgba(255, 255, 255, 0.3);
    display: block;
    padding-right: 0.8em;
    text-align: right;
}

/* 스크롤바 제거 - 자동 줄바꿈 사용 */

/* 반응형 */
@media (max-width: 768px) {
    .post-container {
        margin-top: 80px;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    /* 모바일에서 post-actions 스타일 개선 */
    .post-actions {
        flex-wrap: wrap;
        gap: 10px;
        padding: 20px 0;
    }
    
    .action-left {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    
    .action-right {
        gap: 8px;
    }
    
    /* 목록 버튼 모바일 최적화 */
    .back-button {
        padding: 10px 15px;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 60px;
        background: #667eea;
        color: white;
        border: none;
    }
    
    .back-button:hover {
        background: #5567d8;
    }
    
    /* 버튼들 크기 조정 */
    .like-button, .share-button, .edit-button, .delete-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .slider-nav {
        padding: 15px 10px;
        font-size: 20px;
    }
    
    .image-gallery.layout-triple {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .image-gallery.layout-masonry.puzzle-4,
    .image-gallery.layout-masonry.puzzle-5 {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: none;
        grid-template-rows: repeat(auto-fit, 200px);
        height: auto;
        max-width: 100%;
    }
    
    .puzzle-item {
        grid-area: auto !important;
        height: 200px;
    }
    
    /* 모바일에서 목차 스타일 조정 */
    .table-of-contents {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .toc-nav {
        gap: 6px;
    }
    
    .toc-link {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .toc-link.toc-h3 {
        font-size: 0.85rem;
    }
}

/* ===========================
   Related Posts Section
   =========================== */
.related-posts-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-posts-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 25px;
}

.related-posts-title svg {
    stroke: #667eea;
    opacity: 0.8;
}

.related-posts-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

.related-posts-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.related-posts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-post-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.related-post-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.related-post-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(4px);
}

.related-post-item:hover::before {
    transform: scaleX(1);
}

.related-post-content {
    flex: 1;
    min-width: 0;
}

.related-post-title {
    font-size: 1.05rem;
    font-weight: 500;
    color: #e0e0e0;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.related-post-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0 0 10px 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.related-post-item:hover .related-post-title {
    color: #667eea;
}

.related-post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.related-post-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.related-post-author svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    opacity: 0.7;
}

.related-post-date {
    color: rgba(255, 255, 255, 0.4);
}

.related-post-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.related-post-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.4);
}

.related-post-stats svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    opacity: 0.6;
}

.related-post-arrow {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.related-post-item:hover .related-post-arrow {
    stroke: #667eea;
    transform: translateX(4px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .related-posts-section {
        margin-top: 40px;
        padding-top: 30px;
    }
    
    .related-posts-title {
        font-size: 1.2rem;
    }
    
    .related-post-item {
        padding: 14px 16px;
    }
    
    .related-post-title {
        font-size: 0.95rem;
    }
    
    .related-post-meta {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.8rem;
    }
    
    .related-post-stats {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }
    
    .related-post-arrow {
        display: none;
    }
}

/* 작은 모바일 화면 최적화 */
@media (max-width: 480px) {
    /* 버튼 레이아웃 최적화 */
    .post-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .action-left, .action-right {
        width: 100%;
        justify-content: center;
    }
    
    .back-button {
        width: 100%;
        margin-top: 10px;
        padding: 12px;
        font-weight: 600;
        text-align: center;
    }
    
    /* 버튼 아이콘과 텍스트 간격 조정 */
    .like-button svg, .share-button svg {
        margin-right: 5px;
    }
    
    /* 게시물 컨테이너 패딩 조정 */
    .post-container {
        padding: 20px 15px;
    }
}

/* 최근 게시물 섹션 */
.recent-posts-section {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-posts-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 30px;
}

.recent-posts-title svg {
    color: #677eea;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.recent-post-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.recent-post-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(103, 126, 234, 0.3);
    box-shadow: 0 10px 30px rgba(103, 126, 234, 0.2);
}

.recent-post-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.recent-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-post-card:hover .recent-post-thumbnail img {
    transform: scale(1.05);
}

.recent-post-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-post-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-post-card-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    min-height: 63px;
}

.recent-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-post-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.recent-post-stats {
    display: flex;
    gap: 15px;
}

.recent-post-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.recent-post-stats svg {
    width: 14px;
    height: 14px;
}

/* 태블릿 반응형 */
@media (max-width: 1024px) {
    .recent-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .recent-posts-section {
        margin-top: 40px;
        padding: 30px 0;
    }
    
    .recent-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .recent-post-thumbnail {
        height: 180px;
    }
    
    .recent-post-info {
        padding: 15px;
    }
    
    .recent-post-card-title {
        font-size: 1rem;
    }
    
    .recent-post-card-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        min-height: 42px;
    }
}