.links-box {
    position: fixed;
    top: 50%;
    left: 0;
    width: 18vw;
    min-width: 200px;
    height: 50vh;
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.links-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 0;
    height: 0;
    border-top: 25vh solid transparent;
    border-bottom: 25vh solid transparent;
    border-left: 2vw solid rgba(0, 0, 0, 0.5);
    z-index: 10;
    pointer-events: none;
}

.vertical-links {
    position: absolute;
    top: 50%;
    left: 1.5vw;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4vh;
    z-index: 11;
    pointer-events: auto;
    width: calc(14vw - 3vw);
    padding: 0 1.5vw;
}

.vertical-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.6vh;
    font-family: 'Orbitron', sans-serif;
    transition: color 0.3s ease;
    border-left: 0.05vh solid #ffffff;
    padding-left: 0.5vw;
    padding-bottom: 0.3vh;
    white-space: nowrap;
    position: relative;
    display: inline-block;
    text-align: left;
}

.vertical-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.05vh;
    background: #ffffff;
}

.vertical-links a:hover {
    color: #ff4500;
}

.group-container, .mobile-group-container {
    position: absolute;
    width: 77.74vh;
    height: 77.74vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center;
    z-index: 12;
}

.inner-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.circle {
    position: absolute;
    width: 23.322vh;
    height: 23.322vh;
    background: #d3d3d3;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 0.58305vh solid #808080;
    transition: box-shadow 0.3s ease;
}

.circle.glow {
    box-shadow: 0 0 1.9435vh 0.58305vh #ff4500;
}

.outer-circle-1 {
    position: absolute;
    width: 38.87vh;
    height: 38.87vh;
    border: 2.3322vh solid rgba(128, 128, 128, 0.5);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    -webkit-mask-image: linear-gradient(90deg, black 45%, transparent 45%, transparent 55%, black 55%);
    mask-image: linear-gradient(90deg, black 45%, transparent 45%, transparent 55%, black 55%);
    background: transparent;
}

.outer-circle-2 {
    position: absolute;
    width: 50.531vh;
    height: 50.531vh;
    border: 2.3322vh solid rgba(128, 128, 128, 0.5);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    -webkit-mask-image: linear-gradient(90deg, black 45%, transparent 45%, transparent 55%, black 55%);
    mask-image: linear-gradient(90deg, black 45%, transparent 45%, transparent 55%, black 55%);
    background: transparent;
}

.outer-circle-3 {
    position: absolute;
    width: 62.192vh;
    height: 62.192vh;
    border: 2.3322vh solid rgba(128, 128, 128, 0.5);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    -webkit-mask-image: linear-gradient(90deg, black 45%, transparent 45%, transparent 55%, black 55%);
    mask-image: linear-gradient(90deg, black 45%, transparent 45%, transparent 55%, black 55%);
    background: transparent;
}

.triangle-container {
    position: absolute;
    width: 27.229vh;
    height: 27.229vh;
    z-index: 5;
    cursor: pointer;
}

.triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 13.6145vh solid transparent;
    border-right: 13.6145vh solid transparent;
    border-bottom: 27.229vh solid rgba(0, 0, 0, 0.7);
    transition: border-bottom-color 0.3s ease;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.triangle.hovered {
    border-bottom: 27.229vh solid rgba(0, 0, 0, 0.9);
}

.triangle:hover {
    border-bottom: 27.229vh solid rgba(0, 0, 0, 0.9);
}

.triangle-circle {
    position: absolute;
    width: 10vh;
    height: 10vh;
    background: transparent;
    border: 0.4vh solid #4A4A4A;
    border-radius: 50%;
    top: 61.5%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: box-shadow 0.3s ease;
}

.triangle-circle.glow {
    box-shadow: 0 0 1.9435vh 0.58305vh #ff4500;
}

.triangle-circle img {
    width: 50%;
    height: 50%;
    filter: brightness(150%) contrast(50%);
}

.loader {
    display: flex;
    gap: 1.1661vh;
    align-items: flex-end;
}

.bar {
    width: 2.3322vh;
    border-radius: 0.291525vh;
}

.bar:nth-child(1) { height: 3.887vh; background-color: #000000; }
.bar:nth-child(2) { height: 5.8305vh; background-color: #ff4500; }
.bar:nth-child(3) { height: 7.774vh; background-color: #000000; }
.bar:nth-child(4) { height: 9.7175vh; background-color: #ff4500; }
.bar:nth-child(5) { height: 11.661vh; background-color: #000000; }

.animate .bar {
    animation: pulse 1.5s infinite ease-in-out;
}

.animate .bar:nth-child(1) { animation-delay: 0s; }
.animate .bar:nth-child(2) { animation-delay: 0.1s; }
.animate .bar:nth-child(3) { animation-delay: 0.2s; }
.animate .bar:nth-child(4) { animation-delay: 0.3s; }
.animate .bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.2); }
}

.page-container {
    height: 100vh; /* Prevent scrolling */
    overflow: hidden; /* No Scrollbar */
}

/* Dynamic header height adjustment */
:root {
    --header-height: 70px; /* Default mobile */
}

@media (min-width: 769px) {
    :root {
        --header-height: 80px; /* Desktop */
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 90px; /* Mobile */
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 70px; /* Small screens */
    }
}

.background-section {
    min-height: calc(100vh - 90px); /* Fallback for dynamic header */
    height: calc(100vh - var(--header-height));
    position: relative;
    z-index: 0;
}

footer[role="contentinfo"] {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 15; /* Increased to ensure visibility */
}

.mobile-link-dropdown {
    display: none;
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 300px;
    z-index: 13;
    font-family: 'Orbitron', sans-serif;
    pointer-events: auto;
}

.mobile-link-dropdown-toggle {
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 10px;
    width: 100%;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    animation: circuitBorder 3s linear infinite;
}

@keyframes circuitBorder {
    0% {
        box-shadow:
            0 0 0 1px #ff4500,
            0 0 0 2px #ff4500,
            0 0 10px #ff4500;
    }
    50% {
        box-shadow:
            0 0 0 1px #ff4500,
            0 0 0 2px rgba(255, 69, 0, 0.5),
            0 0 10px rgba(255, 69, 0, 0.5);
    }
    100% {
        box-shadow:
            0 0 0 1px #ff4500,
            0 0 0 2px #ff4500,
            0 0 10px #ff4500;
    }
}

.mobile-link-dropdown-toggle::after {
    content: '▶';
    font-size: 12px;
    color: #ff4500;
    text-shadow: 0 0 5px #ff4500;
    transition: transform 0.3s ease;
}

.mobile-link-dropdown-toggle.active::after {
    transform: rotate(90deg);
}

.mobile-link-dropdown-content {
    display: none;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 5px;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.mobile-link-dropdown-content.active {
    display: block;
}

.mobile-link-dropdown-content a {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 10px;
    font-size: 14px;
    font-family: 'Orbitron', sans-serif;
    transition: background-color 0.3s ease;
}

.mobile-link-dropdown-content a:hover {
    background-color: rgba(255, 69, 0, 0.2);
    color: #ff4500;
}

@media (min-width: 769px) {
    .group-container {
        transform: translate(-50%, -50%) scale(0.8);
        display: block !important;
    }
    .links-box {
        width: 15vw;
        min-width: 150px;
        display: block !important;
    }
    .vertical-links {
        gap: 3vh;
    }
    .vertical-links a {
        font-size: 1.4vh;
    }
    .mobile-group-container, .mobile-link-dropdown {
        display: none !important;
    }
}

@media (max-width: 1024px), (max-width: 768px), (orientation: portrait) {
    .links-box, .group-container {
        display: none !important;
    }
    .page-container {
        overflow: hidden;
        height: 100vh; /* Reinforce no scrolling */
    }
    .background-section {
        display: block;
        position: relative;
        width: 100%;
        height: calc(100vh - var(--header-height));
        z-index: 0;
    }
    .mobile-group-container {
        display: block;
        position: absolute;
        top: 48%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.5);
        transform-origin: center center;
        width: 77.74vh;
        height: 77.74vh;
        z-index: 12;
        will-change: transform;
    }
    .mobile-link-dropdown {
        display: block;
        top: 20%;
    }
    footer[role="contentinfo"] {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 15;
    }
}

@media (max-width: 480px) {
    .mobile-link-dropdown {
        width: 90%;
        top: 15%;
    }
    .mobile-group-container {
        transform: translate(-50%, -50%) scale(0.45);
        top: 48%;
    }
    .mobile-link-dropdown-toggle {
        font-size: 14px;
        padding: 8px;
    }
    .mobile-link-dropdown-content a {
        font-size: 12px;
        padding: 8px;
    }
}

body.mobile-device .links-box,
body.mobile-device .group-container {
    display: none !important;
}

body.mobile-device .background-section {
    display: block;
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height));
    z-index: 0;
}

body.mobile-device .mobile-group-container {
    display: block;
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    transform-origin: center center;
    width: 77.74vh;
    height: 77.74vh;
    z-index: 12;
    will-change: transform;
}

body.mobile-device .mobile-link-dropdown {
    display: block;
    top: 20%;
}

body.mobile-device footer[role="contentinfo"] {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 15;
}

@media (max-width: 480px) and (orientation: portrait) {
    body.mobile-device .mobile-link-dropdown {
        width: 90%;
        top: 15%;
    }
    body.mobile-device .mobile-group-container {
        transform: translate(-50%, -50%) scale(0.45);
        top: 48%;
    }
    body.mobile-device .mobile-link-dropdown-toggle {
        font-size: 14px;
        padding: 8px;
    }
    body.mobile-device .mobile-link-dropdown-content a {
        font-size: 12px;
        padding: 8px;
    }
}