@media (max-width: 768px) {
    .tag-hidden-mobile {
        display: none !important;
    }
}
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Pagination styles - high priority placement */
nav.pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 30px 0 !important;
    padding: 20px 0 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

nav.pagination .pagination-numbers {
    display: flex !important;
    gap: 8px !important;
}

nav.pagination a.pagination-link,
nav.pagination span.pagination-link {
    display: inline-block !important;
    padding: 12px 18px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: var(--text-color) !important;
    text-decoration: none !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    min-width: 45px !important;
    text-align: center !important;
}

nav.pagination a.pagination-link:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

nav.pagination span.pagination-current {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    cursor: default !important;
    font-weight: 700 !important;
}

nav.pagination .pagination-prev,
nav.pagination .pagination-next {
    padding: 12px 24px !important;
    font-weight: 600 !important;
}

@media (max-width: 768px) {
    nav.pagination {
        flex-direction: column !important;
        gap: 15px !important;
        margin: 20px 15px !important;
        padding: 20px 15px !important;
    }

    nav.pagination .pagination-numbers {
        order: 1 !important;
    }

    nav.pagination .pagination-prev {
        order: 0 !important;
    }

    nav.pagination .pagination-next {
        order: 2 !important;
    }
}

/* CSS Custom Properties for theming */
:root {
    --bg-color: #1a1e1a;
    --text-color: #e0e0e0;
    --card-bg: rgba(45, 50, 45, 0.15);
    --border-color: rgba(255, 255, 255, 0.1);
    --gallery-header-bg: rgba(45, 50, 45, 0.25);
    --footer-bg: rgba(45, 50, 45, 0.4);
    --date-bg: rgba(64, 68, 64, 0.6);
    --date-color: #b0b0b0;
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Light mode variables */
body.light-mode {
    --bg-color: #f8faf8;
    --text-color: #333;
    --card-bg: rgba(255, 255, 255, 0.25);
    --border-color: rgba(0, 0, 0, 0.1);
    --gallery-header-bg: rgba(255, 255, 255, 0.35);
    --footer-bg: rgba(255, 255, 255, 0.5);
    --date-bg: rgba(248, 252, 248, 0.7);
    --date-color: #495057;
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 200, 255, 0.1) 0%, transparent 50%);
    background-size: 100% 100%;
    background-attachment: fixed;
    transition: all 0.3s ease;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header styles */
.site-header {
    text-align: center;
    padding: 30px 0 20px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    margin-bottom: 0;
    box-shadow:
        0 4px 20px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(255, 255, 255, 0.01) 100%);
    pointer-events: none;
    z-index: 1;
}

.site-header > * {
    position: relative;
    z-index: 2;
}

/* Dark mode toggle */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
    pointer-events: auto;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.8rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.title-main {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1em;
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 0.02em;
}

.title-sub {
    font-size: 0.6em;
    font-weight: 300;
    opacity: 0.8;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.1em;
}

.title-sub2 {
    font-size: 0.4em;
    font-weight: 300;
    opacity: 0.6;
    font-style: italic;
    margin-top: 0.2em;
    display: block;
}

.title-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    transition: opacity 0.3s ease;
}

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

/* Avatar styles */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 0;
}

.site-avatar {
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-image {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.avatar-image:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.location-info {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 300;
    margin-top: 0rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 300;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.contact-email,
.contact-social {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
    font-style: italic;
}

.contact-email:hover,
.contact-social:hover {
    opacity: 1;
    text-decoration: underline;
}

.contact-separator {
    opacity: 0.5;
    font-weight: 400;
}

/* Gallery section styles */
.gallery-section {
    margin-bottom: 20px;
}

.gallery-container {
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    overflow: hidden;
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.gallery-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.06) 100%);
    pointer-events: none;
    z-index: 1;
}

.gallery-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.gallery-header {
    text-align: center;
    padding: 30px 30px 20px 30px;
    background: var(--gallery-header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
}

.gallery-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.gallery-title-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-title-link:hover {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    transform: translateY(-1px);
}

.gallery-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 12px;
    font-style: italic;
    font-weight: 300;
}

.gallery-date {
    display: inline-block;
    padding: 6px 16px;
    background: var(--date-bg);
    color: var(--date-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Photo grid styles */
.photo-grid {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    position: relative;
    z-index: 2;
}

/* Single image constraint */
.photo-grid:has(.photo-item:only-child),
.single-album-grid:has(.photo-item:only-child) {
    display: block;
    text-align: center;
    max-width: 100%;
}

.photo-grid:has(.photo-item:only-child) .photo-item,
.single-album-grid:has(.photo-item:only-child) .photo-item {
    max-width: none;
    display: inline-block;
}

/* Fallback for browsers that don't support :has() */
.photo-grid.single-photo,
.single-album-grid.single-photo {
    display: block;
    text-align: center;
    max-width: 100%;
}

.photo-grid.single-photo .photo-item,
.single-album-grid.single-photo .photo-item {
    max-width: none;
    display: inline-block;
}

.photo-item {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
    width: fit-content;
    height: fit-content;
    flex: 0 0 auto;
}

.photo-item.horizontal-photo {
    align-self: center;
}

.photo-item.vertical-photo {
    align-self: start;
}

.photo-item.wide-photo {
    align-self: center;
    justify-self: center;
}

.photo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 16px;
}

.photo-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.photo-item:hover::before {
    opacity: 1;
}

.photo-item img {
    width: auto;
    height: auto;
    max-width: 300px;
    max-height: 50vh;
    object-fit: contain;
    display: block;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 16px;
    position: relative;
    z-index: 0;
    background-color: rgba(0, 0, 0, 0.1);
    animation: fadeInImage 0.6s ease-out;
    margin: 0;
    padding: 0;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Safari image loading improvement */
.photo-item img:not([src]),
.photo-item img[src=""] {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="9" cy="9" r="2"/><path d="M21 15l-3.086-3.086a2 2 0 00-2.828 0L6 21"/></svg>');
    background-size: 48px 48px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
}

/* Single image gets natural proportions */
.photo-grid:has(.photo-item:only-child) .photo-item img,
.single-album-grid:has(.photo-item:only-child) .photo-item img,
.photo-grid.single-photo .photo-item img,
.single-album-grid.single-photo .photo-item img {
    height: auto;
    width: auto;
    max-height: 50vh;
    max-width: 100%;
}

.photo-item:hover img {
    transform: scale(1.03);
}

/* Image overlay with camera info on hover */
.photo-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 16px;
}

.photo-item:hover::after {
    opacity: 1;
}

/* Quick EXIF preview on hover */
.photo-item .quick-exif {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-item:hover .quick-exif {
    opacity: 1;
    transform: translateY(0);
}

/* Additional glass morphing overlay */
.photo-item {
    position: relative;
    overflow: hidden;
}

.photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 15px;
    border-radius: 0 0 16px 16px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.photo-item:hover .photo-info {
    opacity: 1;
    transform: translateY(0);
}

.photo-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
    letter-spacing: 0.5px;
}

/* See more button styles */
.see-more-container {
    text-align: center;
    margin-top: 20px;
    padding: 20px 0;
    width: 100%;
}

.see-more-button {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.see-more-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    text-decoration: none;
}

/* Single album page styles */
.single-album-nav {
    margin-bottom: 30px;
    margin-top: 20px;
    text-align: center;
}

.back-to-home {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-to-home:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    text-decoration: none;
}

.single-album .gallery-tags .gallery-tag {
    cursor: default;
    pointer-events: none;
}

/* Date, location and share button container */
.dateLocationShare {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    gap: 8px;
    flex-direction: row-reverse;
}

.dateLocationShare .album-share-btn {
    margin: 0;
    flex-shrink: 0;
}

/* Gallery meta row - date and share button on same line */
.gallery-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    gap: 15px;
}

.gallery-meta-row .gallery-date {
    margin: 0;
    flex: 1;
}

.gallery-meta-row .album-share-btn {
    margin: 0;
    flex-shrink: 0;
}

/* Album actions */
.album-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.album-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.album-share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.album-share-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.share-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.album-share-btn:hover .share-icon {
    transform: scale(1.1);
}

.share-text {
    font-weight: 500;
}

/* Album story sections */
.album-story {
    margin: 25px 0;
}

.album-story .story-content {
    line-height: 1.6;
    color: var(--text-color);
}

.album-story-preview {
    margin: 20px 0;
    text-align: center;
}

.story-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.story-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.story-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.story-toggle.expanded .story-arrow {
    transform: rotate(180deg);
}

.story-content {
    margin: 25px 20px 15px 20px;
    line-height: 1.6;
    color: var(--text-color);
    text-align: justify;
    font-family: 'Playfair Display', serif;
}

.story-content p {
    margin-bottom: 1em;
}

.story-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .album-actions {
        margin-top: 15px;
    }

    /* Date, location and share button responsive */
    .dateLocationShare {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .dateLocationShare .album-share-btn {
        align-self: flex-end;
    }

    /* Gallery meta row responsive */
    .gallery-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .gallery-meta-row .album-share-btn {
        align-self: flex-end;
    }

    .album-share-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

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

.single-album-grid {
    /* Use the same styling as the front panel photo-grid */
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    position: relative;
    z-index: 2;
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    padding: 20px; /* Equal padding on all sides */
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Lightbox loading screen - centered to lightbox content */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    color: white;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allow clicks to pass through when hidden */
}

/* Fullscreen loading screen */
.fullscreen-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10001; /* Higher than fullscreen container */
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    color: white;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Loading spinner */
.lightbox-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: lightboxSpin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Loading text */
.lightbox-loading-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    letter-spacing: 0.5px;
}

/* Loading progress bar */
.lightbox-loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 15px;
}

.lightbox-loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    animation: loadingShimmer 1.5s ease-in-out infinite;
}

@keyframes loadingShimmer {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* Mobile responsive loading screen */
@media (max-width: 768px) {
    .lightbox-loading {
        padding: 30px 25px;
        border-radius: 16px;
        max-width: calc(100vw - 40px);
    }

    .lightbox-spinner {
        width: 40px;
        height: 40px;
        margin-bottom: 15px;
    }

    .lightbox-loading-text {
        font-size: 0.85rem;
    }

    .lightbox-loading-progress {
        width: 150px;
        margin-top: 12px;
    }
}

@media (max-width: 480px) {
    .lightbox-loading {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .lightbox-spinner {
        width: 35px;
        height: 35px;
        margin-bottom: 12px;
    }

    .lightbox-loading-text {
        font-size: 0.8rem;
    }

    .lightbox-loading-progress {
        width: 120px;
        height: 3px;
        margin-top: 10px;
    }
}

.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    padding: 20px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease;
    animation: scaleIn 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: block;
}

/* Lightbox photo title */
.lightbox-title {
    text-align: center;
    color: white;
    font-size: 1rem;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 0;
    padding: 20px 35px;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 90%;
    width: auto;
    min-width: 300px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.lightbox-title-container {
    position: absolute;
    right: 30px;
    top: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    padding: 18px;
    font-size: 0.8rem;
    line-height: 1.4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.lightbox-title-container.visible {
    opacity: 1;
    transform: translateX(0);
}

.lightbox-title-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.lightbox-title-text {
    display: block;
    color: #ffffff;
    font-weight: 500;
    font-size: 1em;
    line-height: 1.2;
    margin-bottom: 2px;
}

.lightbox-title-label {
    display: block;
    color: #b0b0b0;
    font-style: italic;
    font-size: 0.75em;
    font-weight: 300;
    opacity: 0.8;
    margin-bottom: 12px;
}

.lightbox-author-name {
    display: block;
    color: #ffffff;
    font-weight: 500;
    font-size: 1em;
    line-height: 1.2;
    margin-bottom: 2px;
}

.lightbox-author-label {
    display: block;
    color: #b0b0b0;
    font-style: italic;
    font-size: 0.75em;
    font-weight: 300;
    opacity: 0.8;
    margin-bottom: 12px;
}

.lightbox-copyright {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    font-size: 0.8rem;
    font-weight: 300;
    text-align: center;
    z-index: 1001;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    white-space: nowrap;
}

/* Lightbox navigation arrows */
.lightbox-nav {
    position: absolute;
    bottom: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1001;
    user-select: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.lightbox-prev {
    right: 200px;
}

.lightbox-next {
    right: 130px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Lightbox share button */
.lightbox-share {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 15px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-share:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Lightbox help button */
.lightbox-help {
    position: absolute;
    bottom: 30px;
    left: 100px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 15px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-help:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Help overlay */
.lightbox-help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1003;
    animation: fadeIn 0.3s ease;
}

.help-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    color: white;
    text-align: left;
}

.help-content h3 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    text-align: center;
}

.help-shortcuts {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.help-shortcuts div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-shortcuts kbd {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 0.9rem;
    margin-right: 10px;
}

.help-close {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.help-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Lightbox counter */
.lightbox-counter {
    position: absolute;
    right: 30px;
    bottom: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1001;
    user-select: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Lightbox EXIF information */
.lightbox-exif {
    position: absolute;
    left: 30px;
    top: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 18px;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.4;
    z-index: 1001;
    max-width: 350px;
    min-height: 140px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.3s ease;
}

.lightbox-exif.visible {
    opacity: 1;
    transform: translateX(0);
}

.lightbox-exif .exif-item {
    display: block;
    margin-bottom: 12px;
    color: #e0e0e0;
}

.lightbox-exif .exif-item:last-child {
    margin-bottom: 0;
}

.lightbox-exif .exif-value {
    display: block;
    color: #ffffff;
    font-weight: 500;
    font-size: 1em;
    line-height: 1.2;
    margin-bottom: 2px;
}

.lightbox-exif .exif-label {
    display: block;
    color: #b0b0b0;
    font-style: italic;
    font-size: 0.75em;
    font-weight: 300;
    opacity: 0.8;
}

/* Light mode lightbox styles */
.light-mode .lightbox {
    background: rgba(255, 255, 255, 0.8);
}

.light-mode .lightbox-content {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .lightbox-title {
    color: #333;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.light-mode .lightbox-title-container {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .lightbox-title-text {
    color: #333;
}

.light-mode .lightbox-title-label {
    color: #666;
}

.light-mode .lightbox-author-name {
    color: #333;
}

.light-mode .lightbox-author-label {
    color: #666;
}

.light-mode .lightbox-copyright {
    color: rgba(0, 0, 0, 0.8);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.light-mode .lightbox-close {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
}

.light-mode .lightbox-nav {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* Smaller size for light mode */
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    /* Position at bottom */
    top: auto;
    bottom: 30px;
    transform: none;
}

.light-mode .lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    /* Adjust hover transform for bottom positioning */
    transform: scale(1.1);
}

.light-mode .lightbox-nav:disabled {
    background: rgba(255, 255, 255, 0.4);
    color: #999;
}

/* Light mode specific positioning for arrows */
.light-mode .lightbox-prev {
    right: 200px; /* Balanced spacing: Prev → Next → Counter */
    bottom: 30px;
}

.light-mode .lightbox-next {
    right: 130px; /* Balanced spacing: Prev → Next → Counter */
    bottom: 30px;
}

/* Mobile adjustments for light mode arrows */
@media (max-width: 768px) {
    .light-mode .lightbox-prev {
        right: 145px; /* Balanced spacing for mobile */
        bottom: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .light-mode .lightbox-next {
        right: 90px; /* Balanced spacing for mobile */
        bottom: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
}

.light-mode .lightbox-counter {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .lightbox-exif {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    color: #333 !important;
    text-shadow: none !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.light-mode .lightbox-exif .exif-item {
    color: #333 !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    transition: none !important;
}

.light-mode .lightbox-exif .exif-value {
    color: #333 !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    transition: none !important;
}

.light-mode .lightbox-exif .exif-label {
    color: #666 !important;
    font-weight: 500 !important;
    text-shadow: none !important;
    transition: none !important;
}

.light-mode .lightbox-exif * {
    color: #333 !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    transition: none !important;
}

/* Safari-specific fix */
@supports (-webkit-appearance: none) {
    .light-mode .lightbox-exif,
    .light-mode .lightbox-exif .exif-item,
    .light-mode .lightbox-exif .exif-value,
    .light-mode .lightbox-exif * {
        color: #333 !important;
        font-weight: 600 !important;
        -webkit-text-fill-color: #333 !important;
        text-shadow: none !important;
        transition: none !important;
    }

    .light-mode .lightbox-exif .exif-label {
        color: #666 !important;
        font-weight: 500 !important;
        -webkit-text-fill-color: #666 !important;
        text-shadow: none !important;
        transition: none !important;
    }
}

/* Light mode quick EXIF hover overlay */
.light-mode .photo-item .quick-exif {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Light mode help button */
.light-mode .lightbox-help {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .lightbox-help:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
}

/* Light mode share buttons */
.light-mode .album-share-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .album-share-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    border-color: rgba(0, 0, 0, 0.2);
}

/* Light mode lightbox share button */
.light-mode .lightbox-share {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .lightbox-share:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
}

/* Footer styles */
.site-footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    opacity: 0.8;
    background: var(--footer-bg);
    transition: all 0.3s ease;
}

.site-footer p {
    margin: 8px 0;
}

.site-footer p:first-child {
    margin-bottom: 12px;
}

/* Hugo link styling */
.site-footer a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    position: relative;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer a:hover {
    opacity: 1;
    color: var(--text-color);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.site-footer a:active {
    transform: translateY(0);
}

/* Light mode footer link styling */
.light-mode .site-footer a {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #666;
}

.light-mode .site-footer a:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .site-title {
        font-size: 2.8rem;
        line-height: 1.1;
    }

    .site-description {
        font-size: 1rem;
        letter-spacing: 0.3px;
    }

    .location-info,
    .contact-info {
        font-size: 0.85rem;
        margin-top: 0.8rem;
        gap: 0.6rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .contact-email,
    .contact-social {
        font-size: 0.8rem;
    }

    .contact-separator {
        display: none;
    }

    .gallery-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .photo-grid,
    .single-album-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 50px;
        padding: 25px;
    }

    .photo-grid:has(.photo-item:only-child),
    .single-album-grid:has(.photo-item:only-child),
    .photo-grid.single-photo,
    .single-album-grid.single-photo {
        display: block;
        text-align: center;
    }

    .photo-grid:has(.photo-item:only-child) .photo-item,
    .single-album-grid:has(.photo-item:only-child) .photo-item,
    .photo-grid.single-photo .photo-item,
    .single-album-grid.single-photo .photo-item {
        max-width: none;
        display: inline-block;
    }

    .container {
        padding: 0 15px;
    }

    .gallery-header {
        padding: 20px;
    }

    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 768px) {
    .header-content {
        gap: 18px;
    }

    .avatar-image {
        width: 80px;
        height: 80px;
    }

    .site-title {
        font-size: 2.8rem;
    }

    .location-info,
    .contact-info {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 20px 0 15px;
    }

    .header-content {
        gap: 15px;
        flex-direction: column;
        text-align: center;
    }

    .avatar-image {
        width: 70px;
        height: 70px;
    }

    .site-title {
        font-size: 2.2rem;
        line-height: 1.1;
        align-items: center;
    }

    .contact-info {
        font-size: 0.8rem;
        margin-top: 0.6rem;
        gap: 0.4rem;
        flex-direction: column;
    }

    .contact-email,
    .contact-social {
        font-size: 0.75rem;
    }

    .gallery-title {
        font-size: 1.8rem;
    }

    .photo-grid,
    .single-album-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 50px;
        padding: 25px;
    }

    .photo-grid:has(.photo-item:only-child),
    .single-album-grid:has(.photo-item:only-child),
    .photo-grid.single-photo,
    .single-album-grid.single-photo {
        display: block;
        text-align: center;
    }

    .photo-grid:has(.photo-item:only-child) .photo-item,
    .single-album-grid:has(.photo-item:only-child) .photo-item,
    .photo-grid.single-photo .photo-item,
    .single-album-grid.single-photo .photo-item {
        max-width: none;
        display: inline-block;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        top: 10px;
        right: 10px;
    }

    /* Mobile lightbox adjustments - buttons below content */
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        position: static !important; /* Back to document flow */
        display: inline-flex;
        margin: 10px 5px;
        z-index: 1001;
    }

    .lightbox-prev {
        right: auto;
        bottom: auto;
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        position: static !important;
        margin-right: 10px;
    }

    .lightbox-next {
        right: auto;
        bottom: auto;
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        position: static !important;
        margin-left: 10px;
    }

    .lightbox-close {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
        top: 15px;
        right: 15px;
    }

    /* Mobile adjustments for action buttons - also below content */
    .lightbox-share {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: auto;
        left: auto;
        position: static !important;
        margin: 10px 5px;
        display: inline-flex;
    }

    .lightbox-help {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: auto;
        left: auto;
        position: static !important;
        margin: 10px 5px;
        display: inline-flex;
    }

    .lightbox-counter {
        font-size: 0.8rem;
        padding: 8px 12px;
        right: auto;
        bottom: auto;
        top: auto;
        position: static !important;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        border-radius: 8px;
        margin: 15px auto;
        text-align: center;
        width: fit-content;
    }

    .lightbox-exif {
        position: static;
        left: auto;
        max-width: none;
        padding: 12px;
        font-size: 0.75rem;
        min-height: 100px;
        order: 3; /* EXIF appears after title container */
        margin: 15px 15px 15px 15px; /* Normal margins - buttons below */
        z-index: 1000;
    }

    .lightbox-exif.mobile-centered {
        display: flex;
        flex-direction: column;
        gap: 8px;
        z-index: 1000;
        max-width: none !important;
        min-height: auto;
        padding: 12px 15px;
        margin-bottom: 0px; /* Remove bottom margin to eliminate space above controls */
    }

    /* Container for mobile control buttons - placed after EXIF */
    .mobile-controls-container {
        order: 4; /* After EXIF panel */
        display: flex;
        flex-direction: row; /* Change to row layout */
        align-items: center;
        justify-content: space-between; /* Spread items to ends */
        gap: 8px; /* Restore gap between buttons */
        padding: 5px 15px; /* Minimal top padding */
        margin-top: 5px; /* Very small gap */
        margin-bottom: 20px;
        width: 100%; /* Full width for proper spacing */
    }

    .mobile-nav-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
    }

    .mobile-action-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
    }

    .lightbox-exif .exif-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
        margin-bottom: 8px;
    }

    .lightbox-exif .exif-row:last-child {
        margin-bottom: 0;
    }

    .lightbox-exif.mobile-centered .exif-row .exif-item:only-child {
        justify-self: center;
        margin: 0 auto;
        max-width: 50%;
    }

    .lightbox-exif.mobile-centered .exif-item {
        flex: 1;
        margin-bottom: 0 !important;
        text-align: center;
        min-width: 0;
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }

    .lightbox-exif.mobile-centered .exif-value {
        font-size: 0.75rem;
        margin-bottom: 2px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .lightbox-exif.mobile-centered .exif-label {
        font-size: 0.65rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .lightbox-exif .exif-item {
        margin-bottom: 8px;
    }

    .lightbox {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start; /* Start from top but allow scrolling */
        padding: 10px; /* Equal padding on all sides */
    }

    .lightbox-content {
        padding: 15px;
        margin: 0 10px 0 10px;
        order: 1;
        max-height: calc(60vh - 20px); /* Limit height to ensure controls are visible */
        overflow: visible;
    }

    .lightbox-content img {
        max-height: calc(60vh - 40px); /* Ensure image doesn't take full height */
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .lightbox-title-container {
        position: static;
        transform: none;
        order: 2; /* Ensure title container appears after image */
        margin: 15px 15px 15px 15px;
        top: auto;
        left: auto;
        right: auto;
        padding: 12px;
        font-size: 0.75rem;
        min-height: auto;
        opacity: 1; /* Ensure visibility in mobile */
    }

    .lightbox-title-text {
        font-size: 0.75rem;
        margin-bottom: 2px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .lightbox-title-label {
        font-size: 0.65rem;
        margin-bottom: 8px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .lightbox-author-name {
        font-size: 0.75rem;
        margin-bottom: 2px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .lightbox-author-label {
        font-size: 0.65rem;
        margin-bottom: 8px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .lightbox-copyright {
        font-size: 0.7rem;
        bottom: 20px;
        white-space: normal;
        max-width: 90%;
        text-align: center;
    }

    /* Light mode adjustments for mobile title container */
    .light-mode .lightbox-title-text {
        color: #333;
        text-shadow: none;
    }

    .light-mode .lightbox-title-label {
        color: #666;
        text-shadow: none;
    }

    .light-mode .lightbox-author-name {
        color: #333;
        text-shadow: none;
    }

    .light-mode .lightbox-author-label {
        color: #666;
        text-shadow: none;
    }

    .light-mode .lightbox-copyright {
        color: rgba(0, 0, 0, 0.8);
        text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
    }

    .lightbox-title {
        font-size: 1rem;
        margin-top: 15px;
        padding: 0 10px;
    }

@media (max-width: 360px) {
    /* Very small mobile screens */
    .site-title {
        font-size: 1.8rem;
    }

    .photo-grid,
    .single-album-grid {
        grid-auto-rows: minmax(auto, max-content);
        padding: 25px;
        gap: 50px;
    }

    .lightbox-exif {
        left: 10px;
        max-width: 200px;
        padding: 10px;
        font-size: 0.7rem;
        min-height: 80px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        right: 115px;
        bottom: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .lightbox-next {
        right: 70px;
        bottom: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .lightbox-counter {
        right: 10px;
        font-size: 0.75rem;
        padding: 6px 10px;
        bottom: 15px !important;
        top: auto !important;
    }

    .lightbox-content {
        padding: 10px;
        margin: 0 5px;
    }
}

/* Pagination styles */
.container .pagination,
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 0;
}

.container .pagination-numbers,
.pagination-numbers {
    display: flex;
    gap: 5px;
}

.container .pagination-link,
.pagination-link {
    display: inline-block;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
}

.container .pagination-link:hover,
.pagination-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.container .pagination-current,
.pagination-current {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    cursor: default;
    font-weight: 700;
}

.container .pagination-prev,
.container .pagination-next,
.pagination-prev,
.pagination-next {
    padding: 10px 20px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 15px;
    }

    .pagination-numbers {
        order: 1;
    }

    .pagination-prev {
        order: 0;
    }

    .pagination-next {
        order: 2;
    }
}

/* Photo Search Section */
.photo-search-section {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 20px 0;
    background: rgba(45, 50, 45, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s ease;
    outline: none;
}

.photo-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    right: 20px;
    color: var(--text-color);
    opacity: 0.6;
    font-size: 1.1rem;
    pointer-events: none;
}

/* Light mode search styles */
.light-mode .photo-search-section {
    background: rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .photo-search-input {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

.light-mode .photo-search-input:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.light-mode .search-icon {
    color: #666;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
        padding: 0 15px;
    }

    .photo-search-input {
        font-size: 0.9rem;
        padding: 12px 45px 12px 15px;
    }

    .search-icon {
        right: 15px;
        font-size: 1rem;
    }
}

/* Performance Optimizations */

/* Image loading states */
.gallery-item img {
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.gallery-item img:not(.loaded) {
    filter: blur(5px);
}

.gallery-item img.loaded {
    filter: none;
}

/* Slow connection optimizations */
.slow-connection .gallery-item img {
    filter: contrast(1.1) brightness(1.05);
}

.slow-connection .photo-grid,
.slow-connection .single-album-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
    /* Reduce animations on mobile */
    .gallery-item img:hover {
        transform: none;
    }

    /* Optimize grid for mobile */
    .photo-grid,
    .single-album-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }

    /* Reduce backdrop filter blur for better performance */
    .site-header {
        backdrop-filter: blur(10px);
    }

    .theme-toggle {
        backdrop-filter: blur(5px);
    }

    /* Optimize lightbox for mobile */
    .lightbox-image {
        max-height: 80vh;
        object-fit: contain;
    }

    /* Reduce shadow complexity on mobile */
    .gallery-section,
    .site-footer {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .gallery-item img {
        transition: none !important;
    }

    .lightbox-image {
        transition: none !important;
    }
}

/* Connection-aware optimizations */
@media (max-width: 480px) and (orientation: portrait) {
    /* Very small screens - maintain 3 column layout */
    .photo-grid,
    .single-album-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-item img {
        height: 120px;
    }
}

/* Mobile portrait orientation - extra spacing for vertical images */
@media (max-width: 768px) and (orientation: portrait) {
    .lightbox-exif {
        margin-bottom: 100px !important; /* Extra space for vertical images on mobile */
    }

    .lightbox-exif.mobile-centered {
        margin-bottom: 100px !important;
        padding-bottom: 20px;
    }

    /* Ensure lightbox container has proper spacing */
    .lightbox-container {
        padding-bottom: 80px;
    }
}

/* Very small screens - additional protection */
@media (max-width: 480px) and (orientation: portrait) {
    .lightbox-exif {
        margin-bottom: 120px !important;
    }

    .lightbox-exif.mobile-centered {
        margin-bottom: 0px !important;
    }
}

/* High-DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .gallery-item img.loaded {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
