body {
    margin: 0;
    font-family: sans-serif;
    background-color: #f9f9f9;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 10px;
}
.gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
}
.gallery video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
}
/* Lightbox modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.lightbox.active {
    display: flex;
}
/* Swiper container */
.swiper {
    width: 100vw;
    height: 100vh;
}
.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}
.swiper-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}
/* Add photo and download buttons container */
.bottom-button-group {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;

    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 80%;
    max-width: 300px;
}
/* Buttons inside container */
.bottom-button-group .bottom-button {
    position: static; /* remove fixed */
    width: 100%;
    box-sizing: border-box;
}
/* Original filled button style */
.bottom-button {
    background-color: #dbba84;
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
    user-select: none;
    display: inline-block;
}
.bottom-button:hover {
    background-color: #c4a76f;
}
/* Outline style button */
.bottom-button-outline {
    background-color: transparent !important;
    color: #dbba84 !important;
    border: 2px solid #dbba84 !important;
}
.bottom-button-outline:hover {
    background-color: #dbba84 !important;
    color: white !important;
}
.bottom-button.hidden {
    display: none;
}
/* Close button inside lightbox */
.close-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1010;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    color: white;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}
.close-btn:hover {
    background: rgba(255,255,255,0.6);
}

.logo-container {
    text-align: center;
    padding: 30px 0 10px;
}

.logo-container img {
    max-width: 200px;
    height: auto;
}

.button-container {
    height: calc(100vh - 200px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-direction: column;
}

.upload-label,
.gallery-button {
    display: inline-block;
    padding: 16px 32px;
    background-color: #dbba84;
    color: white;
    border-radius: 12px;
    font-size: 18px;
    width: 80%;
    max-width: 300px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

.upload-label:hover,
.gallery-button:hover {
    background-color: #dbba84;
}

.countdown-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.countdown-title {
    font-size: 30px;
    color: #dbba84;
    padding-top: 2%;
}

.timer {
    font-size: 45px;
    font-weight: bold;
    color: #333;
}

.gallery-item {
    position: relative;
}

.gallery-item.selected {
    outline: 4px solid #dbba84;
    border-radius: 8px;
}

.select-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    background-color: #dbba84;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gallery-item.selected .select-overlay {
    opacity: 1;
}

.selection-bar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 58px;
    background: white;
    color: #dbba84;
    border-bottom: 2px solid #dbba84;
    display: flex;
    justify-content: center;   /* centered buttons */
    align-items: center;
    gap: 12px;                 /* spacing between buttons */
    padding: 0 10px;           /* smaller side padding */
    z-index: 2000;
    font-family: inherit;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.selection-bar button {
    background-color: transparent;
    border: 2px solid #dbba84;
    border-radius: 10px;
    padding: 8px 14px;
    color: #dbba84;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.selection-bar button:hover {
    background-color: #dbba84;
    color: white;
}

.selection-bar.hidden {
    display: none;
}


#download-selected-btn.hidden {
    display: none;
}

#download-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    font-family: sans-serif;
}

#download-overlay.hidden {
    display: none;
}

#upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    font-family: sans-serif;
}

#upload-overlay.hidden {
    display: none;
}

.overlay-content .spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #dbba84;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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