/* 폰트 및 기본 설정 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #374151;
    background: linear-gradient(to right, #f1f5f9 0%, #f1f5f9 calc((100vw - 1440px) / 2), #ffffff calc((100vw - 1440px) / 2), #ffffff calc(100vw - (100vw - 1440px) / 2), #f8fafc calc(100vw - (100vw - 1440px) / 2), #f8fafc 100%);
    margin: 0;
    padding: 0;
    font-size: 16px;
}

@media (max-width: 1024px) {
    body {
        font-size: 14px;
    }
}

/* 레이아웃 컨테이너 - 12그리드 시스템 */
.layout-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    background-color: transparent;
    gap: 0;
    padding: 0;
}

/* 왼쪽 사이드바 (LNB) - 2그리드 컬럼 */
.sidebar-nav {
    grid-column: 1 / 3;
    background-color: #f1f5f9;
    border-right: 2px solid #e2e8f0;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

/* 반응형 레이아웃 */
@media (max-width: 1024px) {
    body {
        display: block;
        background-color: #ffffff;
    }
    
    .layout-container {
        max-width: 100%;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        margin: 0;
        box-shadow: none;
    }
    
    .sidebar-nav {
        grid-column: 1;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 100;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar-nav.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        grid-column: 1;
        margin: 0;
        padding: 1rem 8px !important;
    }
    
    .ads-sidebar {
        display: none;
    }
}

@media (min-width: 1025px) {
    .sidebar-nav {
        position: sticky;
        transform: none;
    }
}

/* 사이드바 헤더 */
.sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.blog-title {
    margin-bottom: 0.5rem;
}

h1.blog-title {
    line-height: 1.2 !important;
}

.blog-title a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
    line-height: 1.2 !important;
}

.blog-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

/* 검색 섹션 */
.search-section {
    margin-bottom: 2rem;
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: #ffffff;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
}

/* 메뉴 */
.nav-menu {
    margin-bottom: 2rem;
}

.menu-list {
    list-style: none;
}

.menu-item {
    margin-bottom: 0.25rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.menu-link:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.menu-link svg {
    opacity: 0.7;
}

/* 섹션 공통 스타일 */
.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 1rem;
}

/* 카테고리 섹션 */
.category-section {
    margin-bottom: 2rem;
}

.category-list ul {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.25rem;
}

.category-list a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.category-list a:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

/* 최근 글 섹션 */
.recent-section {
    margin-bottom: 2rem;
}

.recent-list {
    list-style: none;
}

.recent-item {
    margin-bottom: 1rem;
}

.recent-link {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.recent-link:hover {
    opacity: 0.8;
}

.recent-thumb {
    width: 3rem;
    height: 3rem;
    border-radius: 0.375rem;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-content {
    flex: 1;
    min-width: 0;
}

.recent-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-category {
    font-size: 0.75rem;
    color: #6b7280;
}

/* 태그 섹션 */
.tags-section {
    margin-bottom: 2rem;
}

.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tag-item:hover {
    background-color: #e2e8f0;
    color: #334155;
}

/* 메인 컨텐츠 - 8그리드 컬럼 (12-2-2=8) */
.main-content {
    grid-column: 3 / 11;
    padding: 2rem 2.5rem;
    background-color: #ffffff;
}

.content-wrapper {
    width: 100%;
}

/* 페이지 헤더 */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

@media (max-width: 1024px) {
    .page-title {
        font-size: 1.5rem;
    }
}

/* 글 목록 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.2s;
    display: block;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.post-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-thumb {
    width: 100%;
    height: 0;
    padding-bottom: 52.5%; /* 1200:630 aspect ratio */
    position: relative;
    overflow: hidden;
    background-color: #f3f4f6;
    min-height: unset !important;
    max-height: unset !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    border: none !important;
}

.post-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s;
    background-color: #e5e7eb;
    min-height: unset !important;
    max-height: unset !important;
    min-width: unset !important;
    max-width: unset !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.post-thumb img:not([src]), 
.post-thumb img[src=""], 
.post-thumb img[src*="<img src="] {
    display: none;
}

.post-thumb:has(img:not([src])):before,
.post-thumb:has(img[src=""]):before,
.post-thumb:has(img[src*="<img src="]):before {
    content: "이미지 없음";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #9ca3af;
    font-size: 0.875rem;
    z-index: 1;
}

.post-card:hover .post-thumb img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.post-category {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.post-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.post-new-badge {
    background-color: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    flex-shrink: 0;
    box-shadow: none;
}

/* NEW 이미지를 카테고리 태그 스타일로 대체 */
.post-title img[src*="new_ico"] {
    display: none !important;
    visibility: hidden !important;
}

.post-title:has(img[src*="new_ico"])::after {
    content: "NEW" !important;
    display: inline-block !important;
    background-color: #dcfce7 !important;
    color: #166534 !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 0.25rem !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-left: 0.5rem !important;
    vertical-align: middle !important;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0;
    line-height: 1.4;
    flex: 1;
}

.post-summary {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 개별 글 페이지 */
.article-detail {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.article-category {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
}

.article-date {
    color: #6b7280;
}

.article-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (max-width: 1024px) {
    .article-title {
        font-size: 1.5rem;
    }
}

.article-author {
    color: #6b7280;
    font-size: 0.875rem;
}

.author-name {
    font-weight: 500;
}

.article-featured {
    margin-bottom: 2rem;
    overflow: hidden;
}

.article-featured img {
    width: 100%;
    height: auto;
    display: block;
}

/* 본문 내용 */
.article-content {
    line-height: 1.8;
    color: #374151;
    margin-bottom: 2rem;
}

.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4, 
.article-content h5, 
.article-content h6 {
    font-weight: 600;
    color: #1f2937;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.5rem; }

@media (max-width: 1024px) {
    .article-content h1 { font-size: 1.5rem; }
    .article-content h2 { font-size: 1.25rem; }
    .article-content h3 { font-size: 1.125rem; }
}
.article-content h4 { font-size: 1.25rem; }
.article-content h5 { font-size: 1.125rem; }
.article-content h6 { font-size: 1rem; }

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

.article-content ul, 
.article-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

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

.article-content blockquote {
    border-left: 4px solid #3b82f6;
    background-color: #f8fafc;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0.375rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}

.article-content a {
    color: #3b82f6;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content a:hover {
    color: #1d4ed8;
}

/* 코드 블록 스타일 (sanghee01.tistory.com: stackoverflow-dark + line-numbers 느낌) */
.article-content pre {
    background: #1c1b1b;
    margin: 1.5rem 0;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #2a2a2a;
    border-radius: 0.375rem;
}

.article-content pre code {
    display: block;
    padding: 1rem 1rem;
    color: #ffffff !important;
    background: transparent !important;
    font-family: SF Mono, Menlo, Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    position: relative;
    z-index: 2;
}

/* 라인 넘버 스타일 */
/* Prism line-numbers 기본 패턴에 맞춤 */
pre.line-numbers,
pre[class*="language-"].line-numbers {
    padding-left: 3.8rem; /* 숫자 컬럼 확보 */
}

.line-numbers .line-numbers-rows {
    position: absolute;
    pointer-events: none;
    top: 0;
    left: 0;
    width: 3.2rem;
    letter-spacing: -1px;
    border-right: 1px solid #3a3a3a;
    user-select: none;
    padding-top: 0;
    counter-reset: linenumber;
    font-size: 100%;
}

.line-numbers .line-numbers-rows > span {
    pointer-events: none;
    display: block;
    counter-increment: linenumber;
    color: #999999;
    text-align: right;
    padding-right: 0.6rem;
    font-size: 12px;
    line-height: 1.6;
}

.line-numbers .line-numbers-rows > span:before {
    content: counter(linenumber);
}

/* 줄 번호 출력 */
.line-numbers .line-numbers-rows > span:before {
    content: counter(linenumber);
}

/* 인라인 코드 */
.article-content code:not(pre code) {
    background-color: #f1f5f9;
    color: #e11d48;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', 'Ubuntu Mono', monospace;
    font-size: 0.875em;
}

/* 코드 복사 버튼 */
.copy-to-clipboard-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.75rem;
    z-index: 3;
    transition: background-color 0.2s;
}

.copy-to-clipboard-button:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* 글 네비게이션 */
.post-navigation {
    display: flex;
    gap: 1rem;
    margin: 3rem 0 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.nav-prev, .nav-next {
    flex: 1;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.nav-prev:hover, .nav-next:hover {
    background-color: #f1f5f9;
}

.nav-label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.nav-title {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: #1f2937;
}

/* 오른쪽 사이드바 (광고) - 2그리드 컬럼 */
.ads-sidebar {
    grid-column: 11 / 13;
    padding: 2rem 1.5rem;
    background-color: #f8fafc;
    border-left: 2px solid #e5e7eb;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
}

.ads-container {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ads-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ads-content {
    text-align: center;
    min-height: 250px;
    display: block;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.ads-content .adsbygoogle {
    display: block;
    width: 100%;
    min-height: 250px;
    background-color: #ffffff;
    border-radius: 0.5rem;
}

/* 방문자 통계 */
.stats-container {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.stats-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: between;
    align-items: center;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    flex: 1;
}

.stat-value {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
}

/* 댓글 섹션 */
.comments-section {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 2px solid #e5e7eb;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.comments-title {
    color: #1f2937 !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 2rem !important;
    padding: 0 2rem !important;
    display: block !important;
}

/* 댓글 관련 요소들 강제 표시 */
.comments-section * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 댓글 입력 폼 스타일링 */
.comments-section textarea,
.comments-section input[type="text"],
.comments-section input[type="password"],
.comments-section input[type="email"] {
    display: block !important;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* 댓글 제출 버튼 */
.comments-section input[type="submit"],
.comments-section button {
    display: inline-block !important;
    padding: 0.75rem 1.5rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.comments-section input[type="submit"]:hover,
.comments-section button:hover {
    background-color: #2563eb;
}

/* 댓글이 없을 때 기본 메시지 표시 */
.comments-section:empty::after {
    content: "댓글 영역입니다. 티스토리 댓글이 여기에 표시됩니다.";
    display: block !important;
    text-align: center !important;
    color: #3b82f6 !important;
    font-style: italic !important;
    padding: 2rem !important;
    background-color: #dbeafe !important;
    border: 2px solid #3b82f6 !important;
    border-radius: 0.5rem !important;
    margin-top: 1rem !important;
    font-weight: bold !important;
}

/* 댓글 섹션 */
.comments-section {
    margin: 2rem 0;
    padding: 1.5rem 0;
}

/* 댓글 목록 스타일 */
.comments-section ol,
.comments-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comments-section li {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* 댓글 작성자명 */
.comments-section .name,
.comments-section .guest {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

/* 댓글 내용 */
.comments-section .desc {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* 댓글 날짜 */
.comments-section .date {
    font-size: 0.75rem;
    color: #6b7280;
}

/* 티스토리 댓글 시스템 스타일 */
.rp_container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.rp_container_header h3 {
    color: #1f2937;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.rp_count {
    color: #3b82f6;
    font-weight: 600;
}

.rp_rep {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 2rem 0 !important;
}

.rp_rep_item {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    padding: 1.25rem !important;
    margin-bottom: 1rem !important;
    display: block !important;
}

.rp_rep_info {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.rp_rep_name {
    font-weight: 600 !important;
    color: #1f2937 !important;
    font-size: 0.875rem !important;
}

.rp_rep_date {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
}

.rp_rep_desc {
    color: #374151 !important;
    line-height: 1.6 !important;
    font-size: 0.875rem !important;
}

/* 댓글 입력 폼 스타일 */
.rp_input_form {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.75rem !important;
    padding: 1.5rem !important;
    margin-top: 2rem !important;
}

.rp_input_form h4 {
    color: #1f2937 !important;
    font-size: 1.125rem !important;
    margin-bottom: 1rem !important;
}

.rp_input_form table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.rp_input_form td {
    padding: 0.5rem !important;
    vertical-align: top !important;
}

.input_name,
.input_password,
.input_homepage,
.textarea_comment {
    width: 100% !important;
    padding: 0.75rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    background-color: #ffffff !important;
    display: block !important;
}

.textarea_comment {
    resize: vertical !important;
    min-height: 100px !important;
}

.btn_register {
    background-color: #3b82f6 !important;
    color: white !important;
    padding: 0.75rem 2rem !important;
    border: none !important;
    border-radius: 0.375rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    display: inline-block !important;
}

.btn_register:hover {
    background-color: #2563eb !important;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination a:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.pagination .selected {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

/* 빈 메시지 */
.empty-message {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.empty-message .result {
    display: none;
}

.empty-message .result.search {
    display: block;
}

/* 모든 티스토리 태그 요소 강제 표시 */
s_list,
s_article_rep, 
s_index_article_rep, 
s_permalink_article_rep,
s_article_protected,
s_article_notice,
s_rp,
s_rp_container,
s_rp_rep,
s_rp_input_form {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
}

/* 추가적인 댓글 강제 표시 */
s_permalink_article_rep .comments-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 100px !important;
    background-color: #f8fafc !important;
    border: 2px dashed #3b82f6 !important;
    margin: 2rem 0 !important;
    padding: 2rem !important;
}


/* 티스토리 댓글 관련 태그 강제 표시 */
[class*="comment"],
[id*="comment"],
s_guest_input_form,
s_guest_rep,
s_guest_container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 글 목록 컨테이너 강제 표시 */
.posts-grid {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.posts-grid > * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Empty message 숨김 */
s_list_empty {
    display: none !important;
}

/* 관리자 메뉴 */
.admin-menu {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: #fef3c7;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.admin-menu a, .admin-menu button {
    padding: 0.5rem 1rem;
    background-color: #f59e0b;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.admin-menu a:hover, .admin-menu button:hover {
    background-color: #d97706;
}

/* 모바일 메뉴 토글 */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* 방명록 */
.guestbook-section {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 2rem;
}

/* 태그 페이지 */
.tag-section {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 2rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-cloud a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tag-cloud a:hover {
    background-color: #e2e8f0;
    color: #334155;
    transform: translateY(-1px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-detail {
        padding: 1.5rem;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .layout-container {
        flex-direction: column;
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(to right, #2d2a2a 0%, #2d2a2a calc((100vw - 1440px) / 2), #333030 calc((100vw - 1440px) / 2), #333030 calc(100vw - (100vw - 1440px) / 2), #2d2a2a calc(100vw - (100vw - 1440px) / 2), #2d2a2a 100%);
        color: #ffffff;
    }
    
    .sidebar-nav {
        background-color: #2d2a2a;
        border-right-color: #4a4545;
    }
    
    .blog-title a {
        color: #ffffff;
    }
    
    .blog-description {
        color: #cccccc;
    }
    
    .search-input {
        background-color: #404040;
        border-color: #555555;
        color: #ffffff;
    }
    
    .menu-link {
        color: #e0e0e0;
    }
    
    .menu-link:hover {
        background-color: #404040;
        color: #ffffff;
    }
    
    .main-content {
        background-color: #333030;
        color: #ffffff;
    }
    
    .page-title {
        color: #ffffff;
    }
    
    .post-card {
        background-color: #3d3a3a;
        border-color: #4a4545;
    }
    
    .post-title {
        color: #ffffff;
    }
    
    .post-new-badge {
        background-color: #22c55e;
        color: #ffffff;
        border: none;
        box-shadow: none;
    }
    
    /* 다크 모드에서 NEW 이미지 대체 스타일 */
    .post-title:has(img[src*="new_ico"])::after {
        background-color: #22c55e !important;
        color: #ffffff !important;
    }
    
    .post-summary {
        color: #cccccc;
    }
    
    .post-meta {
        color: #bbbbbb;
    }
    
    .article-detail {
        background-color: #333030;
    }
    
    .article-title {
        color: #ffffff;
    }
    
    .article-content {
        color: #ffffff;
    }
    
    .article-content h1,
    .article-content h2,
    .article-content h3,
    .article-content h4,
    .article-content h5,
    .article-content h6 {
        color: #ffffff;
    }
    
    .article-content p {
        color: #ffffff;
    }
    
    .ads-sidebar {
        background-color: #2d2a2a;
        border-left-color: #4a4545;
    }
    
    .ads-container, .stats-container {
        background-color: #3d3a3a;
        border-color: #4a4545;
        color: #ffffff;
    }
    
    .stats-title {
        color: #ffffff;
    }
    
    .stat-label {
        color: #cccccc;
    }
    
    .stat-value {
        color: #ffffff;
    }
    
    .category-list a {
        color: #e0e0e0;
    }
    
    .category-list a:hover {
        background-color: #404040;
        color: #ffffff;
    }
    
    .recent-title {
        color: #ffffff;
    }
    
    .recent-category {
        color: #cccccc;
    }
    
    .tag-item {
        background-color: #404040;
        color: #e0e0e0;
    }
    
    .tag-item:hover {
        background-color: #4a4545;
        color: #ffffff;
    }
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
