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

/* Loading screen */
#loading-screen {
    position: fixed;
    inset: 0;
    background-color: var(--bg-color);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: opacity 0.8s ease-out;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

#loading-screen img {
    max-width: 150px;
    height: auto;
    opacity: 0.9;
}

.loading-bar-wrap {
    width: 120px;
    height: 1px;
    background-color: rgba(26, 26, 26, 0.15);
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background-color: var(--text-color);
    transition: width 0.3s ease-out;
}

.loading-tagline {
    font-size: 0.8rem;
    color: var(--accent-color);
    letter-spacing: 0.04em;
    font-weight: 300;
    margin-top: -1rem;
}

/* Contribute button */
.contribute-wrap {
    position: fixed;
    top: 2rem;
    right: 3rem;
    z-index: 100;
}

.contribute-btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    background: none;
    border: 1px solid rgba(26, 26, 26, 0.25);
    border-radius: 2px;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.contribute-btn:hover {
    color: var(--text-color);
    border-color: var(--text-color);
}

:root {
    --bg-color: #f5f5f0;
    --text-color: #1a1a1a;
    --accent-color: #666;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.dragging {
    cursor: grabbing;
}

/* Custom cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease-out, opacity 0.15s;
    opacity: 0;
    mix-blend-mode: difference;
}

body:hover .cursor {
    opacity: 1;
}

.cursor.clicking {
    transform: scale(0.7);
}

/* Logo in top-left corner */
.signature {
    position: fixed;
    top: 2rem;
    left: 3rem;
    z-index: 100;
    pointer-events: none;
}

.signature img {
    max-width: 150px;
    height: auto;
    display: block;
    opacity: 0.9;
}

/* Canvas */
.canvas-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.canvas {
    width: 300vw;
    height: 300vh;
    position: relative;
    will-change: transform;
    transition: transform 0.05s ease-out;
}

/* Photo items */
.photo-item {
    position: absolute;
    cursor: grab;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.photo-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.photo-item:active {
    cursor: grabbing;
}

.photo-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

/* Photo captions */
.photo-caption {
    position: absolute;
    bottom: -15px;
    right: 0;
    font-size: 0.65rem;
    color: var(--text-color);
    opacity: 0.6;
    padding: 2px 0;
    pointer-events: none;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-align: right;
}

/* Instructions */
.instructions {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
    animation: fadeInOut 4s ease-in-out forwards;
}

.instructions p {
    font-size: 0.9rem;
    color: var(--accent-color);
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Responsive - Mobile optimization */
@media (max-width: 768px) {
    .signature {
        top: 1rem;
        left: 1rem;
    }

    .contribute-wrap {
        top: 1rem;
        right: 1rem;
    }

    .signature img {
        max-width: 60px; /* Smaller logo on mobile */
    }

    .cursor {
        display: none;
    }

    /* Smaller photos on mobile */
    .photo-item {
        transform: scale(0.7) !important;
        transform-origin: top left;
    }

    .photo-item:hover {
        transform: scale(0.75) !important;
    }

    /* Reduce caption size on mobile */
    .photo-caption {
        font-size: 0.55rem;
        bottom: -12px;
    }
}
