/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}



.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.header-content {
    flex: 1;
}



.header-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.category-title {
    font-weight: 600;
    color: #ffeaa7;
}

.header-stats {
    display: flex;
    gap: 1.5rem;
    margin-left: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* 브레드크럼 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.1);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.breadcrumb-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.breadcrumb-item.current .breadcrumb-link {
    background: rgba(255,255,255,0.2);
    color: #ffeaa7;
    font-weight: 600;
}

.breadcrumb-icon {
    font-size: 0.9rem;
}

.breadcrumb-separator {
    color: rgba(255,255,255,0.6);
    margin: 0 0.5rem;
    font-size: 1.1rem;
}

/* 필터 섹션 */
.document-filters {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.filter-section {
    flex: 1;
    max-width: 70%;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-collapse-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #667eea;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-collapse-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.filter-content {
    transition: all 0.3s ease;
}

.filter-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.label-icon {
    font-size: 1rem;
}

.filter-select {
    padding: 0.75rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 1rem;
}

/* 보기 옵션 */
.view-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 200px;
}

.view-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.view-toggles {
    display: flex;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.25rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.view-toggle {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.view-toggle.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.view-toggle:hover {
    background: white;
    color: #667eea;
}

.view-icon {
    font-size: 1.2rem;
}

.view-label {
    font-weight: 500;
}

/* 문서 리스트 */
.document-list {
    display: grid;
    gap: 1.5rem;
}

.document-list[data-view="grid"] {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.document-list[data-view="list"] {
    grid-template-columns: 1fr;
}

.document-list[data-view="compact"] {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.document-item {
    transition: all 0.3s ease;
}

.document-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.document-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.document-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.document-card:hover .document-thumbnail img {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-card:hover .thumbnail-overlay {
    opacity: 1;
}

.read-more {
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.document-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.document-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.document-title {
    flex: 1;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
}

.title-link {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.title-link:hover {
    color: #667eea;
}

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

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.badge-hot {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
}

.badge-updated {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-primary,
.meta-secondary {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.meta-icon {
    font-size: 1rem;
}

.document-category {
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.document-category .category-link {
    color: #28a745;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.document-category .category-link:hover {
    background-color: #28a745;
    color: white;
    text-decoration: none;
}

.category-path {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #495057;
}

.category-item {
    font-weight: 500;
}

.category-separator {
    color: #6c757d;
    margin: 0 0.25rem;
}

.document-excerpt {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
}



.document-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f8f9fa;
}

.action-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.action-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-text {
    display: none;
}

/* 문서 없음 상태 */
.no-documents {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.no-documents-animation {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.no-documents-icon {
    font-size: 4rem;
    color: #6c757d;
    position: relative;
    z-index: 2;
}

.no-documents-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 6rem;
    color: #f8f9fa;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-10px); }
}

.no-documents-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.no-documents-message {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.no-documents-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .document-list-page {
        padding: 1rem;
    }
    
    .header-top {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-stats {
        margin-left: 0;
        justify-content: center;
    }
    
    .filter-toolbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-section {
        max-width: 100%;
    }
    
    .filter-groups {
        grid-template-columns: 1fr;
    }
    
    .document-list[data-view="grid"] {
        grid-template-columns: 1fr;
    }
    
    .document-list[data-view="compact"] {
        grid-template-columns: 1fr;
    }
    
    .btn-text {
        display: inline;
    }
}

/* 버전 관리 스타일 */
.version-selector {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.version-selector h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.version-info {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.version-info p {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
}

.version-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.version-toggle:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.version-toggle.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.version-dropdown {
    margin-top: 0.5rem;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    background: #fff;
    max-height: 300px;
    overflow-y: auto;
}

.version-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

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

.version-item:hover {
    background: #f8f9fa;
}

.version-item.current-version {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.version-header {
    margin-bottom: 0.5rem;
}

.version-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version-link:hover {
    color: #3498db;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.latest {
    background: #e8f5e8;
    color: #2e7d32;
}

.badge.current {
    background: #e3f2fd;
    color: #1976d2;
}

.version-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.version-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

@media (max-width: 768px) {
    .version-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .version-dropdown {
        max-height: 200px;
    }
}




/* 문서 목록 스타일 */
.document-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.document-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.document-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #007bff;
}


.document-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.document-excerpt {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.document-excerpt:hover {
    background-color: rgba(0, 123, 255, 0.05);
    color: #007bff;
    border-radius: 4px;
    padding: 0.5rem;
    margin: -0.5rem;
}



/* 반응형 디자인 개선 */
@media (max-width: 768px) {
    .category-header {
        padding: 0.4rem 0.2rem;
    }
    
    .category-name {
        font-size: 0.85rem;
        padding: 0.3rem 0.4rem;
    }
    
    .level-1 .category-name {
        font-size: 0.9rem;
    }
    
    .level-2 .category-name {
        font-size: 0.85rem;
    }
    
    .level-3 .category-name {
        font-size: 0.8rem;
    }
    
    .level-3 .category-name.selected {
        font-size: 0.8rem;
    }
    
    .category-count {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
    
    .subcategory-list,
    .subsubcategory-list {
        margin-left: 1rem;
        padding-left: 0.6rem;
    }
    
    .document-item {
        padding: 1rem;
    }
    
    .category-page {
        padding: 1rem;
    }
}

/* 기존 로딩/에러 스타일은 새로운 스타일로 대체됨 */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* 헤더 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 60px;
}

.logo h1 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.logo a {
    text-decoration: none;
    color: inherit;
}


.search-bar {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-bar form {
    display: flex;
    gap: 0.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-bar button {
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-menu a:hover {
    background-color: #f8f9fa;
}

.btn-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
}

.btn-highlight:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    color: white !important;
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4394 100%) !important;
}

/* 메인 컨텐츠 */
.main-content {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 2rem;
    margin: 2rem 0;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}




/* 메인 컨텐츠 */
.content {
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 600px;
}



/* 홈페이지 - 레거시 스타일 (homepage.css가 우선순위) */
.home-page .hero-section {
    /* 스타일은 homepage.css에서 정의 */
}

.home-page .document-grid {
    /* 스타일은 homepage.css에서 정의 */
}

.home-page .category-grid {
    /* 스타일은 homepage.css에서 정의 */
}


/* 문서 상세 페이지 전용 레이아웃 - 목록 페이지와 동일한 레이아웃 유지 */
body.document-detail .main-content {
    grid-template-columns: 250px 1fr 250px;
    gap: 2rem;
}

body.document-detail .sidebar {
    /* 사이드바 폰트 크기 조정 제거 - 일관성 유지 */
}

/* 새로운 미니멀 문서 헤더 */
.modern-document-header {
    margin-bottom: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
}


.header-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.document-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.ai-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ai-icon {
    width: 14px;
    height: 14px;
}

.ai-tooltip {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 999;
}

.ai-badge:hover .ai-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.meta-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meta-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    min-width: 120px;
}

.meta-card:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.meta-icon {
    width: 20px;
    height: 20px;
    color: #6c757d;
    flex-shrink: 0;
}

.meta-content {
    flex: 1;
}

.meta-label {
    font-size: 0.7rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 0.9rem;
    color: #2d3748;
    font-weight: 600;
    line-height: 1.2;
}

.views-number {
    color: #667eea;
    font-weight: 700;
}

.taxonomy-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.category-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.breadcrumb-icon {
    width: 16px;
    height: 16px;
    color: #6c757d;
    flex-shrink: 0;
}

.breadcrumb-path {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb-item {
    background: #f8f9fa;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.breadcrumb-item:hover {
    background: #e9ecef;
    color: #2d3748;
}

.breadcrumb-separator {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 300;
}



.update-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #856404;
}

.update-icon {
    width: 14px;
    height: 14px;
    color: #856404;
    flex-shrink: 0;
}

.update-text {
    font-weight: 500;
    line-height: 1.2;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .modern-document-header {
        margin-bottom: 1rem;
        padding: 1rem 0;
    }
    
    .title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .document-title {
        font-size: 1.5rem;
    }
    
    .meta-dashboard {
        gap: 0.75rem;
    }
    
    .meta-card {
        padding: 0.6rem 0.8rem;
        min-width: 100px;
    }
    
    .meta-icon {
        width: 18px;
        height: 18px;
    }
    
    .meta-value {
        font-size: 0.8rem;
    }
    
    .breadcrumb-path {
        gap: 0.4rem;
    }
    
    .breadcrumb-item {
        padding: 0.2rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .tags-container {
        gap: 0.4rem;
    }
    
    .modern-tag {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .document-title {
        font-size: 1.3rem;
    }
    
    .meta-dashboard {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .meta-card {
        padding: 0.5rem 0.7rem;
    }
    
    .category-breadcrumb {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .breadcrumb-path {
        width: 100%;
    }
}




/* 우측 사이드바 목차 스타일 */
.toc-section {
    position: sticky;
    top: 0px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.toc-section h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.toc-section .document-toc {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    background: #fff;
}

.toc-section .document-toc li {
    margin: 0;
    border-left: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.toc-section .document-toc li:hover {
    border-left-color: #667eea;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.toc-section .document-toc li.active {
    border-left-color: #667eea;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.toc-section .document-toc a {
    color: #495057;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.5rem;
    line-height: 1;
    transition: all 0.2s ease;
    font-weight: 500;
}

.toc-section .document-toc a:hover {
    color: #667eea;
}

/* H1 스타일 */
.toc-section .document-toc .toc-h1 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2c3e50;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: 0.3rem 0.3rem;
    border-radius: 6px;
}

.toc-section .document-toc .toc-h1 a {
    padding: 0.6rem 0.8rem;
    color: #2c3e50;
    font-weight: 700;
    border-radius: 6px;
}

.toc-section .document-toc .toc-h1:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toc-section .document-toc .toc-h1:hover a {
    color: white;
}

/* H2 스타일 */
.toc-section .document-toc .toc-h2 {
    font-size: 0.8rem;
    font-weight: 600;
}

.toc-section .document-toc .toc-h2 a {
    color: #34495e;
    font-weight: 600;
    padding-left: 1rem;
}

.toc-section .document-toc .toc-h2:hover a {
    color: #667eea;
}

/* H3 스타일 */
.toc-section .document-toc .toc-h3 {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.9;
}

.toc-section .document-toc .toc-h3 a {
    color: #5d6d7e;
    font-weight: 500;
    padding-left: 1.3rem;
}

.toc-section .document-toc .toc-h3:hover a {
    color: #667eea;
}

/* 목차 스크롤 바 스타일 */
.toc-section::-webkit-scrollbar {
    width: 4px;
}

.toc-section::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.toc-section::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 2px;
}

.toc-section::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}


.document-body {
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    color: #2c3e50;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}




/* 제목 스타일 개선 */
.document-body h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3498db;
}

.document-body h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #34495e;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #ecf0f1;
}

.document-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.document-body h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.document-body h5,
.document-body h6 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #5d6d7e;
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
}

/* 첫 번째 제목의 상단 마진 제거 */
.document-body h1:first-child,
.document-body h2:first-child,
.document-body h3:first-child {
    margin-top: 0;
}

/* 문단 스타일 */
.document-body p {
    margin-bottom: 1.2rem;
    text-align: justify;
    text-justify: inter-word;
    color: #34495e;
}

/* 리스트 스타일 개선 */
.document-body ul,
.document-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.document-body ul {
    list-style-type: none;
    position: relative;
}

.document-body ul li {
    position: relative;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
}

.document-body ul li::before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.document-body ol li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
}

.document-body li > ul,
.document-body li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* 인용구 스타일 개선 */
.document-body blockquote {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #3498db;
    border-radius: 0 8px 8px 0;
    padding: 1.5rem;
    margin: 2rem 0;
    color: #495057;
    font-style: italic;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.document-body blockquote::before {
    content: """;
    font-size: 4rem;
    color: #3498db;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    opacity: 0.3;
}

.document-body blockquote p:last-child {
    margin-bottom: 0;
}




/* 테이블 스타일 */
.document-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.document-body thead {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.document-body th,
.document-body td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    vertical-align: top;
}

.document-body th:last-child,
.document-body td:last-child {
    border-right: none;
}

.document-body th {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.document-body tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.document-body tbody tr:last-child td {
    border-bottom: none;
}

.document-body tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.document-body tbody tr:nth-child(odd) {
    background-color: #fff;
}

/* 테이블 반응형 */
@media (max-width: 768px) {
    .document-body table {
        font-size: 0.85rem;
    }
    
    .document-body th,
    .document-body td {
        padding: 0.75rem 0.5rem;
    }
}

/* 이미지 스타일 */
.document-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 1.5rem 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 링크 스타일 */
.document-body a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.document-body a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

/* 구분선 스타일 */
.document-body hr {
    border: none;
    height: 2px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    margin: 3rem 0;
    border-radius: 1px;
}

/* 강조 텍스트 */
.document-body strong {
    color: #2c3e50;
    font-weight: 700;
}

.document-body em {
    color: #5d6d7e;
    font-style: italic;
}

/* 체크박스 리스트 */
.document-body input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.2);
}


/* 체크박스 태스크 리스트 */
.document-body .task-list-item {
    list-style-type: none;
    margin-left: -1.5rem;
}

.document-body .task-list-item-checkbox {
    margin-right: 0.5rem;
    transform: scale(1.2);
}

/* 정의 리스트 */
.document-body dl {
    margin-bottom: 1.5rem;
}

.document-body dt {
    font-weight: 700;
    color: #2c3e50;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.document-body dd {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: #495057;
}

/* 약어 */
.document-body abbr {
    border-bottom: 1px dotted #6c757d;
    cursor: help;
}

/* 하이라이트 텍스트 */
.document-body mark {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    color: #856404;
}

/* 취소선 */
.document-body del {
    color: #6c757d;
    text-decoration: line-through;
}

/* 위첨자/아래첨자 */
.document-body sup,
.document-body sub {
    font-size: 0.8rem;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.document-body sup {
    top: -0.5em;
}

.document-body sub {
    bottom: -0.25em;
}



.ai-feedback {
    background-color: #e8f4f8;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.feedback-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}




.editor-header {
    margin-bottom: 2rem;
}

.editor-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.editor-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.editor-tabs {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}


.editor-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

.btn-full {
    width: 100%;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.social-login {
    margin-top: 2rem;
    text-align: center;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-social {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-social:hover {
    background-color: #f8f9fa;
}

.form-help {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.required {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 2px;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid transparent;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-warning strong {
    color: #856404;
}

.category-validation {
    margin: 1rem 0;
}

/* Notification animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}



.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.2s;
}

.social-link:hover {
    color: #3498db;
}



/* 반응형 디자인 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 200px 1fr 200px;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .header-container {
        padding: 1rem 1rem;
    }
    
    .footer-container,
    .footer-bottom {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .search-bar {
        margin: 0;
        max-width: 100%;
    }
    
    .main-content {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .sidebar,
    .sidebar-left,
    .sidebar-right {
        position: static !important;
        width: 100%;
        margin-bottom: 1rem;
        top: auto !important;
    }
    
    .sidebar-left {
        order: 1;
    }
    
    .content {
        order: 2;
        width: 100%;
    }
    
    .sidebar-right {
        order: 3;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .document-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .document-actions {
        flex-direction: column;
    }
    
    .document-detail-page {
        padding: 0 15px;
    }
    
    .feedback-buttons {
        flex-direction: column;
    }
    
    .editor-actions {
        flex-direction: column;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    /* 모바일에서 목차 섹션 sticky 비활성화 */
    .toc-section {
        position: static !important;
        top: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .header-container {
        padding: 0.75rem 0.5rem;
    }
    
    .main-content {
        padding: 0 0.5rem;
        margin: 1rem auto;
    }
    
    .content {
        padding: 1rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .auth-container {
        padding: 1rem;
    }
    
    .footer-container,
    .footer-bottom {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Think 섹션 스타일 */
.think-section {
    margin: 2rem 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

.think-toggle-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.think-toggle-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.think-toggle-btn.active {
    background: linear-gradient(135deg, #4c63d2 0%, #5d3a84 100%);
}

.think-btn-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.think-content {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.think-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-bottom: 1px solid #e9ecef;
}

.think-header h3 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 1.1rem;
}

.think-description {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
}

.think-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

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

.think-title {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.think-text {
    background-color: #fff;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.think-text p {
    margin-bottom: 0.8rem;
}

.think-text p:last-child {
    margin-bottom: 0;
}

.think-text code {
    background-color: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

.think-text pre {
    background-color: #f8f9fa;
    padding: 0.8rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.8rem 0;
}

.think-text ul, 
.think-text ol {
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
}

.think-text li {
    margin-bottom: 0.3rem;
}

/* 반응형 디자인 - Think 섹션 */
@media (max-width: 768px) {
    .think-toggle-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .think-header {
        padding: 1rem;
    }
    
    .think-item {
        padding: 1rem;
    }
    
    .think-text {
        padding: 0.8rem;
    }
}

/* 태그 공통 스타일 */
.tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag:hover {
    background: #007bff;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

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

/* 카테고리 링크 공통 스타일 */
.category-link {
    color: #28a745;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.category-link:hover {
    background-color: #28a745;
    color: white;
    text-decoration: none;
}



