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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: white;
    overflow-x: hidden;
}

/* Version number */
body::before {
    content: "v1.5.0";
    position: fixed;
    top: 8px;
    left: 8px;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.15);
    z-index: 5;
    pointer-events: none;
}

/* Loading spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-spinner.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

/* View system */
.view {
    display: none;
    width: 100%;
    min-height: 100vh;
}

.view.active {
    display: block;
}

/* Slideshow view - full page images with fade transitions */
.scroll-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.scroll-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
}

.scroll-item.active {
    opacity: 1;
    pointer-events: auto;
}

.scroll-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Image info overlay for slideshow */
.image-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.85);
    padding: 12px 16px;
    border-radius: 4px;
    backdrop-filter: blur(8px);
}

.info-name {
    font-size: 15px;
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
}

.info-details {
    font-size: 13px;
    color: #888;
}

.info-extended {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.info-price,
.info-location {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

/* Slideshow navigation arrows */
.slideshow-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 20px;
    pointer-events: none;
}

.slideshow-nav button {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
}

.slideshow-nav button:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: scale(1.05);
}

.slideshow-nav button svg {
    color: #333;
}

/* Grid view */
#grid-view {
    padding: 60px 20px 20px;
    min-height: 100vh;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
    position: relative;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

/* Grid info overlay */
.grid-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 40px 12px 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover .grid-info {
    opacity: 1;
}

.grid-info .info-name {
    font-size: 13px;
    color: white;
    margin-bottom: 2px;
}

.grid-info .info-details {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

.grid-info .info-extended {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
    font-style: italic;
}

/* Bio view */
#bio-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1000;
    overflow-y: auto;
}

.bio-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 80px 40px 40px;
    position: relative;
}

.close-bio {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 40px;
    cursor: pointer;
    color: #333;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.5s ease;
}

.close-bio:hover {
    color: #000;
}

.bio-content h1 {
    font-size: 32px;
    margin-bottom: 24px;
    color: #111;
}

.bio-content p {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 16px;
}

/* Floating navigation */
.floating-nav {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.nav-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-icon:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.nav-icon svg {
    color: #333;
}

.nav-icon.active {
    background: rgba(51, 51, 51, 0.7);
}

.nav-icon.active svg {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-item {
        padding: 10px;
    }

    .image-info {
        bottom: 15px;
        left: 15px;
        padding: 10px 14px;
    }

    .info-name {
        font-size: 14px;
    }

    .info-details {
        font-size: 12px;
    }

    .slideshow-nav {
        padding: 0 10px;
    }

    .slideshow-nav button {
        width: 44px;
        height: 44px;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    /* Make grid info always visible on mobile without dark overlay */
    .grid-info {
        opacity: 1;
        background: none;
        padding: 8px;
    }

    .grid-info .info-name,
    .grid-info .info-details,
    .grid-info .info-extended {
        color: #333;
        text-shadow: 0 0 4px white, 0 0 8px white;
    }

    .bio-container {
        padding: 60px 24px 24px;
    }

    .bio-content h1 {
        font-size: 26px;
    }

    .floating-nav {
        bottom: 20px;
        right: 20px;
    }

    .nav-icon {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .image-info {
        bottom: 80px;
    }

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