html {
    background: var(--color-black);
}

body {
    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(6, 10, 20, 0.12),
            transparent 55%
        ),
        var(--color-space);

    color: var(--color-star);

    font-family: var(--font-ui);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    user-select: none;
}

.universe {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    isolation: isolate;

    background:
        radial-gradient(
            ellipse at 30% 20%,
            rgba(20, 15, 25, 0.012),
            transparent 42%
        ),
        radial-gradient(
            ellipse at 75% 70%,
            rgba(15, 18, 30, 0.015),
            transparent 45%
        ),
        var(--color-space);
}

.universe::before {
    content: "";

    position: absolute;
    inset: 0;

    z-index: 1;

    pointer-events: none;

    background:
        radial-gradient(
            circle at center,
            transparent 30%,
            rgba(0, 0, 0, 0.40) 110%
        );
}

.universe-content {
    position: relative;

    z-index: 10;

    width: 100%;
    height: 100%;

    pointer-events: none;

    opacity: 0;
    transition: opacity 1.5s var(--ease-smooth);
}

.universe-content.is-active {
    pointer-events: auto;
    opacity: 1;
}

/* =========================================
   CLUSTER NAVIGATION UI (FIX 4 & FIX 5)
========================================= */

.cluster-nav {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
}

/* -----------------------------------------
   FIX 5: Subtle Persistent Back Button
----------------------------------------- */

.cluster-back-btn {
    position: absolute;
    top: clamp(18px, 3vh, 36px);
    left: clamp(18px, 3vw, 36px);

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 7px 14px;

    background: rgba(4, 6, 15, 0.45);
    border: 1px solid rgba(180, 192, 215, 0.12);
    border-radius: 20px;

    color: rgba(235, 239, 255, 0.45);
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: lowercase;

    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;

    opacity: 0;
    pointer-events: none;
    visibility: hidden;

    transition:
        opacity 0.6s var(--ease-smooth),
        visibility 0.6s var(--ease-smooth),
        color 0.25s var(--ease-smooth),
        border-color 0.25s var(--ease-smooth),
        background 0.25s var(--ease-smooth);
}

.cluster-back-btn.is-visible {
    opacity: 0.45;
    pointer-events: auto;
    visibility: visible;
}

.cluster-back-btn:hover {
    opacity: 0.95;
    color: rgba(235, 239, 255, 0.92);
    border-color: rgba(180, 192, 215, 0.35);
    background: rgba(8, 12, 26, 0.75);
}

.cluster-back-arrow {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.25s var(--ease-smooth);
}

.cluster-back-btn:hover .cluster-back-arrow {
    transform: translateX(-2px);
}

.cluster-back-label {
    line-height: 1;
}

/* -----------------------------------------
   FIX 4: Completion Return Button
----------------------------------------- */

.cluster-return-btn {
    position: absolute;
    bottom: clamp(28px, 6vh, 56px);
    left: 50%;
    transform: translateX(-50%) translateY(12px);

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 13px 30px;

    background: rgba(6, 9, 22, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(180, 192, 215, 0.24);
    border-radius: 28px;

    color: rgba(235, 239, 255, 0.88);
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;

    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;

    box-shadow:
        0 0 32px rgba(180, 192, 215, 0.10),
        0 8px 32px rgba(0, 0, 0, 0.55);

    opacity: 0;
    pointer-events: none;
    visibility: hidden;

    transition:
        opacity 0.8s var(--ease-smooth),
        transform 0.8s var(--ease-smooth),
        visibility 0.8s var(--ease-smooth),
        color 0.3s var(--ease-smooth),
        border-color 0.3s var(--ease-smooth),
        box-shadow 0.3s var(--ease-smooth),
        background 0.3s var(--ease-smooth);
}

.cluster-return-btn.is-visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.cluster-return-btn:hover {
    color: #ffffff;
    border-color: rgba(235, 239, 255, 0.55);
    background: rgba(10, 15, 34, 0.92);
    box-shadow:
        0 0 48px rgba(200, 215, 255, 0.22),
        0 8px 36px rgba(0, 0, 0, 0.70);
    transform: translateX(-50%) translateY(-2px);
}

.cluster-return-icon {
    font-size: 12px;
    color: rgba(235, 239, 255, 0.75);
    animation: returnIconPulse 2.4s ease-in-out infinite;
}

@keyframes returnIconPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}