* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
}

/* Fullscreen Gallery Container */
.lg-gallery-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #000000;
    z-index: 99999;
}

/* Top Header Bar */
.lg-top-bar {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    z-index: 100;
}

.lg-counter {
    font-size: 14px;
    font-weight: 500;
    color: #cccccc;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lg-counter .event-title {
    font-size: 13px;
    color: #888888;
    border-left: 1px solid #444;
    padding-left: 10px;
}

.lg-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lg-icon-btn {
    background: transparent;
    border: none;
    color: #bbbbbb;
    font-size: 16px;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lg-icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.lg-icon-btn.active {
    color: #e50914;
}

/* Main Viewport */
.lg-main-viewport {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lg-image-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.2s ease;
    border-radius: 10px;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border: solid 3px goldenrod;
}

.lg-main-image {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 8px;
    -moz-border-radius: 8px;
    -webkit-border-radius: 8px;
}

/* Navigation Arrows */
.lg-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 90;
}

.lg-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.lg-nav-prev {
    left: 20px;
}

.lg-nav-next {
    right: 20px;
}

/* Bottom Section (Caption & Thumbnails) */
.lg-bottom-bar {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
}

.lg-caption {
    font-size: 13px;
    color: #dddddd;
    text-align: center;
    padding: 6px 20px;
    min-height: 28px;
    line-height: 1.4;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Thumbnails Strip */
.lg-thumbnails-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 45px;
}

.lg-thumbnails-scroll {
    width: 100%;
    overflow-x: auto;
    display: flex;
    gap: 6px;
    padding: 6px 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
}

.lg-thumbnails-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.lg-thumb-item {
    flex: 0 0 auto;
    width: 80px;
    height: 54px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid white;
    opacity: 0.5;
    transition: all 0.2s ease;
    background: #111;
}

.lg-thumb-item:hover {
    opacity: 0.85;
}

.lg-thumb-item.active {
    opacity: 1;
    border-color: gold;
    /* Highlight border matching LightGallery nature demo */
    transform: scale(1.04);
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.6);
}

.lg-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lg-thumb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 28px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lg-thumb-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.9);
}

.lg-thumb-prev {
    left: 10px;
    border-radius: 3px 0 0 3px;
}

.lg-thumb-next {
    right: 10px;
    border-radius: 0 3px 3px 0;
}

/* Toast notification for URL copy / share */
.lg-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.9);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lg-toast.show {
    opacity: 1;
}