@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

body {
    background: linear-gradient(135deg, #004e92, #000428); /* Ocean blue gradient */
    color: #fff;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Align items to the top */
    min-height: 100vh;
    transition: all 0.5s ease-in-out;
    overflow-x: hidden;
    position: relative; /* For bubble positioning */
}

header {
    background: linear-gradient(135deg, #004e92, #003f76);
    padding: 20px;
    text-align: center;
    width: 100%;
    border-bottom: 2px solid #fff;
    transition: background 0.5s ease-in-out;
    position: relative;
    top: 0; /* Ensure header is at the top */
}

h1 {
    font-size: 3rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7), 0 0 20px #00bfff;
    padding-bottom: 10px;
    display: inline-block;
    position: relative;
    animation: pulse 2s infinite;
    text-align: center; /* Ensure centering */
}

h1::after {
    position: absolute;
    content: '';
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 0;
    height: 4px;
    background: #00bfff;
    animation: expand 2s forwards;
}

@keyframes expand {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

@keyframes pulse {
    0% { text-shadow: 0 0 10px #00bfff; }
    50% { text-shadow: 0 0 20px #00bfff; }
    100% { text-shadow: 0 0 10px #00bfff; }
}

.bubble-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent bubbles from affecting page size */
    pointer-events: none; /* Allow clicks to pass through */
}

.bubble {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rise 10s infinite;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
    opacity: 0; /* Start invisible */
}

.bubble:nth-child(1) {
    left: 10%;
    animation-duration: 12s;
    animation-delay: 0s;
    bottom: calc(100% * var(--random-position));
}

.bubble:nth-child(2) {
    width: 20px;
    height: 20px;
    left: 20%;
    animation-duration: 8s;
    animation-delay: 2s;
    bottom: calc(100% * var(--random-position));
}

.bubble:nth-child(3) {
    width: 30px;
    height: 30px;
    left: 40%;
    animation-duration: 12s;
    animation-delay: 4s;
    bottom: calc(100% * var(--random-position));
}

.bubble:nth-child(4) {
    width: 25px;
    height: 25px;
    left: 60%;
    animation-duration: 9s;
    animation-delay: 3s;
    bottom: calc(100% * var(--random-position));
}

.bubble:nth-child(5) {
    width: 35px;
    height: 35px;
    left: 80%;
    animation-duration: 11s;
    animation-delay: 5s;
    bottom: calc(100% * var(--random-position));
}

@keyframes rise {
    0% {
        transform: translateY(0);
        opacity: 0; /* Start invisible */
    }
    10% {
        opacity: 0.7; /* Fade in */
    }
    90% {
        opacity: 0.7; /* Stay visible */
    }
    100% {
        transform: translateY(-100vh); /* Move upwards out of view */
        opacity: 0; /* Fade out */
    }
}



nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 15px; /* Rounded square corners */
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.5s ease-in-out, transform 0.3s ease;
}

nav a:hover {
    background: #00bfff;
    transform: scale(1.1);
}

main {
    text-align: center;
    padding: 20px;
}

.intro {
    margin: 40px 0;
}

footer {
    background: linear-gradient(135deg, #6a0572, #d4145a);
    padding: 20px;
    text-align: center;
    width: 100%;
    border-top: 2px solid #fff;
    transition: background 0.5s ease-in-out;
    position: absolute;
    bottom: 0;
}

.body-hidden {
    display: none;
}

.body-visible {
    display: block;
}

.proxy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 1280px;
    height: 720px;
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px var(--accent-color);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.proxy iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background-color: transparent;
}

input[type="text"] {
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 10px;
    border: 2px solid #00000000;
    margin-right: 10px;
    width: 300px;
    max-width: 80%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

input[type="text"]::placeholder {
    color: white;
    opacity: 0.7;
}

.game-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(145deg, #44444449, #22222249);
    border-radius: 25px;
    padding: 10px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 221px;
    height: 200px;
}

.game-button a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 100%;
    height: 190px;
    border-radius: 25px;
}

.game-button img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
    transition: filter 0.3s ease, transform 0.3s ease; /* Smooth transition for hover effect */
    transform-style: preserve-3d; /* Preserve 3D transforms */
    border-radius: 25px;
}

.game-button:hover {
    transform: scale(1.1); /* Apply a 3D tilt and scale on hover */
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.7);
}

.games-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
    width: 80%; 
    height: 100px;
    color: #00000000;
    position: relative;
    scroll-snap-type: y mandatory;
    align-items: center;
}

/* Bubble Elements */
@for $i from 1 through 20 {
    .bubble:nth-child(#{$i}) {
        left: #{random(100)}%;
        animation-duration: #{random(15) + 5}s;
    }
}