body {
    margin: 0;
    padding: 0;
    overflow: hidden;  /* Prevent scrollbars */
    font-family: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

html {
    margin: 0;
    padding: 0;
}

.gallery-container {
    position: relative;
    width: 100vw;
    height: 100vh;  /* Full viewport height */
    margin: 0;
    overflow: hidden;
    overflow-y: scroll;
    scrollbar-width: none;
    transition: filter 0.3s ease;
}

.gallery-container.tree-active {
    filter: none;
}

.filter-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    background: none;
    box-shadow: none;
    padding: 0;
    opacity: 0;
    height: 0px;
    will-change: opacity, height;
    transition: opacity 0.2s ease, height 0.3s ease;
    transition-delay: 0.3s;
}
.site-header:hover .filter-controls {
    opacity: 1;
    height: 400px;
    transition: opacity 0.2s ease, height 0.3s ease;
    transition-delay: 0.1s;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    overflow: visible;
}

.category-label {
    font-size: 0.8rem;
    color: #333;
    font-weight: 500;
    font-family: inherit;
}

.filter-tag {
    padding: 3px 6px;
    /* border: 1px solid rgba(0, 0, 0, 0.1); */
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.4);
    color: #333;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-tag:hover {
    background: rgba(147, 51, 234, 0.1);
}

.filter-tag.active {
    background: #9333EA;
    color: white;
    border-color: #9333EA;
}

.tag-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.zoom-controls {
    position: fixed;
    top: 25px;
    right: 25px;
    display: flex;
    /* flex-direction: column; */
    flex-wrap: wrap;
    width: 350px;
    /* flex-direction: column; */
    align-items: stretch;
    /* align-content: flex-end; */
    justify-content: end;
    align-items: stretch;
    gap: 10px;
    z-index: 2001;
}

.zoom-container,
.view-switch {
    background: rgba(230, 230, 230, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px;
    border-radius: 8px;
}

.zoom-container {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 30px;
}

.zoom-reset {
    /* width: 30px; */
    height: 30px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.4);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    padding-left: 10px;
    padding-right: 10px;
    flex-shrink: 0;
}

.zoom-reset:hover {
    background: rgba(147, 51, 234, 0.1);
}

.zoom-slider-container {
    width: 150px;
    height: 100%;  /* Fill container height */
    display: flex;
    align-items: center;  /* Center slider vertically */
}

.zoom-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
    outline: none;
    margin: 0;  /* Remove default margins */
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #9333EA;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.zoom-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: #9333EA;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.zoom-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    grid-template-rows: repeat(auto-fill, minmax(75px, 1fr));
    gap: 0;
    padding: 0;
    transform-origin: center;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.1, 1);
    width: 100%;
    height: auto;
    min-height: 100%;
    /* Performance optimizations */
    will-change: transform;
    contain: layout style paint;
}

/* Panning functionality removed - using clamped grid view */

.gallery-grid.tree-mode {
    /* Any specific styles for tree mode */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;  /* Restore original 3:4 aspect ratio */
    background: white;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: scale(1);
    margin: 0;
    border: none;
    width: 100%;
    height: 100%;
    /* Performance optimizations */
    contain: layout style paint;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Add this new style for items with descriptions */
.gallery-item[data-description]:not([data-description=""]) {
    cursor: pointer;
}

/* Optional: Add a subtle visual indicator on hover for items with descriptions */
.gallery-item[data-description]:not([data-description=""]):hover::before {
    /* transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.2); */
    content: "i";
    font-size: 0.8rem;
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(230, 230, 230, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    z-index: 2;
    padding: 2px;
    padding-left: 8px;
    padding-right: 9px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.gallery-item[data-description]:not([data-description=""])::before {
    content: "i";
    font-size: 0.8rem;
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(230, 230, 230, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    z-index: 2;
    padding: 2px;
    padding-left: 8px;
    padding-right: 9px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Panning functionality removed */

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* This will crop/scale the image to fill the container */
    object-position: center;  /* Center the image within the container */
    /* Optimize image rendering and loading */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* Prevent layout shift during loading */
    aspect-ratio: 1;
    /* Smooth loading transition */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item img[src*="data:image"] {
    opacity: 0;
}

.gallery-item img:not([src*="data:image"]) {
    opacity: 1;
}

/* Image loading states */
.gallery-item img.loaded {
    opacity: 1;
}

/* Loading placeholder */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: -1;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.gallery-item img.loaded + .gallery-item::before {
    display: none;
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;  /* Reduced padding */
    pointer-events: none;
    transform: translateY(100%) scale(0.4); /* Default scale for 100px grid */
    transform-origin: bottom left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    background: rgba(230, 230, 230, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 10px 10px 0 0;
}

/* Show on hover */
.gallery-item:hover .image-info {
    transform: translateY(0) scale(0.4);  /* Slide up to reveal with default scale */
    transform-origin: bottom left;
}

.image-info h3,
.image-info p {
    display: none;
}

.image-tags {
    display: flex;
    margin: 0;
    justify-content: flex-start;
    pointer-events: auto;
    overflow: visible;
    gap: 20px;  /* Reduced gap */
}

/* Update columns layout */
.tags-labels, .tags-values {
    display: flex;
    flex-direction: column;
    gap: 0;  /* Remove gap between items */
}

.tags-labels {
    flex: 0 0 auto;
    margin-right: 4px;
}

.tags-values {
    flex: 1;
    min-width: 0;
}

/* Update shared styles for labels and values */
.tag-label,
.tag {
    font-size: 0.8rem;  /* Even smaller font size */
    line-height: 1.2;   /* Tighter line height */
    padding: 1px 0;     /* Consistent padding */
    white-space: nowrap;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 400;   /* Same weight for both */
}

/* Specific styles for labels */
.tag-label {
    text-align: left;
    min-width: 32px;    /* Adjusted minimum width */
}

/* Specific styles for values */
.tag {
    background: none;   /* Remove background */
    border: none;
    border-radius: 0;
    box-shadow: none;
    text-shadow: none;
    padding: 1px 0;
    cursor: pointer;
    pointer-events: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    transition: color 0.2s ease;
}

/* Hover effect for values */
.tag:hover {
    background: none;
    color: var(--accent-color-main);  /* Replace rgba(147, 51, 234, 0.8) */
}

.site-header {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90%;
    height: auto;
    background: rgba(230, 230, 230, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    flex-direction: column;  /* Stack sections vertically */
    gap: 12px;
    padding: 15px 25px;
    margin-bottom: 30px;
    border-radius: 12px;
    will-change: opacity, height;
    transition: opacity 0.3s ease, height 0.3s ease;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

.filter-status {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #333;
    padding-bottom: 12px;  /* Add spacing */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);  /* Add separator */
    min-height: 24px;  /* Ensure consistent height */
    font-family: inherit;
}

.bruise-counter {
    white-space: nowrap;
    font-weight: 500;
    padding-right: 15px;  /* Add spacing before breadcrumbs */
    border-right: 1px solid rgba(0, 0, 0, 0.1);  /* Add separator */
    font-family: inherit;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;  /* Allow horizontal scroll if needed */
    scrollbar-width: none;  /* Hide scrollbar in Firefox */
    -ms-overflow-style: none;  /* Hide scrollbar in IE/Edge */
    white-space: nowrap;  /* Prevent wrapping */
    /* padding-bottom: 4px; */
}

/* Hide scrollbar in Chrome/Safari */
.active-filters::-webkit-scrollbar {
    display: none;
}

.filter-path {
    color: #666;
    white-space: nowrap;  /* Prevent wrapping */
    font-size: 0.8rem;
    font-family: inherit;
}

.filter-path-arrow {
    color: #999;
    margin: 0 4px;
    white-space: nowrap;
    font-family: inherit;
}

/* Update controls section */
.controls-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

main {
    padding: 0;
    padding-bottom: 0;  /* Remove bottom padding */
}

/* Add styles for hidden items */
.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.tag-acronym {
    margin-left: auto;
    font-family: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.acronym-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.acronym-category {
    font-size: 0.6rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: inherit;
    font-weight: 400;  /* Added to ensure consistency */
}

.acronym-letters {
    font-weight: 400;  /* Changed from 600 to 400 for thinner weight */
    font-size: 1rem;
    color: #666;  /* Changed from purple to grey */
    letter-spacing: 0.15em;
}

.view-switch {
    border: none;
    color: #9333EA;
    cursor: pointer;
    font-family: inherit;
    /* height: 35px; */
    width: fit-content; /* Added to make button width match content */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px; /* Adjusted horizontal padding */
    background: rgba(230, 230, 230, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.view-switch svg {
    width: 35px; /* Increased from 24px */
    height: 35px; /* Increased from 24px */
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

.view-switch svg path {
    fill: currentColor;
}

.view-switch:hover {
    background: rgba(147, 51, 234, 0.1);
}

/* Hide the text label */
.view-label {
    display: none;
}

.tree-visualization {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    z-index: 1100;
    overflow: hidden;
}

.tree-container {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: grab;
}

.tree-container.dragging {
    cursor: grabbing;
}

.tree-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1101;
    transition: background 0.2s ease;
}

.tree-close-button:hover {
    background: rgba(147, 51, 234, 0.1);
}

.node-line {
    position: fixed;
    height: 2px;
    background: rgba(147, 51, 234, 0.2);
    transform-origin: 0 0;
    pointer-events: none;
    z-index: 1;
}

.node-line::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(147, 51, 234, 0.2);
    border-radius: 2px;
}

.bruise-node {
    position: absolute;
    width: 120px;
    height: 160px;
    padding: 0;
    overflow: hidden;
    border-radius: 4px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: grab;
    transition: transform 0.2s ease;
}

.bruise-node .gallery-item {
    width: 100%;
    height: 100%;
    transform: none !important;  /* Prevent inherited transforms */
    box-shadow: none;
}

.bruise-node img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bruise-node:hover {
    transform: scale(1.05);
}

.bruise-node.dragging {
    cursor: grabbing;
    z-index: 1102;
}

.gallery-item.highlight {
    /* outline: 3px solid var(--accent-color-main); */
    transition: outline 0.2s ease;
}

.gallery-item.highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-color-light);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    pointer-events: none;
    transition: background-color 0.2s ease;
    z-index: 1;
}

.tag-graph {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    min-height: 200px;
    height: auto;
    background: none;
    border-radius: 12px;
    padding: 40px;
    z-index: 5007;
    pointer-events: none;
    display: none;
    transition: height 0.3s ease;
}

.tag-graph.visible {
    display: block;
}

.tag-graph canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Update the blur overlay */
.gallery-container::after {
    content: '';
    position: fixed;
    inset: 0;
    backdrop-filter: blur(8px);  /* Increased from 2px to 8px */
    -webkit-backdrop-filter: blur(8px);  /* Add for Safari support */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5006;
    background: rgba(255, 255, 255, 0.1);  /* Add slight white overlay */
}

.gallery-container.tree-active::after {
    opacity: 1;
}

.bruise-nodes .dot {
    width: 6px;
    height: 6px;
    background: rgba(147, 51, 234, 0.6);
    border-radius: 50%;
    position: absolute;
    transition: all 0.3s ease;
}

.tag-nodes .tag-node {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    font-size: 0.8rem;
    position: absolute;
    transition: all 0.3s ease;
    color: #9333EA;
    font-weight: 500;
}

.tag-connections .connection {
    position: absolute;
    height: 2px;
    background: rgba(147, 51, 234, 0.2);
    transform-origin: 0 0;
    transition: all 0.3s ease;
}

.dot {
    width: 4px;
    height: 4px;
    background: rgba(147, 51, 234, 0.6);
    border-radius: 50%;
    position: absolute;
    transition: all 0.3s ease;
}

.site-title-container {
    position: fixed;
    bottom: 0;  /* Changed from top to bottom */
    left: 25px;
    z-index: 1000;
    padding: 15px 25px;
    margin-bottom: 30px;
    border-radius: 12px;
    height: auto;
    background: rgba(230, 230, 230, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 350px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}
.hover-hinweis {
    font-size: 0.8rem;
    color: #666;
    font-family: inherit;
    padding: none;
    line-height: 0;
    margin: 0 auto;
}
.site-title {
    font-family: "Helvetica", SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-weight: bold;
    font-size: 3rem;
    color: rgba(147, 51, 234, 0.8);
    margin: 0;
    z-index: 1000;
    letter-spacing: -0.02em;
    user-select: none;
    filter: blur(2.5px);
}
.site-untertitel {
    color: #666;
    white-space: nowrap;
    font-size: 0.8rem;
    font-family: inherit;
    padding: none;
    line-height: 0;
    margin-bottom: 30px;
}
.site-description {
    color: #666;
    font-size: 0.8rem;
    font-family: inherit;
    padding: none;
}
/* Add size range slider styles */
.size-range {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 200px;
}

.size-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
    outline: none;
}

.size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #9333EA;
    cursor: pointer;
}

.size-values {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

/* Add bruise description card styles */
.bruise-description {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    background: rgba(230, 230, 230, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.bruise-description.visible {
    opacity: 1;
    transform: translateY(0);
}

.description-title {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #333;
}

.description-text {
    margin: 0;
    margin-top: 30px;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
}

/* Add styles for the new filter categories */
.filter-group[data-category="reason"] .filter-tag,
.filter-group[data-category="object"] .filter-tag {
    background: rgba(147, 51, 234, 0.1);
}

.filter-group[data-category="year"] .filter-tag {
    font-family: "SF Mono", monospace;
}

.filter-group[data-category="intentional"] .filter-tag {
    text-transform: capitalize;
}

/* Add checkbox styles */
.checkbox-wrapper {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #333;
}

.filter-checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(147, 51, 234, 0.3);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.filter-checkbox:checked {
    background: #9333EA;
    border-color: #9333EA;
}

.filter-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    left: 2px;
    top: -1px;
}

.filter-checkbox:hover {
    border-color: #9333EA;
}

/* Add media query for larger screens */
@media (min-width: 768px) {
    .image-tags {
        grid-template-columns: repeat(2, 1fr);  /* Two columns on larger screens */
    }
}

/* Add these styles for the color preview while keeping the filter-tag base styles */
.filter-tag .color-preview {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    vertical-align: middle;
    margin-right: 6px;
}

/* Update the color preview border when the filter tag is active */
.filter-tag.active .color-preview {
    border-color: rgba(255, 255, 255, 0.3);
}
.hover-hinweis p::before {
    content: "Hover to show filters";
}
.pdf-controls.mobile {
    display: none;
}
.resources-view-switch {
    position: fixed;
    left: 25px;
    top: 25px;
    z-index: 5000;
}
.mobiletreeviewbtn {
    padding-bottom: 0;
    position: fixed;
    left: 50%;
    top: 25px;
    translate: -50% 0;
    z-index: 5007;
    display: block;
    padding: 3px 8px;
    padding-bottom: 0;
    align-items: center;
    justify-content: center;
}
.mobiletreeviewbtn-visible {
    display: none;
}
.submissions-view-switch {
    z-index: 5006 !important;
    position: fixed;
    top: 90px;
    left: 25px;
}
.submissions-view-switch svg {
    /* width: 30px;
    height: 30px; */
    transform: unset !important;
}
@media (max-width: 1850px) {
    .site-header {
        zoom: 0.65;
    }
    .site-title-container {
        zoom: 0.65;
    }
    .bruise-description {
        zoom: 0.65;
    }
}
@media (max-width: 800px) {
    .submissions-view-switch {
        z-index: 5006 !important;
        position: fixed;
        top: 140px !important;
        left: 18px;
    }
    .site-header {
        zoom: unset;
        transform-origin: unset;
        gap: unset;
        height: 85px;
        width: 100%;
        max-width: calc(100vw - 85px);
        flex-direction: column;
        margin-bottom: 20px;
        transition: height 0.3s ease, z-index 0s;
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
    }
    .site-header:hover, .site-header.active {
        height: 40%;
        z-index: 3001;
    }
    .filter-status {
        flex-shrink: 0;
        position: relative;
        z-index: 3001;
    }
    .controls-section {
        display: flex;
        align-items: flex-start;
        gap: 20px;
        margin: 0 auto;
        width: 100%;
        padding-top: 20px;
        flex: 1;
        opacity: 1;
        visibility: visible;
        transition: opacity 0.2s ease;
        position: relative;
        height: calc(100% - 85px);
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
        z-index: 3001;
    }
    .site-header:hover .filter-controls, .site-header.active .filter-controls {
        height: auto;
        opacity: 1;
        visibility: visible;
        position: relative;
        overflow: visible;
        pointer-events: auto;
    }
    .filter-controls {
        justify-content: unset;
        height: auto;
        width: 100%;
        flex-direction: column;
        opacity: 1;
        visibility: visible;
        transition: opacity 0.2s ease;
        position: relative;
        overflow: visible;
        pointer-events: auto;
    }
    .filter-group {
        overflow: unset;
        overflow-y: unset;
        scrollbar-width: unset;
        flex-shrink: 0;
        pointer-events: auto;
    }
    .size-filter {
        padding-bottom: 25px;
    }
    .hover-hinweis p::before {
        content: "Tap to show filters";
    }
    .site-title-container {
        top: 20px;
        left: 20px;
        zoom: unset;
        width: fit-content;
        height: 30px;
        padding: 8px;
        padding-left: 12px;
        padding-right: 12px;
        border-radius: 8px;
    }
    .site-title-container p {
        display: none;
    }
    .site-title-container .site-title {
        font-size: 2.2rem;
        text-align: center;
        text-wrap: nowrap;
        padding: 0;
        margin-top: -4px;
        filter: blur(2px);
    }
    .zoom-controls {
        top: 80px;
    }
    .view-switch {
        position: fixed;
        right: 20px;
        top: 20px;
        z-index: 5001;
    }
    .mobiletreeviewbtn {
        display: none;
    }
    .mobiletreeviewbtn-visible {
        position: fixed;
        right: 20px;
        top: 20px;
        z-index: 5008;
        display: block;
        padding: 3px 8px;
        align-items: center;
        justify-content: center;
    }
    .zoom-container {
        position: fixed;
        transform: rotate(-90deg);
        right: -70px;
        top: 175px;
        height: 33px;
        transition: opacity 0.3s ease;
    }
    /* Hide zoom container when resources iframe is active */
    .resources-iframe[style*="opacity: 1"] ~ .gallery-container .zoom-container {
        opacity: 0;
        pointer-events: none;
    }
    .resources-iframe[style*="opacity: 1"] ~ .gallery-container .view-switch {
        opacity: 0;
        pointer-events: none;
    }
    
    .pdf-controls.mobile {
        display: block;
        position: fixed;
        top: -50px;
        left: 0px;
    }
    .pdf-controls.desktop {
        display: none;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        grid-template-rows: repeat(auto-fill, minmax(75px, 1fr));
        z-index: 3000;
    }
    .resources-view-switch {
        left: 18px;
        top: 80px;
        transition: top 0.3s ease;
        z-index: 5000;
    }
    .resources-view-switch.active {
        top: 18px;
    }
    .resources-view-switch.active ~ .submissions-view-switch {
        z-index: 1000 !important;
    }
    .submissions-view-switch.active {
        top: 18px !important;
    }
    .submissions-view-switch.active ~ .gallery-container .mobiletreeviewbtn-visible {
        z-index: 1000 !important;
    }
}