body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.container {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* Header styles */
.site-header {
    background-color: #0d6efd;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    color: white;
}

.site-title {
    font-weight: 600;
    margin: 0;
}

/* Navigation styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Map container styles */
.map-container {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.5rem;
    background-color: white;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.map-container img {
    max-width: 100%;
    height: auto;
}

/* Folder map styles */
.folder-map-container {
    position: relative;
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    overflow: hidden;
}

.folder-map-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.folder-map-title {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9rem;
    z-index: 2;
}

.folder-map-help {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    z-index: 2;
}

area {
    cursor: pointer;
}

area:hover {
    outline: 2px solid #007bff;
}

.map-area-highlight {
    position: absolute;
    border: 2px solid #007bff;
    background-color: rgba(0, 123, 255, 0.2);
    z-index: 1;
    pointer-events: none;
    transition: all 0.2s ease;
}

.map-tooltip {
    position: absolute;
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9rem;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Card styles */
.card {
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-img-top {
    height: 180px;
    object-fit: cover;
}

/* Breadcrumb styles */
.breadcrumb {
    background-color: #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/* Footer styles */
.footer {
    margin-top: 2rem;
    padding: 1rem 0;
    background-color: #343a40;
    color: #f8f9fa;
}

/* Login form */
.login-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 1.5rem;
    background: white;
    border-radius: 0.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Admin panel specific styles */
.admin-sidebar {
    background: #343a40;
    color: white;
    padding: 1rem;
    min-height: calc(100vh - 56px);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.75);
}

.admin-sidebar .nav-link:hover {
    color: white;
}

.admin-sidebar .nav-link.active {
    font-weight: bold;
    color: white;
}

/* Image map hover effects */
area {
    cursor: pointer;
}

area:hover {
    outline: 2px solid blue;
}

/* Equipment detail page */
.equipment-details .photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 10px;
    margin-top: 1rem;
}

.equipment-details .photo-item {
    height: 150px;
    overflow: hidden;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

.equipment-details .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.equipment-details .photo-item:hover img {
    transform: scale(1.05);
}

/* Comments section */
.comments-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.comment {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    background-color: white;
}

.comment-meta {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Markdown Content Styling */
.markdown-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    border-spacing: 0;
}

.markdown-content table th,
.markdown-content table td {
    padding: 0.75rem;
    vertical-align: top;
    border: 1px solid #dee2e6;
}

.markdown-content table thead th {
    vertical-align: bottom;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    text-align: left;
}

.markdown-content table tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.markdown-content table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Responsive table handling */
@media (max-width: 768px) {
    .map-container {
        overflow-x: auto;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    .equipment-details .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .markdown-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Other Markdown elements styling */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.markdown-content blockquote {
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #dee2e6;
    background-color: #f8f9fa;
}

/* Collapsible Folder Tree Styles */
.folder-tree {
    margin: 0;
    padding: 0;
    list-style: none;
}

.folder-tree-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.folder-tree-toggle {
    background: none;
    border: none;
    padding: 0;
    margin-right: 5px;
    color: #6c757d;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.folder-tree-toggle:hover {
    color: #495057;
}

.folder-tree-toggle.expanded {
    transform: rotate(90deg);
}

.folder-tree-toggle.loading {
    color: #007bff;
}

.folder-tree-children {
    margin-left: 15px;
    padding-left: 0;
    list-style: none;
    display: none;
}

.folder-tree-children.expanded {
    display: block;
}

.folder-tree-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 8px 12px;
    border-radius: 4px;
}

.folder-tree-link:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}

.folder-tree-icon {
    margin-right: 8px;
    color: #ffc107;
    flex-shrink: 0;
    font-size: 1rem;
}

.folder-tree-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-tree-badges {
    display: flex;
    gap: 4px;
    margin-left: 8px;
    flex-shrink: 0;
}

.folder-tree-loading {
    color: #6c757d;
    font-style: italic;
    padding: 8px 12px 8px 32px;
}
