/* ----------------------------------------------------------
   Ball Gallery — sits inside .side / .sleeve__content from
   home.css, so it inherits the site's fonts, frosted panel,
   and pink hover-glow accent already used elsewhere.
---------------------------------------------------------- */

/* Strip the frosted white card look for the Gallery page only,
   so the photos sit directly on the page's own background
   instead of on a separate rounded panel. */
.sleeve__content--transparent {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border-radius: 0;
}

.ball-stage-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.5rem 0 2rem;
}

.ball-hint {
    font-size: 0.85rem;
    opacity: 0.65;
    margin-bottom: 1rem;
    text-align: center;
}

.ball-hint:empty {
    display: none;
}

.ball-stage {
    position: relative;
    width: min(78vmin, 520px);
    height: min(78vmin, 520px);
    max-width: 100%;
    perspective: 1400px;
    cursor: grab;
    background: url('images/vinyl-texture.jpg') center/cover no-repeat;
    border-radius: 50%;
}

.ball-stage.is-dragging {
    cursor: grabbing;
}

/* echoes the homepage vinyl-label */
.ball-spindle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    background: #fff;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 16px 2px rgba(255, 0, 120, 0.45);
}

.ball-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    will-change: transform;
}

.ball-tile {
    position: absolute;
    width: 96px;
    height: 96px;
    margin: -48px 0 0 -48px;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
    transition: border-color .2s ease, box-shadow .2s ease, filter .2s ease;
    cursor: pointer;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.ball-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Hover feedback stays to border/glow/brightness only — each tile's
   real position AND facing comes from an inline transform set in JS,
   so we never touch `transform` here. Changing transform on a tile
   that also sits inside a live-rotating 3D parent is what was
   causing the whole sphere to blank out mid-drag in some browsers. */
.ball-tile:hover {
    border-color: rgba(255, 0, 120, 0.7);
    box-shadow: 0 0 20px rgba(255, 0, 120, 0.45);
    filter: brightness(1.15);
}

/* While dragging, hover states can't keep up with a fast-spinning
   sphere and repeatedly re-triggering them is what caused the
   disappearing-until-refresh bug. Switch them off for the duration
   of the drag. */
.ball-stage.is-dragging .ball-tile {
    pointer-events: none;
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .ball-sphere { transition: none; }
}
