/* Sphere Image Grid - Vanilla CSS Implementation */

.sphere-container {
    position: relative;
    width: 100%;
    height: 100%;
    user-select: none;
    cursor: grab;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Keep images within bounds */
}

.sphere-container:active {
    cursor: grabbing;
}

.sphere-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 10;
    transform-style: preserve-3d;
}

.sphere-item {
    position: absolute;
    pointer-events: auto;
    transition: transform 0.2s ease-out, opacity 0.3s ease;
    will-change: transform, opacity;
}

.sphere-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* Pixel-perfect Instagram Story Gradient */
    padding: 1.5px;
    /* The thickness of the gradient ring */
    background: linear-gradient(45deg, #feda77 5%, #f58529 25%, #dd2a7b 45%, #8134af 70%, #515bd4 95%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sphere-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    /* The literal 'gap' between ring and image */
    border: 2px solid #000;
    background: #000;
}