/* ═══════════════════════════════════════════
   Black Hole Magnet Gallery – Styles v1.0
═══════════════════════════════════════════ */

.bhm-widget {
    position: relative;
    width: 100%;
    background: #060608;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Canvas stack ── */
.bhm-wrap {
    position: relative;
    width: 100%;
    height: 650px;
    overflow: hidden;
    cursor: crosshair;
    background: #060608;
}

.bhm-image-canvas,
.bhm-particle-canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Particles sit above image */
.bhm-image-canvas    { z-index: 1; }
.bhm-particle-canvas { z-index: 2; pointer-events: none; }

/* ── Loader ── */
.bhm-loader {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #060608;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.bhm-loader[style*="display: none"] { display: none !important; }

.bhm-loader span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255,100,0,0.15);
    border-top-color: rgba(255,100,0,0.8);
    animation: bhm-spin 0.85s linear infinite;
}

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

/* ── Overlay UI ── */
.bhm-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    gap: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 45%);
}

/* ── Nav ── */
.bhm-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: all;
}

.bhm-btn-prev,
.bhm-btn-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,100,0,0.35);
    background: rgba(0,0,0,0.5);
    color: rgba(255,140,40,0.9);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.bhm-btn-prev:hover,
.bhm-btn-next:hover {
    border-color: rgba(255,100,0,0.9);
    background: rgba(255,80,0,0.25);
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(255,100,0,0.4);
}

/* ── Dots ── */
.bhm-dots {
    display: flex;
    gap: 9px;
    align-items: center;
}

.bhm-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,100,0,0.3);
    cursor: pointer;
    padding: 0;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
}

.bhm-dot.active {
    background: rgba(255,100,0,0.95);
    transform: scale(1.45);
    box-shadow: 0 0 8px rgba(255,100,0,0.7);
}

/* ── Caption ── */
.bhm-caption {
    color: rgba(255,220,180,0.75);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    min-height: 18px;
    text-shadow: 0 0 12px rgba(255,80,0,0.5);
}

/* ── Lightbox button ── */
.bhm-btn-lb {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,100,0,0.3);
    background: rgba(0,0,0,0.55);
    color: rgba(255,140,40,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.bhm-btn-lb svg { width: 16px; height: 16px; }

.bhm-btn-lb:hover {
    border-color: rgba(255,100,0,0.8);
    background: rgba(255,80,0,0.25);
    box-shadow: 0 0 14px rgba(255,100,0,0.4);
}

/* ── Hint ── */
.bhm-hint {
    position: absolute;
    top: 14px;
    left: 14px;
    color: rgba(255,180,80,0.38);
    font-size: 11px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    pointer-events: none;
    transition: opacity 0.4s;
}

.bhm-wrap:hover .bhm-hint { opacity: 0; }

/* ═══════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════ */
.bhm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(4,2,8,0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.bhm-lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.bhm-lb-inner {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.bhm-lb-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 0 60px rgba(255,80,0,0.25), 0 24px 80px rgba(0,0,0,0.9);
}

.bhm-lb-caption {
    color: rgba(255,200,130,0.55);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
}

.bhm-lb-close {
    position: fixed;
    top: 18px;
    right: 24px;
    background: none;
    border: none;
    color: rgba(255,140,40,0.7);
    font-size: 34px;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    z-index: 1;
    line-height: 1;
}

.bhm-lb-close:hover {
    color: rgba(255,100,0,1);
    transform: rotate(90deg);
}

.bhm-lb-prev,
.bhm-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,80,0,0.1);
    border: 1px solid rgba(255,100,0,0.3);
    color: rgba(255,140,40,0.85);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
}

.bhm-lb-prev { left: 20px; }
.bhm-lb-next { right: 20px; }

.bhm-lb-prev:hover,
.bhm-lb-next:hover {
    background: rgba(255,80,0,0.3);
    box-shadow: 0 0 18px rgba(255,80,0,0.4);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 767px) {
    .bhm-wrap {
        height: 340px !important;
        cursor: default;
    }

    .bhm-lb-prev { left: 8px; }
    .bhm-lb-next { right: 8px; }

    .bhm-lb-prev,
    .bhm-lb-next {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}
