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

html, body {
    height: 100%;
    overflow-x: hidden;
    border: none;
    outline: none;
}

body {
    font-family: Impact, 'Arial Black', sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: transparent;
    z-index: 100;
    cursor: pointer;
    pointer-events: none;
}

.site-header * {
    pointer-events: auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: #ffffff;
    mix-blend-mode: difference;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.header-text {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.6;
    color: #ffffff;
    mix-blend-mode: difference;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* Main content area */
.main-content {
    margin-top: 0;
    width: 100%;
    min-height: 100vh;
    padding: 0;
    background: #ffffff;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: row dense;
    gap: 0;
    padding: 1px;
    background: #ffffff;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
    transition: grid-area 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 1;
    border: 1px solid #ffffff;
}

.gallery-item.stopped {
    transition: none !important;
}

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

/* Mix grid sizes - create varied layout with dense packing */
.gallery-item:nth-child(3n) {
    grid-row: span 2;
    aspect-ratio: auto;
}

.gallery-item:nth-child(5n) {
    grid-column: span 2;
    aspect-ratio: auto;
}

.gallery-item:nth-child(7n) {
    grid-row: span 2;
    grid-column: span 2;
    aspect-ratio: auto;
}

.gallery-item:nth-child(11n) {
    grid-row: span 2;
    aspect-ratio: auto;
}

.gallery-item:nth-child(13n) {
    grid-column: span 2;
    aspect-ratio: auto;
}

/* Info Modal (fullscreen) */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
}

.info-modal.active {
    display: flex;
}

.info-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: #666;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, color 0.3s;
    z-index: 1001;
}

.info-close:hover {
    opacity: 0.6;
    color: #333;
}

.info-content {
    max-width: 800px;
    width: 90%;
    padding: 4rem 2rem;
    text-align: center;
}

.info-description {
    font-size: 1.1rem;
    color: #666;
    white-space: pre-wrap;
    line-height: 2;
    margin-bottom: 3rem;
}

.info-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    text-decoration: none;
    transition: opacity 0.3s;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
}

.info-link:hover {
    opacity: 0.6;
}

.info-link svg {
    width: 28px;
    height: 28px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    width: 95%;
    height: 95%;
    max-width: 1600px;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
    pointer-events: none;
}

.lightbox-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    width: 100%;
    position: relative;
    pointer-events: auto;
}

.lightbox-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.1));
}

.lightbox-media iframe {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
}

.lightbox-text {
    flex: 0 0 auto;
    width: 100%;
    max-width: 800px;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    font-size: 2.5rem;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: center;
    max-height: 30vh;
}

.lightbox-text:empty {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: opacity 0.3s, color 0.3s;
    padding: 0;
    z-index: 10001;
    pointer-events: auto;
}

.lightbox-close:hover {
    opacity: 0.6;
    color: #333;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    width: 40px;
    pointer-events: auto;
    z-index: 10001;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, color 0.3s;
    padding: 0;
}

.lightbox-nav:hover {
    opacity: 0.6;
    color: #333;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

/* Login Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.login-modal.active {
    display: flex;
}

.login-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
}

.login-content h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 300;
    text-align: center;
}

.login-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-content input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* Admin Panel */
.admin-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, background 0.3s;
    z-index: 1000;
}

.admin-toggle:hover {
    transform: scale(1.1);
    background: #555;
}

.admin-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
}

.admin-panel.active {
    right: 0;
}

.admin-content {
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background: #666;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.logout-btn:hover {
    background: #555;
}

.admin-header h2 {
    font-size: 1.5rem;
    font-weight: 300;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.admin-section {
    margin-bottom: 2rem;
}

.admin-section h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#uploadForm {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#imageInput {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

button {
    padding: 0.75rem 1.5rem;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

button:hover {
    background: #555;
}

#textInput {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
}

#instagramInput,
#webshopInput,
#emailInput {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.image-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.image-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.image-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.image-item-info {
    flex: 1;
    font-size: 0.85rem;
    color: #666;
}

.delete-btn {
    padding: 0.5rem 1rem;
    background: #dc3545;
    font-size: 0.85rem;
}

.delete-btn:hover {
    background: #c82333;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 1.5rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        grid-auto-rows: 150px;
        gap: 0;
        padding: 0;
        background: #ffffff;
    }

    .info-content {
        padding: 3rem 1.5rem;
    }

    .info-close {
        top: 1rem;
        right: 1rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .lightbox-content {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        height: 100%;
        padding: 0;
    }

    .lightbox-media {
        flex: 1;
        min-height: 0;
        padding: 0 1rem;
        width: 100%;
    }

    .lightbox-text {
        flex: 0 0 auto;
        max-width: 100%;
        padding: 1rem 1.5rem;
        max-height: 35vh;
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .admin-panel {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        grid-auto-rows: 120px;
        gap: 0;
        padding: 0;
        background: #ffffff;
    }

    .admin-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 44px;
        height: 44px;
        font-size: 1.75rem;
    }

    .lightbox-content {
        gap: 0.75rem;
    }

    .lightbox-media {
        padding: 0 0.75rem;
    }

    .lightbox-text {
        font-size: 1rem;
        padding: 0.75rem 1rem;
        max-height: 30vh;
        line-height: 1.5;
    }

    .lightbox-nav {
        width: 48px;
        height: 48px;
        font-size: 1.75rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }
}

/* Footer */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background: transparent;
    z-index: 100;
    pointer-events: none;
}

.site-footer * {
    pointer-events: auto;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    font-size: 0.85rem;
    color: #ffffff;
    mix-blend-mode: difference;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s;
    mix-blend-mode: difference;
}

.footer-links a:hover {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 1rem 1.5rem;
    }
    
    .footer-links {
        font-size: 0.75rem;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: 0.75rem 1rem;
    }
    
    .footer-links {
        font-size: 0.7rem;
    }
}

/* Footer on legal pages (white background) */
.legal-footer .footer-links {
    color: #666;
    text-shadow: none;
    mix-blend-mode: normal;
}

.legal-footer .footer-links a {
    color: #666;
    mix-blend-mode: normal;
}

.legal-footer .footer-links a:hover {
    color: #1a1a1a;
}

