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

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

header {
    background-color: #fff;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.theme-toggle {
    background: transparent;
    border: 2px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    padding: 0;
    margin-left: auto;
}

.collections-nav {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.collection-btn {
    background: transparent;
    border: 2px solid #ddd;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.collection-btn:hover {
    border-color: #333;
    color: #333;
    transform: translateY(-2px);
}

.collection-btn.active {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.gallery-container {
    width: 100%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 0;
}

.gallery-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Creates square aspect ratio */
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 4px;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img,
.gallery-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

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

.lightbox-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 90%;
    gap: 1.5rem;
}

.lightbox-content {
    max-width: 100%;
    max-height: calc(90vh - 150px);
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-info {
    text-align: center;
    color: #fff;
    max-width: 600px;
    padding: 0 2rem;
}

.lightbox-name {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.lightbox-description {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0;
    margin: 0;
}

.lightbox-close:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    pointer-events: all;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .collections-nav {
        gap: 0.5rem;
    }

    .collection-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
    }

    .lightbox-nav {
        padding: 0 1rem;
    }

    .lightbox-content-wrapper {
        max-width: 95%;
        gap: 1rem;
    }

    .lightbox-info {
        padding: 0 1rem;
    }

    .lightbox-name {
        font-size: 1.25rem;
    }

    .lightbox-description {
        font-size: 0.9rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* Dark Theme */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-theme header {
    background-color: #2a2a2a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-theme .collection-btn {
    border-color: #555;
    color: #ccc;
}

body.dark-theme .collection-btn:hover {
    border-color: #888;
    color: #fff;
}

body.dark-theme .collection-btn.active {
    background-color: #fff;
    color: #1a1a1a;
    border-color: #fff;
}

body.dark-theme .gallery-item {
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-theme .gallery-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

body.dark-theme .theme-toggle {
    border-color: #555;
    color: #fff;
}

body.dark-theme .theme-toggle:hover {
    border-color: #888;
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .lightbox-close {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
