/* Gallery Styles */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
}

.gallery-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.gallery-header {
    margin-bottom: 30px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.gallery-header h1 {
    font-size: 2em;
    margin: 0;
    color: #fff;
}

.results-count {
    font-size: 14px;
    color: #888;
    padding: 6px 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    white-space: nowrap;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    background: #2a2a2a;
    border: 2px solid #444;
    color: #e0e0e0;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover {
    background: #333;
    border-color: #666;
}

.filter-btn.active {
    background: #4a9eff;
    border-color: #4a9eff;
    color: #fff;
}

.sort-options select,
.speed-control select,
.time-control input {
    padding: 8px 12px;
    background: #2a2a2a;
    border: 2px solid #444;
    color: #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.view-options {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 12px;
    background: #2a2a2a;
    border: 2px solid #444;
    color: #e0e0e0;
    cursor: pointer;
    border-radius: 6px;
    font-size: 18px;
    transition: all 0.3s;
}

.view-btn:hover {
    background: #333;
}

.view-btn.active {
    background: #4a9eff;
    border-color: #4a9eff;
}

/* Grid View */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: #2a2a2a;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item .type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.gallery-item .qr-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(74, 158, 255, 0.9);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-item .qr-icon:hover {
    background: rgba(74, 158, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.5);
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #888;
}

/* List View */
.gallery-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-list-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.gallery-list-item:hover {
    background: #333;
    border-color: #666;
    transform: translateX(5px);
}

.list-preview {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    overflow: hidden;
    border-radius: 6px;
    background: #1a1a1a;
}

.list-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.list-filename {
    flex: 1;
    font-size: 16px;
    color: #e0e0e0;
    word-break: break-all;
    min-width: 0;
}

.list-qr {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border-radius: 6px;
    padding: 5px;
}

.list-qr-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.list-qr-image:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.list-qr-error {
    color: #888;
    font-size: 12px;
    text-align: center;
}

.list-qr-loading {
    color: #666;
    font-size: 11px;
    text-align: center;
    padding: 10px;
}

.list-type-badge {
    flex-shrink: 0;
    font-size: 24px;
    width: 40px;
    text-align: center;
}

@media (max-width: 768px) {
    .gallery-list-item {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .list-preview {
        width: 100px;
        height: 100px;
    }
    
    .list-filename {
        flex-basis: 100%;
        order: 3;
    }
    
    .list-qr {
        width: 80px;
        height: 80px;
    }
}

/* Slideshow Modal */
.slideshow-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.slideshow-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    overflow: hidden; /* Prevent overflow issues */
    width: 100%;
    height: 100%;
    min-height: 0; /* Allow flex shrinking */
}

/* Fullscreen: container uses full viewport */
.slideshow-modal:fullscreen .slideshow-container,
.slideshow-modal:-webkit-full-screen .slideshow-container,
.slideshow-modal:-moz-full-screen .slideshow-container,
.slideshow-modal:-ms-fullscreen .slideshow-container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    position: relative !important;
    flex: 1 1 100vh !important; /* Take full height in flex parent */
    display: flex !important;
    flex-direction: column !important;
}

/* Hide thumbnails from normal flow in fullscreen */
.slideshow-modal:fullscreen .slideshow-thumbnails,
.slideshow-modal:-webkit-full-screen .slideshow-thumbnails,
.slideshow-modal:-moz-full-screen .slideshow-thumbnails,
.slideshow-modal:-ms-fullscreen .slideshow-thumbnails {
    position: fixed !important;
}

.slideshow-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    font-size: 36px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    transition: background 0.3s, opacity 0.3s ease, visibility 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Fullscreen: close button transition */
.slideshow-modal:fullscreen .slideshow-close,
.slideshow-modal:-webkit-full-screen .slideshow-close,
.slideshow-modal:-moz-full-screen .slideshow-close,
.slideshow-modal:-ms-fullscreen .slideshow-close {
    transition: background 0.3s, opacity 0.3s ease, visibility 0.3s ease;
}

.slideshow-close:hover {
    background: rgba(255, 0, 0, 0.8);
}

.slideshow-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    position: relative;
    overflow: hidden; /* Prevent controls from affecting layout */
    width: 100%;
    height: 100%;
}

/* In fullscreen, remove controls from flex flow completely */
/* Controls removed from flex layout in fullscreen via fixed positioning */

.slideshow-modal.is-fullscreen .slideshow-main .slideshow-controls,
.slideshow-modal:fullscreen .slideshow-main .slideshow-controls,
.slideshow-modal:-webkit-full-screen .slideshow-main .slideshow-controls,
.slideshow-modal:-moz-full-screen .slideshow-main .slideshow-controls,
.slideshow-modal:-ms-fullscreen .slideshow-main .slideshow-controls {
    position: fixed !important;
    /* Completely remove from flex flow - these properties ensure no space is reserved */
    flex: 0 0 0 !important;
    flex-basis: 0 !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    order: 9999 !important;
    width: 100vw !important;
    height: auto !important;
    margin: 0 !important;
    /* Make sure it doesn't affect parent height calculation */
    min-height: 0 !important;
    max-height: none !important;
    /* Remove from document flow completely */
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Fullscreen: main area uses full viewport, controls are overlays */
.slideshow-modal.is-fullscreen .slideshow-main,
.slideshow-modal:fullscreen .slideshow-main,
.slideshow-modal:-webkit-full-screen .slideshow-main,
.slideshow-modal:-moz-full-screen .slideshow-main,
.slideshow-modal:-ms-fullscreen .slideshow-main {
    height: 100vh !important;
    min-height: 100vh !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    /* Controls are positioned fixed, so they don't affect this container's height */
    overflow: visible !important;
    /* Make sure controls don't take up flex space - ignore fixed children */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    /* Ensure fixed children don't affect layout */
    flex: 1 1 100vh !important; /* Take full height */
}

.slideshow-image-container {
    position: relative;
    max-width: 100%;
    max-height: calc(100vh);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    flex: 1 1 auto; /* Take available space in flex container */
}

/* Fullscreen: image container uses full viewport */
.slideshow-modal:fullscreen .slideshow-image-container,
.slideshow-modal:-webkit-full-screen .slideshow-image-container,
.slideshow-modal:-moz-full-screen .slideshow-image-container,
.slideshow-modal:-ms-fullscreen .slideshow-image-container {
    /* Explicit dimensions - don't rely on parent */
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important; /* Absolute positioning to break out of flex constraints */
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: #000 !important; /* Black background in fullscreen */
    z-index: 0 !important; /* Lower than overlays (1000+) */
    display: flex !important; /* Ensure container is visible */
    visibility: visible !important; /* Ensure container is visible */
    overflow: visible !important; /* Allow media to be visible */
    align-items: center !important; /* Center media vertically */
    justify-content: center !important; /* Center media horizontally */
    flex: none !important; /* Don't use flex sizing, use explicit dimensions */
}

.slideshow-image-container img,
.slideshow-image-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    opacity: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Fade out: transition */
.slideshow-image-container img.fade-out,
.slideshow-image-container video.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out; /* Slower fade out */
}

/* Fade in: transition */
.slideshow-image-container img.fade-in,
.slideshow-image-container video.fade-in {
    opacity: 1;
    transition: opacity 0.4s ease-in; /* Faster fade in */
}

/* Initial state for new media - start invisible */
.slideshow-image-container img.fade-start,
.slideshow-image-container video.fade-start {
    opacity: 0;
}

/* Fullscreen: media uses full viewport */
.slideshow-modal:fullscreen .slideshow-image-container img,
.slideshow-modal:fullscreen .slideshow-image-container video,
.slideshow-modal:-webkit-full-screen .slideshow-image-container img,
.slideshow-modal:-webkit-full-screen .slideshow-image-container video,
.slideshow-modal:-moz-full-screen .slideshow-image-container img,
.slideshow-modal:-moz-full-screen .slideshow-image-container video,
.slideshow-modal:-ms-fullscreen .slideshow-image-container img,
.slideshow-modal:-ms-fullscreen .slideshow-image-container video {
    max-width: 100vw !important;
    max-height: 100vh !important;
    min-width: 0 !important;
    min-height: 0 !important;
    width: auto !important;
    height: auto !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 0 !important; /* Lower than overlays (1000+) */
    display: block !important; /* Ensure media is visible */
    visibility: visible !important; /* Ensure media is visible */
    object-fit: contain !important; /* Maintain aspect ratio */
}

.slideshow-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #888;
    font-size: 18px;
    z-index: 1;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    opacity: 1;
    visibility: visible;
}

.slideshow-loading.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    /* Keep display: none for when fully hidden to free up space */
}

/* Fullscreen progress bar */
.fullscreen-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 999;
    display: none;
}

.slideshow-modal.is-fullscreen .fullscreen-progress-bar,
.slideshow-modal:fullscreen .fullscreen-progress-bar,
.slideshow-modal:-webkit-full-screen .fullscreen-progress-bar,
.slideshow-modal:-moz-full-screen .fullscreen-progress-bar,
.slideshow-modal:-ms-fullscreen .fullscreen-progress-bar {
    display: block;
}

.fullscreen-progress-fill {
    height: 100%;
    background: #4a9eff; /* Same color as thumbnail progress */
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.slideshow-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    flex-wrap: wrap;
    min-height: 80px;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
}

.slideshow-controls.visible {
    visibility: visible;
    opacity: 1;
}

/* Fullscreen: controls overlay the media - absolutely positioned */
.slideshow-modal.is-fullscreen .slideshow-controls,
.slideshow-modal:fullscreen .slideshow-controls,
.slideshow-modal:-webkit-full-screen .slideshow-controls,
.slideshow-modal:-moz-full-screen .slideshow-controls,
.slideshow-modal:-ms-fullscreen .slideshow-controls {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    z-index: 1000 !important;
    margin: 0 !important;
    padding: 20px !important;
    min-height: auto !important;
    display: flex !important;
    /* Completely remove from flex flow */
    flex: 0 0 auto !important;
    order: 9999 !important;
    width: 100vw !important;
    height: auto !important;
    /* Ensure it's completely out of flow */
    top: auto !important;
}

/* Fullscreen: thumbnails overlay at top */
.slideshow-modal:fullscreen .slideshow-thumbnails,
.slideshow-modal:-webkit-full-screen .slideshow-thumbnails,
.slideshow-modal:-moz-full-screen .slideshow-thumbnails,
.slideshow-modal:-ms-fullscreen .slideshow-thumbnails {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    z-index: 1000 !important;
    margin: 0 !important;
    padding: 15px 20px !important;
    max-height: 150px !important;
    display: block !important;
}

/* Fullscreen: close button overlay */
.slideshow-modal:fullscreen .slideshow-close,
.slideshow-modal:-webkit-full-screen .slideshow-close,
.slideshow-modal:-moz-full-screen .slideshow-close,
.slideshow-modal:-ms-fullscreen .slideshow-close {
    position: fixed !important;
    z-index: 1001 !important;
    top: 20px !important;
    right: 20px !important;
}

.control-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    font-size: 24px;
    transition: all 0.3s;
    min-width: 50px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.speed-control,
.time-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.time-control input {
    width: 60px;
}

/* Thumbnail Strip */
.slideshow-thumbnails {
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-overflow-scrolling: touch;
    display: block;
}

/* Fullscreen: thumbnails transition and positioning */
.slideshow-modal:fullscreen .slideshow-thumbnails,
.slideshow-modal:-webkit-full-screen .slideshow-thumbnails,
.slideshow-modal:-moz-full-screen .slideshow-thumbnails,
.slideshow-modal:-ms-fullscreen .slideshow-thumbnails {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
}

.thumbnail-strip {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    min-height: 120px;
}

.thumbnail-item {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s;
    background: #2a2a2a;
}

.thumbnail-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

.thumbnail-item.active {
    border-color: #4a9eff;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #4a9eff;
    transition: width 0.1s linear;
    z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .slideshow-controls {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px;
        padding: 12px 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: center;
        align-items: center;
    }
    
    /* Ensure controls stay in row on mobile */
    .slideshow-controls > * {
        flex-shrink: 0;
    }
    
    .control-btn {
        padding: 14px 18px;
        font-size: 20px;
        min-width: 48px;
        min-height: 48px;
    }
    
    .speed-control,
    .time-control {
        font-size: 12px;
        white-space: nowrap;
    }
    
    .speed-control select,
    .time-control input {
        padding: 8px 6px;
        font-size: 12px;
        min-height: 44px;
        width: auto;
    }
    
    .speed-control label,
    .time-control label {
        font-size: 11px;
    }
    
    .time-control span {
        font-size: 11px;
    }
    
    .thumbnail-strip {
        min-height: 80px;
        padding: 15px 10px;
    }
    
    .thumbnail-item {
        width: 70px;
        height: 70px;
    }
    
    .slideshow-close {
        width: 44px;
        height: 44px;
        font-size: 32px;
        top: 10px;
        right: 10px;
    }
    
    .slideshow-image-container {
        padding: 10px;
    }
    
    /* Mobile fullscreen optimizations */
    .slideshow-modal:fullscreen .slideshow-controls,
    .slideshow-modal:-webkit-full-screen .slideshow-controls,
    .slideshow-modal:-moz-full-screen .slideshow-controls,
    .slideshow-modal:-ms-fullscreen .slideshow-controls {
        padding: 15px 10px;
        gap: 10px;
    }
    
    .slideshow-modal:fullscreen .control-btn,
    .slideshow-modal:-webkit-full-screen .control-btn,
    .slideshow-modal:-moz-full-screen .control-btn,
    .slideshow-modal:-ms-fullscreen .control-btn {
        min-width: 52px;
        min-height: 52px;
        padding: 16px 20px;
        font-size: 22px;
    }
    
    .slideshow-modal:fullscreen .slideshow-thumbnails,
    .slideshow-modal:-webkit-full-screen .slideshow-thumbnails,
    .slideshow-modal:-moz-full-screen .slideshow-thumbnails,
    .slideshow-modal:-ms-fullscreen .slideshow-thumbnails {
        max-height: 120px;
        padding: 10px 15px;
    }
    
    .slideshow-modal:fullscreen .thumbnail-item,
    .slideshow-modal:-webkit-full-screen .thumbnail-item,
    .slideshow-modal:-moz-full-screen .thumbnail-item,
    .slideshow-modal:-ms-fullscreen .thumbnail-item {
        width: 60px;
        height: 60px;
    }
}

/* Fullscreen */
.slideshow-modal.fullscreen .slideshow-image-container {
    max-height: calc(100vh - 150px);
}

.slideshow-modal.fullscreen .slideshow-thumbnails {
    padding: 10px;
}

/* QR Code Modal */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-modal-content {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.qr-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 0, 0, 0.7);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.qr-modal-close:hover {
    background: rgba(255, 0, 0, 0.9);
}

.qr-modal-content h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.5em;
    padding-right: 50px;
}

.qr-preview-container {
    text-align: center;
    margin-bottom: 20px;
}

.qr-preview-container img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 2px solid #444;
}

.qr-code-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.qr-code-label {
    color: #aaa;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.qr-code-container img {
    max-width: 300px;
    width: 100%;
    border: 2px solid #4a9eff;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.qr-url-display {
    text-align: center;
    color: #4a9eff;
    font-size: 0.9em;
    word-break: break-all;
    margin: 15px 0;
    padding: 10px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 6px;
}

.qr-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.qr-download-btn,
.qr-download-all-btn {
    padding: 12px 24px;
    background: #4a9eff;
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.qr-download-btn:hover,
.qr-download-all-btn:hover {
    background: #3a8eef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}

.qr-download-all-btn {
    background: #28a745;
}

.qr-download-all-btn:hover {
    background: #218838;
}

