/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Custom faster smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: auto;
    }
    
    * {
        scroll-behavior: smooth;
        scroll-padding-top: 2rem;
    }
}

/* Override for even faster scrolling */
html, body {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #a8a8a8;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header styles */
.header {
    background-color: #a8a8a8;
    color: #333;
    padding: 2rem 0 1rem 0;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #333;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #333;
}

.gallery-controls {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Exposure Dial Styles - Now positioned on the left */
.exposure-dial-left {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.dial-container {
    width: 48px;
    height: 48px;
    position: relative;
    cursor: pointer;
}

.dial-face {
    width: 100%;
    height: 100%;
    border: 1px solid #999;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 50%, #d0d0d0 100%);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.dial-face:hover {
    border-color: #333;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.15);
}

.dial-markings {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.dial-mark {
    position: absolute;
    font-size: 6px;
    font-weight: bold;
    color: #333;
    transform-origin: center;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dial-mark:hover {
    color: #000;
    transform: scale(1.1);
}

.dial-mark.active {
    color: #000;
    font-weight: 900;
}

/* Position dial marks around the circle */
.dial-mark[data-value="0"] {
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
}

.dial-mark[data-value="1"] {
    top: 6px;
    right: 6px;
    transform: rotate(45deg);
}

.dial-mark[data-value="2"] {
    top: 50%;
    right: 2px;
    transform: translateY(-50%) rotate(90deg);
}

.dial-mark[data-value="3"] {
    bottom: 6px;
    right: 6px;
    transform: rotate(135deg);
}

.dial-mark[data-value="-1"] {
    top: 6px;
    left: 6px;
    transform: rotate(-45deg);
}

.dial-mark[data-value="-2"] {
    top: 50%;
    left: 2px;
    transform: translateY(-50%) rotate(-90deg);
}

.dial-mark[data-value="-3"] {
    bottom: 6px;
    left: 6px;
    transform: rotate(-135deg);
}


/* Dial face rotation for each exposure value */
.exposure-dial-left[data-exposure="0"] .dial-face {
    transform: rotate(0deg);
}

.exposure-dial-left[data-exposure="1"] .dial-face {
    transform: rotate(-45deg);
}

.exposure-dial-left[data-exposure="2"] .dial-face {
    transform: rotate(-90deg);
}

.exposure-dial-left[data-exposure="3"] .dial-face {
    transform: rotate(-135deg);
}

.exposure-dial-left[data-exposure="-1"] .dial-face {
    transform: rotate(45deg);
}

.exposure-dial-left[data-exposure="-2"] .dial-face {
    transform: rotate(90deg);
}

.exposure-dial-left[data-exposure="-3"] .dial-face {
    transform: rotate(135deg);
}

/* Default dial colors (exposure-0) */
body.exposure-0 .dial-face {
    background: linear-gradient(135deg, #c8c8c8 0%, #b8b8b8 50%, #a8a8a8 100%);
    border-color: #999999;
}

body.exposure-0 .dial-mark {
    color: #666666;
}

body.exposure-0 .dial-mark:hover,
body.exposure-0 .dial-mark.active {
    color: #333333;
}

/* Dial color themes for different exposures */
body.exposure--3 .dial-face {
    background: linear-gradient(135deg, #333333 0%, #222222 50%, #111111 100%);
    border-color: #666666;
}

body.exposure--3 .dial-mark {
    color: #cccccc;
}

body.exposure--3 .dial-mark:hover,
body.exposure--3 .dial-mark.active {
    color: #ffffff;
}

body.exposure--2 .dial-face {
    background: linear-gradient(135deg, #555555 0%, #444444 50%, #333333 100%);
    border-color: #777777;
}

body.exposure--2 .dial-mark {
    color: #cccccc;
}

body.exposure--2 .dial-mark:hover,
body.exposure--2 .dial-mark.active {
    color: #ffffff;
}

body.exposure--1 .dial-face {
    background: linear-gradient(135deg, #888888 0%, #777777 50%, #666666 100%);
    border-color: #999999;
}

body.exposure--1 .dial-mark {
    color: #333333;
}

body.exposure--1 .dial-mark:hover,
body.exposure--1 .dial-mark.active {
    color: #000000;
}

body.exposure-1 .dial-face {
    background: linear-gradient(135deg, #dddddd 0%, #cccccc 50%, #bbbbbb 100%);
    border-color: #aaaaaa;
}

body.exposure-1 .dial-mark {
    color: #666666;
}

body.exposure-1 .dial-mark:hover,
body.exposure-1 .dial-mark.active {
    color: #000000;
}

body.exposure-2 .dial-face {
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 50%, #e0e0e0 100%);
    border-color: #cccccc;
}

body.exposure-2 .dial-mark {
    color: #666666;
}

body.exposure-2 .dial-mark:hover,
body.exposure-2 .dial-mark.active {
    color: #000000;
}

body.exposure-3 .dial-face {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 50%, #f0f0f0 100%);
    border-color: #dddddd;
}

body.exposure-3 .dial-mark {
    color: #666666;
}

body.exposure-3 .dial-mark:hover,
body.exposure-3 .dial-mark.active {
    color: #000000;
}

/* Exposure Theme Classes */
body.exposure--3 {
    background-color: #000000;
    color: #ffffff;
}

body.exposure--3 .header {
    background-color: #000000;
    color: #ffffff;
}

body.exposure--3 .nav-link {
    color: #cccccc;
}

body.exposure--3 .nav-link:hover,
body.exposure--3 .nav-link.active {
    color: #ffffff;
}

body.exposure--3 .nav-link.active::after {
    background-color: #ffffff;
}

body.exposure--2 {
    background-color: #333333;
    color: #ffffff;
}

body.exposure--2 .header {
    background-color: #333333;
    color: #ffffff;
}

body.exposure--2 .nav-link {
    color: #cccccc;
}

body.exposure--2 .nav-link:hover,
body.exposure--2 .nav-link.active {
    color: #ffffff;
}

body.exposure--2 .nav-link.active::after {
    background-color: #ffffff;
}

body.exposure--1 {
    background-color: #666666;
    color: #000000;
}

body.exposure--1 .header {
    background-color: #666666;
    color: #000000;
}

body.exposure--1 .nav-link {
    color: #333333;
}

body.exposure--1 .nav-link:hover,
body.exposure--1 .nav-link.active {
    color: #000000;
}

body.exposure--1 .nav-link.active::after {
    background-color: #000000;
}

body.exposure-0 {
    background-color: #a8a8a8;
    color: #333333;
}

body.exposure-0 .header {
    background-color: #a8a8a8;
    color: #333333;
}

body.exposure-0 .nav-link {
    color: #666666;
}

body.exposure-0 .nav-link:hover,
body.exposure-0 .nav-link.active {
    color: #333333;
}

body.exposure-0 .nav-link.active::after {
    background-color: #333333;
}

body.exposure-1 {
    background-color: #cccccc;
    color: #000000;
}

body.exposure-1 .header {
    background-color: #cccccc;
    color: #000000;
}

body.exposure-1 .nav-link {
    color: #666666;
}

body.exposure-1 .nav-link:hover,
body.exposure-1 .nav-link.active {
    color: #000000;
}

body.exposure-1 .nav-link.active::after {
    background-color: #000000;
}

body.exposure-2 {
    background-color: #e8e8e8;
    color: #000000;
}

body.exposure-2 .header {
    background-color: #e8e8e8;
    color: #000000;
}

body.exposure-2 .nav-link {
    color: #666666;
}

body.exposure-2 .nav-link:hover,
body.exposure-2 .nav-link.active {
    color: #000000;
}

body.exposure-2 .nav-link.active::after {
    background-color: #000000;
}

body.exposure-3 {
    background-color: #ffffff;
    color: #000000;
}

body.exposure-3 .header {
    background-color: #ffffff;
    color: #000000;
}

body.exposure-3 .nav-link {
    color: #666666;
}

body.exposure-3 .nav-link:hover,
body.exposure-3 .nav-link.active {
    color: #000000;
}

body.exposure-3 .nav-link.active::after {
    background-color: #000000;
}

/* Update button and control colors for different exposures */
body.exposure--3 .upload-btn,
body.exposure--3 .zoom-btn,
body.exposure--3 .close-btn,
body.exposure--3 .nav-btn {
    color: #cccccc;
    border-color: #666666;
}

body.exposure--3 .upload-btn:hover,
body.exposure--3 .zoom-btn:hover,
body.exposure--3 .close-btn:hover,
body.exposure--3 .nav-btn:hover {
    color: #ffffff;
    border-color: #ffffff;
}

body.exposure--2 .upload-btn,
body.exposure--2 .zoom-btn,
body.exposure--2 .close-btn,
body.exposure--2 .nav-btn {
    color: #cccccc;
    border-color: #666666;
}

body.exposure--2 .upload-btn:hover,
body.exposure--2 .zoom-btn:hover,
body.exposure--2 .close-btn:hover,
body.exposure--2 .nav-btn:hover {
    color: #ffffff;
    border-color: #ffffff;
}

body.exposure--1 .upload-btn,
body.exposure--1 .zoom-btn,
body.exposure--1 .close-btn,
body.exposure--1 .nav-btn {
    color: #333333;
    border-color: #999999;
}

body.exposure--1 .upload-btn:hover,
body.exposure--1 .zoom-btn:hover,
body.exposure--1 .close-btn:hover,
body.exposure--1 .nav-btn:hover {
    color: #000000;
    border-color: #000000;
}

/* Modal background colors for different exposures */
body.exposure--3 .modal {
    background: rgba(0, 0, 0, 0.98);
}

body.exposure--2 .modal {
    background: rgba(51, 51, 51, 0.98);
}

body.exposure--1 .modal {
    background: rgba(102, 102, 102, 0.98);
}

body.exposure-0 .modal {
    background: rgba(168, 168, 168, 0.98);
}

body.exposure-1 .modal {
    background: rgba(204, 204, 204, 0.98);
}

body.exposure-2 .modal {
    background: rgba(232, 232, 232, 0.98);
}

body.exposure-3 .modal {
    background: rgba(255, 255, 255, 0.98);
}

.upload-btn {
    background: transparent;
    color: #666;
    border: 1px solid #999;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn:hover {
    color: #333;
    border-color: #333;
    transform: scale(1.05);
}

.zoom-controls {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
}

.zoom-btn {
    background: transparent;
    color: #666;
    border: 1px solid #999;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.zoom-btn:hover {
    color: #333;
    border-color: #333;
    transform: scale(1.05);
}

.zoom-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.zoom-btn:disabled:hover {
    color: #666;
    border-color: #999;
    transform: none;
}

/* Main content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 2px solid #ccc;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll loading indicator */
.scroll-loading {
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.scroll-loading:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

.scroll-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.scroll-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.scroll-loading p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Scroll loading indicator themes for different exposures */
body.exposure--3 .scroll-spinner {
    border-color: #555555;
    border-top-color: #cccccc;
}

body.exposure--3 .scroll-loading p {
    color: #cccccc;
}

body.exposure--2 .scroll-spinner {
    border-color: #666666;
    border-top-color: #cccccc;
}

body.exposure--2 .scroll-loading p {
    color: #cccccc;
}

body.exposure--1 .scroll-spinner {
    border-color: #999999;
    border-top-color: #333333;
}

body.exposure--1 .scroll-loading p {
    color: #333333;
}

body.exposure-0 .scroll-spinner {
    border-color: #cccccc;
    border-top-color: #666666;
}

body.exposure-0 .scroll-loading p {
    color: #666666;
}

body.exposure-1 .scroll-spinner {
    border-color: #dddddd;
    border-top-color: #666666;
}

body.exposure-1 .scroll-loading p {
    color: #666666;
}

body.exposure-2 .scroll-spinner {
    border-color: #eeeeee;
    border-top-color: #666666;
}

body.exposure-2 .scroll-loading p {
    color: #666666;
}

body.exposure-3 .scroll-spinner {
    border-color: #f0f0f0;
    border-top-color: #666666;
}

body.exposure-3 .scroll-loading p {
    color: #666666;
}

/* Gallery container - Clean grid layout */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 2rem 0;
}

/* Zoom level classes */
.gallery-container.zoom-1 {
    grid-template-columns: 1fr;
    gap: 30px;
}

.gallery-container.zoom-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.gallery-container.zoom-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.gallery-container.zoom-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-container.zoom-5 {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.gallery-container.zoom-6 {
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

/* Gallery item - Minimal styling with animation support */
.gallery-item {
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    opacity: 0;
    transform: scale(0.8);
}

.gallery-item.loaded {
    opacity: 1;
    transform: scale(1);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item.loaded:hover {
    transform: scale(1.02);
}

.gallery-item-image {
    width: 100%;
    height: 100%;
    display: block;
    transition: all 0.4s ease;
    filter: grayscale(0.1);
    object-fit: cover;
    object-position: center center;
}

.gallery-item:hover .gallery-item-image {
    filter: grayscale(0);
}

/* Skeleton placeholder for loading state */
.gallery-item-skeleton {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Skeleton animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Cascading animation classes */
.gallery-item.animate-in {
    animation: cascadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cascadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .gallery-item {
        transition: none;
        animation: none;
    }
    
    .gallery-item.loaded {
        opacity: 1;
        transform: scale(1);
    }
    
    .gallery-item-skeleton {
        animation: none;
        background: #f0f0f0;
    }
    
    .gallery-item.animate-in {
        animation: none;
        opacity: 1;
        transform: scale(1);
    }
}

/* Skeleton themes for different exposures */
body.exposure--3 .gallery-item-skeleton {
    background: linear-gradient(90deg, #333333 25%, #222222 50%, #333333 75%);
    background-size: 200% 100%;
}

body.exposure--2 .gallery-item-skeleton {
    background: linear-gradient(90deg, #555555 25%, #444444 50%, #555555 75%);
    background-size: 200% 100%;
}

body.exposure--1 .gallery-item-skeleton {
    background: linear-gradient(90deg, #888888 25%, #777777 50%, #888888 75%);
    background-size: 200% 100%;
}

body.exposure-0 .gallery-item-skeleton {
    background: linear-gradient(90deg, #c8c8c8 25%, #b8b8b8 50%, #c8c8c8 75%);
    background-size: 200% 100%;
}

body.exposure-1 .gallery-item-skeleton {
    background: linear-gradient(90deg, #dddddd 25%, #cccccc 50%, #dddddd 75%);
    background-size: 200% 100%;
}

body.exposure-2 .gallery-item-skeleton {
    background: linear-gradient(90deg, #f5f5f5 25%, #eeeeee 50%, #f5f5f5 75%);
    background-size: 200% 100%;
}

body.exposure-3 .gallery-item-skeleton {
    background: linear-gradient(90deg, #ffffff 25%, #f8f8f8 50%, #ffffff 75%);
    background-size: 200% 100%;
}

.gallery-item-info {
    display: none; /* Hide all metadata in grid view */
}

/* Modal styles - Fullscreen experience */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(168, 168, 168, 0.98);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100vw;
    height: 100vh;
    background: transparent;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
}

.close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    color: #333;
    border: 1px solid #666;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: #333;
}

.modal-image-container {
    position: relative;
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100vw - 350px);
}

#modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    transition: all 0.5s ease;
    transform: scale(0.95);
}

.modal.active #modal-image {
    transform: scale(1);
}

.nav-btn {
    background: transparent;
    color: #333;
    border: 1px solid #666;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    margin: 0.25rem;
}

.nav-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
    border-color: #333;
    transform: scale(1.05);
}

.modal-nav-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.modal-info {
    position: static;
    width: 300px;
    flex-shrink: 0;
    text-align: right;
    color: #333;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#modal-description {
    font-size: 1.1rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 1rem;
    text-align: right;
    line-height: 1.4;
    letter-spacing: 0.05em;
}

.modal-metadata {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #666;
    text-align: right;
}

/* Fix text visibility for exposure-0 */
body.exposure-0 .modal-metadata {
    color: #333;
}

/* Fix text visibility for exposure--1 */
body.exposure--1 .modal-metadata {
    color: #000;
}

/* Fix title color for dark exposures */
body.exposure--3 #modal-description {
    color: #ccc;
}

body.exposure--2 #modal-description {
    color: #ccc;
}

body.exposure--1 #modal-description {
    color: #ccc;
}

.metadata-item::before {
    display: none;
}

/* Error message */
.error-message {
    text-align: center;
    padding: 3rem;
    color: #666;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Upload Modal Styles - Sleek floating design */
.upload-modal-content {
    max-width: 520px;
    width: 85vw;
    max-height: 90vh;
    overflow-y: auto;
    background: transparent;
    border-radius: 0;
    backdrop-filter: none;
    /* Hide scrollbars but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.upload-modal-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.upload-modal-content h2 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 300;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

/* Upload modal text colors for different exposures */
body.exposure--3 .upload-modal-content h2 {
    color: #ffffff;
}

body.exposure--2 .upload-modal-content h2 {
    color: #ffffff;
}

body.exposure--1 .upload-modal-content h2 {
    color: #ffffff;
}

body.exposure-0 .upload-modal-content h2 {
    color: #333333;
}

body.exposure-1 .upload-modal-content h2 {
    color: #000000;
}

body.exposure-2 .upload-modal-content h2 {
    color: #000000;
}

body.exposure-3 .upload-modal-content h2 {
    color: #000000;
}

.upload-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    opacity: 0.8;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.form-group input[type="text"]:hover,
.form-group input[type="password"]:hover,
.form-group input[type="date"]:hover,
.form-group textarea:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 10px 36px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Custom date input styling */
.form-group input[type="date"] {
    position: relative;
    color-scheme: light;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Custom calendar styling to match floating glass theme */
.form-group input[type="date"]::-webkit-datetime-edit {
    padding: 0;
}

.form-group input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.form-group input[type="date"]::-webkit-datetime-edit-text {
    padding: 0 0.2em;
}

.form-group input[type="date"]::-webkit-datetime-edit-month-field,
.form-group input[type="date"]::-webkit-datetime-edit-day-field,
.form-group input[type="date"]::-webkit-datetime-edit-year-field {
    padding: 0 0.1em;
}

.form-group input[type="date"]::-webkit-inner-spin-button,
.form-group input[type="date"]::-webkit-clear-button {
    display: none;
}

/* Style the calendar popup for WebKit browsers */
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Advanced calendar popup styling - this targets the shadow DOM */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.5) opacity(0.6);
    transition: filter 0.3s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    filter: invert(0.3) opacity(1);
}

/* Dark theme calendar indicators */
body.exposure--3 input[type="date"]::-webkit-calendar-picker-indicator,
body.exposure--2 input[type="date"]::-webkit-calendar-picker-indicator,
body.exposure--1 input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.6);
}

body.exposure--3 input[type="date"]::-webkit-calendar-picker-indicator:hover,
body.exposure--2 input[type="date"]::-webkit-calendar-picker-indicator:hover,
body.exposure--1 input[type="date"]::-webkit-calendar-picker-indicator:hover {
    filter: invert(1) opacity(1);
}

/* Custom calendar styling - Note: Limited browser support for styling calendar popup */
/* This is a fallback approach using CSS custom properties */
:root {
    --calendar-bg: rgba(255, 255, 255, 0.95);
    --calendar-text: #333333;
    --calendar-border: rgba(255, 255, 255, 0.25);
    --calendar-hover: rgba(255, 255, 255, 0.1);
}

/* Dark theme calendar variables */
body.exposure--3 {
    --calendar-bg: rgba(51, 51, 51, 0.95);
    --calendar-text: #ffffff;
    --calendar-border: rgba(255, 255, 255, 0.1);
    --calendar-hover: rgba(255, 255, 255, 0.05);
}

body.exposure--2 {
    --calendar-bg: rgba(85, 85, 85, 0.95);
    --calendar-text: #ffffff;
    --calendar-border: rgba(255, 255, 255, 0.15);
    --calendar-hover: rgba(255, 255, 255, 0.08);
}

body.exposure--1 {
    --calendar-bg: rgba(136, 136, 136, 0.95);
    --calendar-text: #ffffff;
    --calendar-border: rgba(255, 255, 255, 0.2);
    --calendar-hover: rgba(255, 255, 255, 0.12);
}

body.exposure-0 {
    --calendar-bg: rgba(200, 200, 200, 0.95);
    --calendar-text: #333333;
    --calendar-border: rgba(255, 255, 255, 0.25);
    --calendar-hover: rgba(255, 255, 255, 0.15);
}

body.exposure-1 {
    --calendar-bg: rgba(230, 230, 230, 0.95);
    --calendar-text: #000000;
    --calendar-border: rgba(255, 255, 255, 0.3);
    --calendar-hover: rgba(255, 255, 255, 0.2);
}

body.exposure-2 {
    --calendar-bg: rgba(245, 245, 245, 0.95);
    --calendar-text: #000000;
    --calendar-border: rgba(255, 255, 255, 0.35);
    --calendar-hover: rgba(255, 255, 255, 0.25);
}

body.exposure-3 {
    --calendar-bg: rgba(255, 255, 255, 0.95);
    --calendar-text: #000000;
    --calendar-border: rgba(0, 0, 0, 0.1);
    --calendar-hover: rgba(0, 0, 0, 0.05);
}

/* Form element colors for different exposures - Floating glass effect */
body.exposure--3 .form-group label {
    color: #cccccc;
}

body.exposure--3 .form-group input[type="text"],
body.exposure--3 .form-group input[type="password"],
body.exposure--3 .form-group input[type="date"],
body.exposure--3 .form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.exposure--3 .form-group input[type="date"] {
    color-scheme: dark;
}

body.exposure--2 .form-group label {
    color: #cccccc;
}

body.exposure--2 .form-group input[type="text"],
body.exposure--2 .form-group input[type="password"],
body.exposure--2 .form-group input[type="date"],
body.exposure--2 .form-group textarea {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.exposure--2 .form-group input[type="date"] {
    color-scheme: dark;
}

body.exposure--1 .form-group label {
    color: #ffffff;
}

body.exposure--1 .form-group input[type="text"],
body.exposure--1 .form-group input[type="password"],
body.exposure--1 .form-group input[type="date"],
body.exposure--1 .form-group textarea {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.exposure--1 .form-group input[type="date"] {
    color-scheme: dark;
}

body.exposure-0 .form-group label {
    color: #333333;
}

body.exposure-0 .form-group input[type="text"],
body.exposure-0 .form-group input[type="password"],
body.exposure-0 .form-group input[type="date"],
body.exposure-0 .form-group textarea {
    background: rgba(255, 255, 255, 0.15);
    color: #333333;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

body.exposure-1 .form-group label {
    color: #000000;
}

body.exposure-1 .form-group input[type="text"],
body.exposure-1 .form-group input[type="password"],
body.exposure-1 .form-group input[type="date"],
body.exposure-1 .form-group textarea {
    background: rgba(255, 255, 255, 0.2);
    color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.exposure-2 .form-group label {
    color: #000000;
}

body.exposure-2 .form-group input[type="text"],
body.exposure-2 .form-group input[type="password"],
body.exposure-2 .form-group input[type="date"],
body.exposure-2 .form-group textarea {
    background: rgba(255, 255, 255, 0.25);
    color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

body.exposure-3 .form-group label {
    color: #000000;
}

body.exposure-3 .form-group input[type="text"],
body.exposure-3 .form-group input[type="password"],
body.exposure-3 .form-group input[type="date"],
body.exposure-3 .form-group textarea {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Custom file input styling - Floating glass effect */
.file-input-wrapper {
    position: relative;
    width: 100%;
}

.form-group input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-input-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    min-height: 48px;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.file-input-box:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 10px 36px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.file-status-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.file-status-icon.selected {
    opacity: 1;
    transform: scale(1.1);
}

/* File input box colors for different exposures - Floating glass effect */
body.exposure--3 .file-input-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.exposure--3 .file-status-icon {
    color: #cccccc;
}

body.exposure--3 .file-status-icon.selected {
    color: #ffffff;
}

body.exposure--2 .file-input-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.exposure--2 .file-status-icon {
    color: #cccccc;
}

body.exposure--2 .file-status-icon.selected {
    color: #ffffff;
}

body.exposure--1 .file-input-box {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.exposure--1 .file-status-icon {
    color: #ffffff;
}

body.exposure--1 .file-status-icon.selected {
    color: #ffffff;
}

body.exposure-0 .file-input-box {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

body.exposure-0 .file-status-icon {
    color: #333333;
}

body.exposure-0 .file-status-icon.selected {
    color: #333333;
}

body.exposure-1 .file-input-box {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.exposure-1 .file-status-icon {
    color: #000000;
}

body.exposure-1 .file-status-icon.selected {
    color: #000000;
}

body.exposure-2 .file-input-box {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

body.exposure-2 .file-status-icon {
    color: #000000;
}

body.exposure-2 .file-status-icon.selected {
    color: #000000;
}

body.exposure-3 .file-input-box {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.exposure-3 .file-status-icon {
    color: #000000;
}

body.exposure-3 .file-status-icon.selected {
    color: #000000;
}

.file-input-wrapper:focus-within .file-input-box {
    border-color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.file-preview {
    margin-top: 0.75rem;
    text-align: center;
    height: 120px; /* Fixed height to prevent layout shift */
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    width: 160px; /* Fixed width for 4:3 aspect ratio */
    height: 120px; /* Fixed height for 4:3 aspect ratio */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 3;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-placeholder:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.preview-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-placeholder img[src]:not([src=""]) {
    opacity: 1;
}

/* Preview placeholder colors for different exposures */
body.exposure--3 .preview-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.exposure--2 .preview-placeholder {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.exposure--1 .preview-placeholder {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.exposure-0 .preview-placeholder {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

body.exposure-1 .preview-placeholder {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.exposure-2 .preview-placeholder {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

body.exposure-3 .preview-placeholder {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.1em;
    text-transform: lowercase;
    font-weight: 300;
    border: none;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Button colors for different exposures - Floating glass effect */
body.exposure--3 .btn-primary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.exposure--3 .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #cccccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.exposure--2 .btn-primary {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

body.exposure--2 .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #cccccc;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.exposure--1 .btn-primary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.exposure--1 .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.exposure-0 .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: #333333;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

body.exposure-0 .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #333333;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

body.exposure-1 .btn-primary {
    background: rgba(255, 255, 255, 0.25);
    color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

body.exposure-1 .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.exposure-2 .btn-primary {
    background: rgba(255, 255, 255, 0.3);
    color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

body.exposure-2 .btn-secondary {
    background: rgba(255, 255, 255, 0.25);
    color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

body.exposure-3 .btn-primary {
    background: rgba(0, 0, 0, 0.1);
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

body.exposure-3 .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.upload-progress {
    margin-top: 1rem;
    text-align: center;
    height: 4px; /* Fixed height to prevent layout shift */
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #666;
    width: 0%;
    transition: width 0.3s ease;
}

.upload-progress.active .progress-fill {
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.upload-error {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 4px;
    color: #c53030;
}

.upload-error p {
    margin: 0;
    font-size: 0.9rem;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1rem;
    }
    
    .nav {
        gap: 2rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
    
    .gallery-controls {
        top: 2.1rem;
        right: 1.5rem;
    }
    
    /* Hide zoom controls on mobile */
    .zoom-controls {
        display: none;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    /* Override zoom classes on mobile - always use responsive grid */
    .gallery-container.zoom-1,
    .gallery-container.zoom-2,
    .gallery-container.zoom-3,
    .gallery-container.zoom-4,
    .gallery-container.zoom-5,
    .gallery-container.zoom-6 {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    /* Hide navigation buttons on mobile in modal */
    .nav-btn {
        display: none !important;
    }
    
    /* Hide the entire navigation button container on mobile */
    .modal-nav-buttons {
        display: none !important;
    }
    
    /* Mobile close button - fixed at top-right, always visible */
    .close-btn {
        position: fixed;
        top: max(0.5rem, env(safe-area-inset-top, 0px)); /* Stay close to top edge, respect safe areas */
        right: max(0.5rem, env(safe-area-inset-right, 0px)); /* Stay close to right edge, respect safe areas */
        width: 35px;
        height: 35px;
        min-width: 35px; /* Prevent squishing */
        min-height: 35px; /* Prevent squishing */
        font-size: 1rem;
        flex-shrink: 0; /* Prevent the button from shrinking */
        border-radius: 50% !important; /* Force circular shape */
        z-index: 1002; /* Ensure it stays above other content */
        margin: 0; /* Remove margins since we're using fixed positioning */
    }
    
    /* Mobile modal - proper vertical flow with scrolling */
    .modal-content {
        flex-direction: column;
        gap: 0; /* Remove gap, use margins instead for better control */
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px) + 80px); /* Extra padding for bottom address bars */
        height: 100vh; /* Full viewport height */
        overflow-y: auto;
        align-items: stretch;
        justify-content: flex-start;
        /* Enable smooth scrolling on mobile */
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .modal-image-container {
        max-width: 100%;
        height: auto;
        flex: 0 0 auto; /* Don't grow or shrink, use natural size */
        margin-top: 3rem; /* Increased space above image to clear the X button */
        margin-bottom: 1rem; /* Space below image */
    }
    
    #modal-image {
        max-width: 100%;
        max-height: 60vh; /* Increased from 50vh to give more space for image */
        width: auto;
        height: auto;
    }
    
    .modal-info {
        position: static;
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        flex: 0 0 auto; /* Don't grow or shrink, use natural size */
        order: 2;
        /* Ensure metadata is always visible and scrollable */
        min-height: auto;
    }
    
    #modal-description,
    .modal-metadata {
        text-align: center;
    }
    
    /* Center globe container on mobile */
    .globe-container {
        align-self: center;
        margin: 1rem auto;
    }
}

@media (max-width: 480px) {
    .nav {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    /* Mobile modal image adjustments */
    #modal-image {
        max-width: 95vw;
        max-height: 50vh; /* Increased from 45vh to give more space for image while ensuring metadata is visible */
    }
    
    .modal-content {
        padding: 0.5rem;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px) + 80px); /* Extra padding for bottom address bars */
    }
    
    .modal-image-container {
        margin-bottom: 0.5rem;
    }
    
    .modal-info {
        padding: 0.5rem 0;
    }
    
    /* Mobile upload modal adjustments */
    .upload-modal-content {
        max-height: 98vh;
        width: 95vw;
    }
    
    .upload-form {
        padding: 1rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-group label {
        margin-bottom: 0.25rem;
        font-size: 0.85rem;
    }
    
    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group input[type="date"],
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .form-group textarea {
        min-height: 50px;
    }
    
    .file-preview {
        height: 100px;
        margin-top: 0.5rem;
    }
    
    .preview-placeholder {
        width: 133px; /* Maintain 4:3 ratio */
        height: 100px;
    }
    
    .form-actions {
        margin-top: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* Animation keyframes for smooth image transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal.active .modal-content {
    animation: fadeIn 0.5s ease;
}

/* Enhanced hover effects */
.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.05);
}

/* Globe container styles for modal */
.globe-container {
    width: 160px;
    height: 160px;
    margin: 0.5rem 0 0.75rem 0;
    filter: grayscale(1) contrast(1.05) brightness(0.9);
    border-radius: 50%; /* Make it circular */
    overflow: hidden; /* hide canvas edges and ensure circular crop */
    position: relative;
    align-self: flex-end; /* Position in bottom-right of modal info panel */
}

/* Center globe on mobile */
@media (max-width: 768px) {
    .globe-container {
        align-self: center !important;
    }
}

/* Ensure canvas fills the container and maintains aspect ratio */
.globe-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover; /* Ensure full coverage within circular container */
}

/* Custom Calendar Component Styles */
.custom-calendar {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem;
    width: auto; /* Will be set dynamically to match input width */
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
}

.custom-calendar.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-month-year {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.05em;
}

.calendar-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    color: #333;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 0.5rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
    color: #666;
    padding: 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #333;
    position: relative;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.calendar-day.disabled {
    color: #999;
    cursor: not-allowed;
    opacity: 0.4;
}

.calendar-day.disabled:hover {
    background: transparent;
    transform: none;
}

.calendar-day.selected {
    background: rgba(255, 255, 255, 0.4);
    color: #000;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calendar-day.today {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.calendar-day.today.selected {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Calendar themes for different exposures */
body.exposure--3 .custom-calendar {
    background: rgba(51, 51, 51, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.exposure--3 .calendar-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.exposure--3 .calendar-month-year {
    color: #ffffff;
}

body.exposure--3 .calendar-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.exposure--3 .calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.exposure--3 .calendar-weekday {
    color: #cccccc;
}

body.exposure--3 .calendar-day {
    color: #ffffff;
}

body.exposure--3 .calendar-day:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.exposure--3 .calendar-day.disabled {
    color: #666;
}

body.exposure--3 .calendar-day.selected {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.exposure--3 .calendar-day.today {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

body.exposure--2 .custom-calendar {
    background: rgba(85, 85, 85, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
}

body.exposure--2 .calendar-header {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

body.exposure--2 .calendar-month-year {
    color: #ffffff;
}

body.exposure--2 .calendar-nav-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

body.exposure--2 .calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

body.exposure--2 .calendar-weekday {
    color: #cccccc;
}

body.exposure--2 .calendar-day {
    color: #ffffff;
}

body.exposure--2 .calendar-day:hover {
    background: rgba(255, 255, 255, 0.15);
}

body.exposure--2 .calendar-day.disabled {
    color: #777;
}

body.exposure--2 .calendar-day.selected {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

body.exposure--2 .calendar-day.today {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
}

body.exposure--1 .custom-calendar {
    background: rgba(136, 136, 136, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
}

body.exposure--1 .calendar-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

body.exposure--1 .calendar-month-year {
    color: #ffffff;
}

body.exposure--1 .calendar-nav-btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

body.exposure--1 .calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.exposure--1 .calendar-weekday {
    color: #ffffff;
}

body.exposure--1 .calendar-day {
    color: #ffffff;
}

body.exposure--1 .calendar-day:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.exposure--1 .calendar-day.disabled {
    color: #999;
}

body.exposure--1 .calendar-day.selected {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

body.exposure--1 .calendar-day.today {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

body.exposure-0 .custom-calendar {
    background: rgba(200, 200, 200, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
}

body.exposure-0 .calendar-header {
    border-bottom-color: rgba(255, 255, 255, 0.25);
}

body.exposure-0 .calendar-month-year {
    color: #333333;
}

body.exposure-0 .calendar-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    color: #333333;
}

body.exposure-0 .calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

body.exposure-0 .calendar-weekday {
    color: #666666;
}

body.exposure-0 .calendar-day {
    color: #333333;
}

body.exposure-0 .calendar-day:hover {
    background: rgba(255, 255, 255, 0.25);
}

body.exposure-0 .calendar-day.disabled {
    color: #999999;
}

body.exposure-0 .calendar-day.selected {
    background: rgba(255, 255, 255, 0.35);
    color: #000000;
}

body.exposure-0 .calendar-day.today {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.45);
}

body.exposure-1 .custom-calendar {
    background: rgba(230, 230, 230, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
}

body.exposure-1 .calendar-header {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

body.exposure-1 .calendar-month-year {
    color: #000000;
}

body.exposure-1 .calendar-nav-btn {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: #000000;
}

body.exposure-1 .calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

body.exposure-1 .calendar-weekday {
    color: #666666;
}

body.exposure-1 .calendar-day {
    color: #000000;
}

body.exposure-1 .calendar-day:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.exposure-1 .calendar-day.disabled {
    color: #999999;
}

body.exposure-1 .calendar-day.selected {
    background: rgba(255, 255, 255, 0.4);
    color: #000000;
}

body.exposure-1 .calendar-day.today {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

body.exposure-2 .custom-calendar {
    background: rgba(245, 245, 245, 0.95);
    border-color: rgba(255, 255, 255, 0.35);
}

body.exposure-2 .calendar-header {
    border-bottom-color: rgba(255, 255, 255, 0.35);
}

body.exposure-2 .calendar-month-year {
    color: #000000;
}

body.exposure-2 .calendar-nav-btn {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.45);
    color: #000000;
}

body.exposure-2 .calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.45);
}

body.exposure-2 .calendar-weekday {
    color: #666666;
}

body.exposure-2 .calendar-day {
    color: #000000;
}

body.exposure-2 .calendar-day:hover {
    background: rgba(255, 255, 255, 0.35);
}

body.exposure-2 .calendar-day.disabled {
    color: #999999;
}

body.exposure-2 .calendar-day.selected {
    background: rgba(255, 255, 255, 0.45);
    color: #000000;
}

body.exposure-2 .calendar-day.today {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.55);
}

body.exposure-3 .custom-calendar {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

body.exposure-3 .calendar-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.exposure-3 .calendar-month-year {
    color: #000000;
}

body.exposure-3 .calendar-nav-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
    color: #000000;
}

body.exposure-3 .calendar-nav-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.exposure-3 .calendar-weekday {
    color: #666666;
}

body.exposure-3 .calendar-day {
    color: #000000;
}

body.exposure-3 .calendar-day:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.exposure-3 .calendar-day.disabled {
    color: #999999;
}

body.exposure-3 .calendar-day.selected {
    background: rgba(0, 0, 0, 0.1);
    color: #000000;
}

body.exposure-3 .calendar-day.today {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Hide native date picker */
input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-clear-button {
    display: none;
}


/* Mobile calendar adjustments */
@media (max-width: 768px) {
    .custom-calendar {
        min-width: 260px;
        padding: 0.75rem;
    }
    
    .calendar-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .calendar-month-year {
        font-size: 0.85rem;
    }
    
    .calendar-nav-btn {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
    
    .calendar-weekday {
        font-size: 0.65rem;
        padding: 0.4rem 0;
    }
    
    .calendar-day {
        font-size: 0.75rem;
    }
    
    .calendar-trigger-btn {
        font-size: 0.9rem;
        padding: 0.2rem;
    }
}
