body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden; /* Changed from overflow-y: auto to prevent all scrolling */
}

.content-wrapper {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding-top: 5vh;
    contain: layout style;
    box-sizing: border-box;
}

/* Ensure all direct children of content-wrapper are not duplicated */
.content-wrapper > * {
    flex-shrink: 0;
    flex-grow: 0;
}

.headline {
    position: relative;
    display: inline-block;
    margin-top: -20px;
    z-index: 1;
    padding: 10px 10px;
    transition: transform 0.3s ease-in-out;
    text-align: center;
    transform:translateY(-30%);
}

.headline:hover {
    transform: scale(1.05);
}

/* Isolating text positioning */
.headline-text {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5em;
    font-weight: bold;
    color: #fff;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.05em;
    line-height: 1.2;
    transform: translateY(0%);
}

/* The bubble background */
.headline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 50px);
    height: calc(100% + 30px);
    background: linear-gradient(135deg, #ffcc00, #ff6699);
    border-radius: 35px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid #fff;
    z-index: -1;
}

/* The arrow */
.headline::after {
    content: '';
    position: absolute;
    bottom: -50px;  /* Adjusted from -35px to -45px for desktop */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #ffcc00;
    z-index: -1;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.4));
}

/* Background */
.background-container {
    background-image: url('/redesign/assets/images/spacescape_2.jpg');
    background-size: cover;
    background-repeat: repeat;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Earth Menu */
.earth-menu {
    position: relative;
    width: 550px;
    height: 550px;
    text-align: center;
    margin-top: 150px;
    margin-left: 0%;
}

/* Animation for rotating earth */
@keyframes rotateEarth {
    from { transform: translate(-45%, -32%) rotate(0deg); }
    to { transform: translate(-45%, -32%) rotate(360deg); }
}

.earth-image {
    width: 140%;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-45%, -32%);
    overflow: hidden;

}

.earth-image.rotate-earth {
    animation: rotateEarth 120s linear infinite;
    transform-origin: 47% 47%;
}


@media (max-width: 768px) {
.music-page .earth-menu {
	margin-top: 100px;
}

.music-page .earth-image {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -32%);
 }
												}
.link-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease-in-out;
    pointer-events: all;
}

.link-text {
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    z-index: 5;
    text-align: center;
    margin-top: -10%;
}

.main-page .link-text {
    color: white;
}

.link-text.visible {
    opacity: 1;
}

.link-container:hover .link-text,
.link-container.active .link-text {
    opacity: 1;
}

/* JoeDreamz Image */
#joedreamz-image {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translatex(-50%);
    width: 415px;
    height: auto;
    z-index: 10;
    pointer-events: auto;
}

#joedreamz-video {
    position: absolute;
    top: -250px;
    left: 50%;
    transform: translateX(-60%);
    width: 225px;
    height: auto;
    z-index: 1;
    pointer-events: none;
}

#dynamic-links-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    pointer-events: auto;
}

#center-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-71%, 0%);
    width: 18vw;
    height: auto;
    z-index: 3;
    pointer-events: auto;
}

#center-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, 80%);
    width: 10vw;
    height: auto;
    z-index: 3;
    pointer-events: auto;
}

/* Add this CSS rule to hide the audio element */
audio {
    display: none;
}

/* Dynamic Link Elements */
.link-image {
    width: 110px;
    height: 110px;
    cursor: pointer;
    pointer-events: all;
    object-fit: contain;
    z-index: 4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        padding-top: 1vh;
    }

    .headline {
        margin-top: 10px;
        transform: translateY(0);
    }

    .headline-text {
        font-size: 1.8em;
    }

    .headline::before {
        width: calc(100% + 30px);
        height: calc(100% + 20px);
        border-radius: 20px;
    }

    .headline::after {
        bottom: -25px;  /* Changed from -15px to -25px to move arrow further down on mobile */
        border-left: 15px solid transparent;
        border-right: 15px solid transparent;
        border-top: 15px solid #ffcc00;
    }
    
    .earth-menu {
        width: 100vw;
        height: 100vw;
        max-width: 500px;
        max-height: 500px;
        margin-top: 100px;
    }

    .earth-image {
        width: 105%;
        margin-top: 0;
        top: 50%;
        transform: translate(-45%, -32%);
    }

    @keyframes rotateEarthMobile {
        from { transform: translate(-45%, -32%) rotate(0deg); }
        to { transform: translate(-45%, -32%) rotate(360deg); }
    }

    .earth-image.rotate-earth {
        animation: rotateEarthMobile 120s linear infinite;
    }

    #center-image {
        width: 25vw;
        max-width: 150px;
        transform: translate(-35%, 80%);
    }

    #center-video {
        width: 55vw;
        max-width: 200px;
        transform: translate(-65%, 10%);
    }

    .link-text {
        font-size: 16px;
        margin-top: 2px; /* Reduced from 10px to bring text closer to icon */
        opacity: 1;
    }

    .link-image {
        width: 80px !important;
        height: 80px !important;
    }

    #joedreamz-image {
        width: 80vw;
        max-width: 350px;
        top: -80px;
    }
}

/* Additional breakpoint for very small devices */
@media (max-width: 480px) {
    .headline-text {
        font-size: 1.5em;
    }

    .earth-menu {
        margin-top: 80px;
    }

    #joedreamz-image {
        width: 90vw;
        max-width: 300px;
        top: -60px;
    }

    .link-image {
        width: 60px !important;
        height: 60px !important;
    }

    .link-text {
        margin-top: 1px; /* Even smaller gap for very small devices */
    }
}
