* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #432456;
    background-image: linear-gradient(135deg, #060507 0%, #020102 100%);
    color: #fff;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    padding-top: calc(10vh);
}

.container {
    width: 1500px;
    max-width: 100%;
    background-color: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

nav {
    padding: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

nav a {
    margin-right: 38px;
    margin-bottom: 12px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    position: relative;
    font-size: 20px;
}

#content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 25px 25px;
    overflow-y: auto;
}

.gallery-title {
    font-size: 45px;
    color: #333;
    font-weight: bold;
    margin-bottom: 25px;
    text-align: center;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.8s forwards;
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.masonry-grid {
    column-count: 4;
    column-gap: 20px;
    width: 100%;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
    cursor: pointer;
    transition: all 0.3s ease;
}

.masonry-item:hover {
    transform: translateY(-5px);
}

.masonry-item img {
    width: 100%;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.masonry-item:hover img {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.load-more-text {
    text-align: center;
    color: #020102;
    font-size: 18px;
    font-weight: bold;
    margin: 30px 0;
    opacity: 0;
    animation: fadeIn 1s forwards;
    display: none;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #000000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 100;
    font-size: 12px;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top svg {
    margin-bottom: 2px;
    width: 20px;
    height: 20px;
}

.age-subtitle {
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
    color: #f60202;
}

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

.age-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading-spinner {
    display: none;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(115, 38, 77, 0.2);
    border-radius: 50%;
    border-top-color: #73264d;
    animation: spin 1s ease-in-out infinite;
    margin: 30px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading styles */
.skeleton-container {
    display: none;
    width: 100%;
}

.skeleton-grid {
    column-count: 4;
    column-gap: 20px;
    width: 100%;
}

.skeleton-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 10px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Ad Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.popup-container {
    background-color: white;
    border-radius: 15px;
    padding: 5px;
    width: 90%;
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.9);
    transition: transform 0.5s ease-in-out;
}

.popup-title {
    font-size: 23px;
    color: #333;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.ads-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 15px;
    width: 100%;
}

.ad-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* Reduced gap between ads */
    width: 100%;
    padding: 0 5px; /* Added padding for spacing from edges */
}

.ad-container {
    width: 300px;
    height: 250px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    overflow: hidden;
    cursor: pointer;
    margin: 5px;
    position: relative;
    z-index: 1;
}

.ad-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background: transparent;
    cursor: pointer;
}

@media screen and (max-width: 830px) {
    .mobile-hide {
        display: none;
    }
    
    .ad-container {
        margin: 8px auto; /* Center the single visible ad on mobile */
    }
}

/* Show animation for popup */
.popup-overlay.show {
    opacity: 1;
    display: flex;
}

.popup-overlay.show .popup-container {
    transform: scale(1);
}

/* Responsive styles */
@media screen and (max-width: 1200px) {
    .masonry-grid, .skeleton-grid {
        column-count: 3;
    }
}

@media screen and (max-width: 830px) {
    body {
        padding-top: 5vh;
    }
    
    .container {
        height: auto;
        min-height: 700px;
    }
    
    nav {
        justify-content: center;
    }
    
    .gallery-title {
        font-size: 40px;
        margin-bottom: 25px;
    }
    
    .masonry-grid, .skeleton-grid {
        column-count: 2;
    }
}

@media screen and (max-width: 480px) {
    .container {
        border-radius: 15px;
        min-height: 650px;
    }
    
    nav a {
        margin-right: 15px;
        font-size: 14px;
    }
    
    .gallery-title {
        font-size: 30px;
        margin-bottom: 20px;
    }
    
    .masonry-grid, .skeleton-grid {
        column-count: 2;
        column-gap: 10px;
    }
    
    .masonry-item, .skeleton-item {
        margin-bottom: 10px;
    }
    
    .popup-container {
        padding: 15px;
        width: 95%;
    }
    
    .popup-title {
        font-size: 21px;
        margin-bottom: 15px;
        margin-top: 15px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Load more button styles */
.load-more-button {
    display: none; /* Hide by default, will be shown after initial load */
    margin: 10px auto;
    padding: 12px 25px;
    background-color: #020101;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.load-more-button:hover {
    background-color: #8f3160;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.load-more-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Loading spinner styles - make sure it's visible and centered */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(115, 38, 77, 0.2);
    border-radius: 50%;
    border-top-color: #73264d;
    animation: spin 1s ease-in-out infinite;
    margin: 30px auto;
}

@media screen and (max-width: 480px) {
    .load-more-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Add these styles at the end of your CSS file */

/* Age verification styles */
.age-verification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease-in-out;
}

.age-container {
    width: 90%;
    max-width: 1000px;
    background-color: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: row;
    transform: scale(0.9);
    animation: scaleIn 0.5s ease-in-out forwards;
}

.age-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.age-image {
    flex: 1;
    background-size: cover;
    background-position: center;
    min-height: 700px;
}

.age-title {
    font-size: 32px;
    color: #000;
    font-weight: bold;
    margin-bottom: 30px;
}

.age-button {
    padding: 15px 40px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.age-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.content-hidden {
    opacity: 0;
}

.content-visible {
    animation: contentFadeIn 0.8s ease-in-out forwards;
}

@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 830px) {
    .age-container {
        flex-direction: column-reverse;
    }
    
    .age-image {
        min-height: 500px;
    }
    
    .age-content {
        padding: 30px 10px;
    }
    
    .age-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh; /* Reduced from 90vh to make room for the ad */
    display: block;
    border: 2px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 30px;
    line-height: 40px;
    text-align: center;
    z-index: 2030; /* Ensure close button is above everything */
}

/* Make gallery items show a pointer cursor to indicate they're clickable */
.masonry-item {
    cursor: pointer;
}

/* Navigation buttons for lightbox */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    z-index: 2010;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Banner ads styles */
.banner-ads-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.banner-ad {
    width: 468px;
    height: 250px; /* Changed from 60px to 180px (3x height) */
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

/* Toast notification */
.toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 3000;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    max-width: 80%;
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
}

.toast-notification p {
    margin: 5px 0;
    font-size: 16px;
    font-weight: bold;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}