/* ============================================================
   MULTI-REALM VIEW & DUAL-MODE SWITCHER
   ============================================================ */

/* HUD Mode Switcher in Header */
.hud-mode-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    padding: 2px 4px;
    gap: 3px;
    margin-left: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hud-mode-pill {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    outline: none;
}

.hud-mode-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.hud-mode-pill.active {
    background: linear-gradient(135deg, #ffd700, #ff9f43);
    color: #111;
    box-shadow: 0 2px 8px rgba(255, 160, 0, 0.5);
    font-weight: 800;
}

/* Multi-Realm Main Wrapper */
.multirealm-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
    background: #0b091a;
}

.multirealm-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.multirealm-inner {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: calc((100vh - 60px) * (16 / 9));
    max-height: calc(100vw * (9 / 16));
    aspect-ratio: 16 / 9;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
}

.realm-bg,
.realm-bg-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: opacity 0.55s cubic-bezier(0.25, 1, 0.5, 1), transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.realm-bg-layer {
    opacity: 0;
    transform: scale(1.03);
}

.realm-bg-layer.active {
    opacity: 1;
    transform: scale(1) translateX(0);
}

/* Realm Title Header Badge */
.realm-title-badge {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, rgba(20, 10, 35, 0.88), rgba(10, 5, 20, 0.94));
    border: 1.5px solid rgba(255, 215, 0, 0.6);
    border-radius: 30px;
    padding: 6px 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 200, 50, 0.25);
    pointer-events: none;
    animation: realmBadgeFloat 3s ease-in-out infinite alternate;
}

@keyframes realmBadgeFloat {
    0%   { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(-4px); }
}

.realm-title-name {
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #ffcf48;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 6px;
}

.realm-title-sub {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    margin-top: 1px;
}

/* Realm Hotspots (Enlarged & Focused) */
.realm-hotspots-layer {
    position: absolute;
    inset: 0;
    z-index: 25;
}

.realm-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: realmHotspotPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes realmHotspotPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -35%) scale(0.72);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.realm-hotspot:hover {
    transform: translate(-50%, -55%) scale(1.08);
    z-index: 45;
}

.realm-hotspot-card {
    background: rgba(14, 8, 32, 0.88);
    border: 1.5px solid var(--glow-color, #ffd700);
    border-radius: 24px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 18px var(--glow-color, rgba(255,215,0,0.4));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    user-select: none;
}

.realm-hotspot:hover .realm-hotspot-card {
    background: rgba(26, 15, 55, 0.95);
    border-color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 24px var(--glow-color, #ffd700);
}

.realm-hotspot-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.realm-hotspot-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

.realm-hotspot:hover .realm-hotspot-icon {
    transform: scale(1.15) rotate(2deg);
}

.realm-hotspot-label {
    font-size: 0.86rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

.realm-hotspot-lock {
    font-size: 0.72rem;
    background: rgba(255, 50, 50, 0.35);
    border: 1px solid rgba(255, 100, 100, 0.6);
    color: #ff9999;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* Realm Dock Navigator */
.realm-dock-container {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 95vw;
}

.realm-dock {
    display: flex;
    background: rgba(14, 8, 30, 0.9);
    border: 1.5px solid rgba(255, 200, 50, 0.45);
    border-radius: 36px;
    padding: 5px 8px;
    gap: 6px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.75), 0 0 20px rgba(255, 160, 0, 0.2);
    overflow-x: auto;
    scrollbar-width: none;
}

.realm-dock::-webkit-scrollbar {
    display: none;
}

.realm-dock-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 28px;
    padding: 6px 14px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    white-space: nowrap;
    user-select: none;
    outline: none;
}

.realm-dock-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.realm-dock-btn.active {
    background: linear-gradient(135deg, #ffd700, #ff9f43);
    color: #111;
    border-color: #ffe066;
    box-shadow: 0 4px 16px rgba(255, 160, 0, 0.55);
    font-weight: 800;
    transform: translateY(-2px) scale(1.03);
}

.realm-dock-stars {
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
    font-weight: 800;
}

.realm-nav-arrow {
    background: rgba(18, 10, 35, 0.88);
    border: 1.5px solid rgba(255, 200, 50, 0.4);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffcf48;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    user-select: none;
    outline: none;
}

.realm-nav-arrow:hover {
    background: rgba(255, 180, 40, 0.35);
    transform: scale(1.1);
    color: #fff;
}

/* Dreamy Cloud Wipe Overlay Transition */
.cloud-wipe-overlay {
    position: absolute;
    inset: 0;
    z-index: 150;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0%, rgba(230, 240, 255, 0.95) 60%, rgba(180, 215, 255, 0.9) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cloud-wipe-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cloud-wipe-mist {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    background: rgba(255, 255, 255, 0.85);
    pointer-events: none;
}

.cloud-wipe-mist--1 {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 10%;
    animation: mistFloat1 2s ease-in-out infinite alternate;
}

.cloud-wipe-mist--2 {
    width: 60%;
    height: 60%;
    bottom: 15%;
    right: 10%;
    animation: mistFloat2 2.5s ease-in-out infinite alternate;
}

@keyframes mistFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -15px) scale(1.08); }
}

@keyframes mistFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-20px, 15px) scale(1.08); }
}

.cloud-wipe-sparkles {
    font-size: 1.6rem;
    color: #ffd700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
    animation: sparklePulse 1.2s ease-in-out infinite alternate;
    z-index: 10;
}

@keyframes sparklePulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.15); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hud-mode-switcher {
        margin-left: 6px;
    }
    .hud-mode-pill {
        padding: 3px 7px;
        font-size: 0.65rem;
    }
    .realm-title-badge {
        top: 10px;
        padding: 4px 16px;
    }
    .realm-title-name {
        font-size: 0.82rem;
    }
    .realm-dock-container {
        bottom: 12px;
        gap: 6px;
    }
    .realm-dock-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    .realm-nav-arrow {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
}


