/* ------------------------ */
/* BODY + GENERAL STYLES */
/* ------------------------ */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #202020;
    color: white;
}

/* ------------------------ */
/* HEADER / H1 SEXY RAINBOW */
/* ------------------------ */
header {
    text-align: center;
    padding: 20px 0;
}

h1 {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 3rem;
    margin: 0;
    animation: rainbow 3s linear infinite;
}

@keyframes rainbow {
    0% { color: red; }
    14% { color: orange; }
    28% { color: yellow; }
    42% { color: green; }
    57% { color: blue; }
    71% { color: indigo; }
    85% { color: violet; }
    100% { color: red; }
}

/* ------------------------ */
/* AGE GATE OVERLAY */
/* ------------------------ */
.overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.overlay-content {
    background-color: #202020;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.overlay-buttons button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
}

/* ------------------------ */
/* PER PAGE SELECT */
/* ------------------------ */
#perPageContainer {
    text-align: center;
    margin: 20px 0;
}

#perPage {
    padding: 5px 10px;
    font-size: 1rem;
}

/* ------------------------ */
/* GALLERY */
/* ------------------------ */
#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 0 20px 20px 20px;
}

.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 300px; /* fikseeritud kõrgus */
    object-fit: cover; /* lõikab pildi nii, et see täidab konteineri */
    display: block;
    border-radius: 5px;
}

/* ------------------------ */
/* PLAY BUTTON FOR GIF/VIDEO */
/* ------------------------ */
.video-thumb {
    display: block;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    text-shadow: 0 0 10px black;
    pointer-events: auto;
    cursor: pointer;
}

/* ------------------------ */
/* PAGINATION CONTROLS */
/* ------------------------ */
#paginationControls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
    gap: 10px;
}

#paginationControls button {
    padding: 5px 15px;
    cursor: pointer;
    font-size: 1rem;
}

/* ------------------------ */
/* LIGHTBOX */
/* ------------------------ */
#lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    flex-direction: column;
}

#lightbox.hidden {
    display: none;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}

/* LIGHTBOX BUTTONS */
#lightbox button {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    text-shadow: 0 0 10px black;
}

#close {
    top: 10px;
    right: 20px;
}

#lbPrev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

#lbNext {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* ------------------------ */
/* FOOTER */
/* ------------------------ */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: white;
}