:root {
    --bg-dark: #000b18;
    --cyan: #00e5ff;
    --teal: #00897b;
    --green: #4caf50;
    --yellow: #ffeb3b;
    --orange: #ff9800;
    --blue: #2196f3;
    --text-primary: #ffffff;
    --glow-cyan: rgba(0, 229, 255, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Effects */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #001f3f 0%, #000b18 100%);
}

.world-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Media/Map-Bg.jpg');
    background-size: cover;
    background-position: center;
    /* opacity: 0.1;
    filter: invert(1); */
}

/* .particle-grid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0, 229, 255, 0.2) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at 50% 50%, transparent 20%, black 80%);
    opacity: 0.3;
} */

/* Orbital System - RESPONSIVE */
.dashboard-container {
    position: relative;
    /* 100% of the shortest viewport side (width or height) */
    width: 100vmin;
    height: 100vmin;
    display: flex;
    justify-content: center;
    align-items: center;
}

.orbital-system {
    position: relative;
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

/* Rotation Animation */
@keyframes rotate-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.ring::before {
    content: '';
    position: absolute;
    inset: -10px;
    /* Make container larger so dot isn't clipped */
    border-radius: 50%;
    /* Creates a perfect round dot centered on the ring line */
    /* Position = 50% horizontal, 10px vertical (offsets the -10px inset) */
    background: radial-gradient(circle at 50% 10px, var(--cyan) 4px, transparent 4.5px);
    filter: drop-shadow(0 0 5px var(--cyan));
    animation: rotate-ring linear infinite;
    pointer-events: none;
    z-index: 5;
}

/* Responsive Rings (Percentages of Container) */
/* Responsive Rings (Percentages of Container) */
.ring-1 {
    width: 59%;
    height: 59%;
    border-width: 2px;
    border-color: rgba(0, 229, 255, 0.3);
}

.ring-1::before {
    animation-duration: 12s;
}

.ring-2 {
    /* The Main Ring where icons sit */
    width: 67%;
    height: 67%;
    border-width: 2px;
    border-color: rgba(0, 229, 255, 0.2);
}

.ring-2::before {
    animation-duration: 20s;
    animation-direction: reverse;
    /* Contrast direction */
}

.ring-3 {
    width: 75%;
    height: 75%;
    border-width: 2px;
    border-color: rgba(0, 229, 255, 0.1);
}

.ring-3::before {
    animation-duration: 30s;
}

/* Central Hub */
.central-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    border: solid 3px skyblue;

}

/* Typography should ideally be responsive too, using clamp or vmin */
.hub-text h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5vmin;
    letter-spacing: 0.1vmin;
    margin-bottom: 1vmin;
    /* text-shadow: 0 0 10px var(--cyan); */
    text-shadow: 0 0 10px #000000;
    text-decoration: none;
    color: white;
}

.hub-text h1 img {
    animation: pulseCenter 3s infinite ease-in-out;
}

a.hub-text {
    text-decoration: none;
}

.icon-circle img {
    width: 5vh;
}

.hub-text p {
    font-size: 3vmin;
    color: var(--white);
    text-shadow: 0 0 10px #000000;
    font-weight: 700;
}

.hub-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%;
    height: 250%;
    background: radial-gradient(circle, rgb(0 229 255 / 20%) 0%, transparent 40%);
    pointer-events: none;
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 0.77;
        transform: translate(-50%, -50%) scale(2.0);
    }
}

/* Module styling */
.module-node {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 15;
    pointer-events: auto;
}

.module-node:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.icon-circle {
    /* Responsive size */
    width: 7.5vmin;
    height: 7.5vmin;
    border: 2px solid;
    border-radius: 50%;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3vh;
    color: white;
    backdrop-filter: blur(5px);
    position: relative;
    box-shadow: 0 0 2vmin rgba(0, 0, 0, 0.5);
    z-index: 25;
    /* Higher than label (20) to ensure icon sits on top of line start */
}

/* Label Container */
.module-label {
    position: absolute;
    white-space: nowrap;
    /* Move background styling to ::after */
    background: transparent;
    border: none;
    padding: 0.8vmin 1.6vmin;
    font-size: 2.4vmin;
    color: white;
    transition: all 0.3s ease;
    pointer-events: auto;
    z-index: 20;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glowing Dots */
.glow-dot {
    position: absolute;
    width: 0.8vmin;
    height: 0.8vmin;
    background-color: var(--cyan);
    /* Core color */
    border-radius: 50%;
    box-shadow: 0 0 0.8vmin var(--cyan), 0 0 1.5vmin white;
    /* Glow */
    z-index: 22;
    /* Above label background */
    transition: all 0.3s ease;
}

.module-node:hover .glow-dot {
    background-color: white;
    box-shadow: 0 0 1vmin var(--cyan), 0 0 2vmin white;
}

.dot-left {
    left: -1.5vmin;
    /* Increased gap from -0.4vmin */
}

.dot-right {
    right: -1.5vmin;
    /* Increased gap */
}

/* Vertical Dots for Top/Bottom Labels */
.label-top .dot-left,
.label-top .dot-right,
.label-bottom .dot-left,
.label-bottom .dot-right {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    /* Reset horizontal positioning */
}

/* Top Label: Dots on Top and Bottom */
.label-top .dot-left {
    top: auto;
    bottom: -1.5vmin;
    /* Bottom dot (Start of flow from icon) */
}

.label-top .dot-right {
    top: -1.5vmin;
    /* Top dot (End of flow) */
    bottom: auto;
}

/* Bottom Label: Dots on Top and Bottom */
.label-bottom .dot-left {
    top: -1.5vmin;
    /* Top dot (Start of flow from icon) */
    bottom: auto;
}

.label-bottom .dot-right {
    top: auto;
    bottom: -1.5vmin;
    /* Bottom dot (End of flow) */
}

/* Label Background (The glassy box) */
.module-label::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 15, 30, 0.85);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 1vmin;
    z-index: -1;
    /* Behind text */
    transition: all 0.3s ease;
    box-shadow: 0 0 1vmin rgba(0, 229, 255, 0.1);
}

/* The Connecting Line */
.module-label::before {
    content: '';
    position: absolute;
    height: 2px;
    background: var(--cyan);
    /* Linear gradient could be nice too */
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    /* Gradient: Transparent near icon -> Solid -> Transparent at tail */
    z-index: -2;
    /* Behind background */
    opacity: 0.8;
    pointer-events: none;
}

/* Hover Effects targeting the pseudo-element background */
.module-node:hover .module-label::after {
    background: rgba(0, 15, 30);
    /* Opaque dark to hide line behind text */
    border-color: var(--cyan);
    box-shadow: 0 0 2vmin var(--glow-cyan);
}

/* Label Positioning & Line Logic 
   - Labels are offset by 14vmin or 10vmin.
   - Icon Radius (approx) = 3.75vmin.
   - We want line to start from Icon Edge and go past Label.
*/

/* --- RIGHT --- */
.label-right {
    left: 14vmin;
}

.label-right::before {
    /* From center of node (left: -14vmin) + Icon Radius (3.75) -> -10.25vmin */
    /* Overlap slightly (-10.5) to ensure no gap. Icon z-index 25 covers it. */
    left: -10.5vmin;
    top: 50%;
    /* Width: StartOffset (10.5) + Label (100%) + Tail (4vmin) */
    width: calc(100% + 14.5vmin);
    background: linear-gradient(90deg, var(--cyan), var(--cyan) 80%, transparent);
}

/* --- LEFT --- */
.label-left {
    right: 14vmin;
}

.label-left::before {
    right: -10.5vmin;
    top: 50%;
    width: calc(100% + 14.5vmin);
    background: linear-gradient(-90deg, var(--cyan), var(--cyan) 80%, transparent);
}

/* --- TOP --- */
.label-top {
    bottom: 10vmin;
}

.label-top::before {
    bottom: -6.5vmin;
    /* 10vmin offset - 3.75 radius approx = 6.25, overlap slightly */
    left: 50%;
    width: 2px;
    /* Vertical line */
    height: calc(100% + 8vmin);
    transform: translateX(-50%);
    background: linear-gradient(0deg, var(--cyan), var(--cyan) 80%, transparent);
}

/* --- BOTTOM --- */
.label-bottom {
    top: 10vmin;
}

.label-bottom::before {
    top: -6.5vmin;
    left: 50%;
    width: 2px;
    height: calc(100% + 8vmin);
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--cyan), var(--cyan) 80%, transparent);
}

/* End of Line Images */
.end-image {
    position: absolute;
    width: 10vmin;
    /* Slightly larger for the ship */
    height: 5vmin;
    object-fit: contain;
    z-index: 25;
    /* Above lines, similar to icon */
    /* filter: drop-shadow(0 0 5px var(--cyan)); */
    pointer-events: none;
}

/* Position based on label orientation */
/* Right Label -> Image on far Right */
.label-right .end-image {
    right: -12vmin;
    top: 50%;
    transform: translateY(-50%);
    /* Removed rotate(90deg) */
}

/* Left Label -> Image on far Left */
.label-left .end-image {
    left: -12vmin;
    top: 50%;
    transform: translateY(-50%);
    /* Flip horizontally to face left */
}

/* Top Label -> Image on very Top */
.label-top .end-image {
    top: -5vmin;
    left: 50%;
    transform: translateX(-50%);
}

/* Bottom Label -> Image on very Bottom */
.label-bottom .end-image {
    bottom: -5vmin;
    left: 50%;
    transform: translateX(-50%);
    /* Removed rotate(180deg) */
}

/* ========================================
   ORION CONSTELLATION LINK (USER PROVIDED REPLICA)
   ======================================== */

.orion-belt-link {
    position: fixed;
    top: 2vmin;
    right: 3vmin;
    z-index: 100;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 1vmin rgba(255, 255, 255, 0.3));
}

.orion-belt-link:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 2vmin rgba(255, 255, 255, 0.6));
}

.constellation {
    position: relative;
    width: 18vmin;
    height: 18vmin;
    transform: rotate(-45deg);
    /* Map user's 600px to 20vmin for responsiveness */
}

.constellation svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.constellation line {
    stroke: rgb(255, 255, 255);
    stroke-width: 2.5;
    stroke-linecap: round;
    /* filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8)); */
    opacity: 1;
    transition: opacity 0.3s ease;
}

.orion-belt-link:hover line {
    opacity: 1;
}

.star {
    position: absolute;
    border-radius: 50%;
    /* High-End Metallic Sphere Aesthetic */
    background:
        radial-gradient(circle at 35% 35%,
            #ffffff 0%,
            #f5f5f5 10%,
            #ffffff 35%,
            #ffffff 65%,
            #ffffff 100%);
    box-shadow:
        0 0 1.5vmin rgba(255, 255, 255, 0.4),
        0 0 3vmin rgba(255, 255, 255, 0.2),
        inset -0.4vmin -0.4vmin 0.6vmin rgba(255, 255, 255, 0.5),
        inset 0.4vmin 0.4vmin 0.6vmin rgba(255, 255, 255, 0.8);
    animation: starPulse 3s infinite ease-in-out;
    z-index: 2;
    transition: all 0.3s ease;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        filter: brightness(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.18);
        opacity: 0.8;
        filter: brightness(1.3);
    }
}

@keyframes pulseCenter {

    0%,
    100% {
        transform: scale(0.9);
        opacity: 1;
        filter: brightness(1);
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
        filter: brightness(1.1);
    }
}

/* Precise coordinates for perfect symmetry (L/600, T/600) */
.betelgeuse {
    top: 8.3333%;
    left: 20.0000%;
    transform: translate(-50%, -50%);
    width: 1.1vmin;
    height: 1.1vmin;
}

.bellatrix {
    top: 10.0000%;
    left: 66.6667%;
    transform: translate(-50%, -50%);
    width: 0.9vmin;
    height: 0.9vmin;
}

.rigel {
    top: 83.3333%;
    left: 70.0000%;
    transform: translate(-50%, -50%);
    width: 1.2vmin;
    height: 1.2vmin;
}

.saiph {
    top: 80.0000%;
    left: 26.6667%;
    transform: translate(-50%, -50%);
    width: 1.0vmin;
    height: 1.0vmin;
}

.mintaka {
    top: 41.6667%;
    left: 50.0000%;
    transform: translate(-50%, -50%);
    width: 0.75vmin;
    height: 0.75vmin;
}

.alnilam {
    top: 45.7667%;
    left: 42%;
    transform: translate(-50%, -50%);
    width: 0.75vmin;
    height: 0.75vmin;
}

.alnitak {
    top: 48.9667%;
    left: 35%;
    transform: translate(-50%, -50%);
    width: 0.75vmin;
    height: 0.75vmin;
}

/* Gaze Text Styling - Polished Brushed Metal */
.gaze-text {
    position: absolute;
    bottom: -3vmin;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 2vmin;
    font-weight: 700;
    letter-spacing: 0.5vmin;
    text-transform: uppercase;
    background: linear-gradient(180deg,
            #ffffff 0%,
            #ffffff 20%,
            hsl(0, 0%, 100%) 45%,
            #ffffff 55%,
            #ffffff 80%,
            #ffffff 100%);
    /* -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; */
    /* filter: drop-shadow(0 0 0.8vmin rgba(255, 255, 255)); */
    white-space: nowrap;
    transition: all 0.3s ease;
    padding: 1px 5px;
    color: black !important;
}

.orion-belt-link:hover .gaze-text {
    /* filter: drop-shadow(0 0 1.5vmin rgba(255, 255, 255)); */
    letter-spacing: 0.8vmin;
}

/* Pulsing Animation for Stars */
@keyframes starPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
        filter: brightness(0.9);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.18);
        opacity: 1;
        filter: brightness(1.3);
    }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .orion-belt-link {
        top: 3vmin;
        right: 3vmin;
    }

    .orion-belt {
        width: 18vmin;
        height: 12vmin;
    }

    .gaze-text {
        font-size: 3.5vmin;
    }
}