@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    height: 100vh; /* Full viewport height */
    margin: 0;
    padding: 0;
    background-attachment: fixed;
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    justify-content: center; /* Center vertically */
    align-items: center; /* Center horizontally */
    text-align: center;
    background-size: 100% 100%; /* Increased size to allow all colors to transition */
    animation: gradient-wave 2s infinite linear;
    overflow-y: hidden;
}

@keyframes gradient-wave {
    0% {
        background-position: 0% 50%;
    }
    33% {
        background-position: 50% 50%;
    }
    66% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 3em;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;

    /* Pixelated effect */
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 2px 2px 0px #000,
                 -2px -2px 0px #000,
                 2px -2px 0px #000,
                 -2px 2px 0px #000;

    margin: 0; /* Remove extra margin */
    /* Twinkling animation applied continuously */
    animation: twinkle 1s infinite alternate ease-in-out;
}

@keyframes twinkle {
    0% {
        text-shadow: 2px 2px 5px #ffffff,
                     -2px -2px 5px #fffa,
                     2px -2px 5px #ff0,
                     -2px 2px 5px #0ff;
    }
    50% {
        text-shadow: 3px 3px 8px #fff,
                     -3px -3px 8px #ff0,
                     3px -3px 8px #0ff,
                     -3px 3px 8px #f0f;
    }
    100% {
        text-shadow: 2px 2px 5px #fff,
                     -2px -2px 5px #0ff,
                     2px -2px 5px #f0f,
                     -2px 2px 5px #ff0;
    }
}

h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5em;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Navigation styles */
.navbar {
    position: absolute;
    bottom: 20px; /* Position at the bottom */
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 100px; /* Space between links */
}

/* Center the image on the page */
img {
    display: block;
    margin: 50px auto;
    max-width: 100%;
    height: auto;
    animation: flicker 3s infinite alternate;
    cursor: pointer; /* Make image clickable */
}

@keyframes flicker {
    0% { opacity: 1; }
    10% { opacity: 0.8; }
    20% { opacity: 1; }
    30% { opacity: 0.6; }
    40% { opacity: 1; }
    50% { opacity: 0.7; }
    60% { opacity: 1; }
    70% { opacity: 0.85; }
    80% { opacity: 1; }
    90% { opacity: 0.75; }
    100% { opacity: 1; }
}

/* Command prompt box styling */
#terminal-box {
    display: none; /* Hidden by default */
    position: fixed;
    top: 10%;
    left: 10%
    width: 80%;
    height: 70%;
    background-color: #000;
    color: #fff;
    padding: 20px;
    border: 2px solid black;
    box-shadow: 0 0 20px black;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    overflow-y: auto;
    z-index: 1000;
}

/* Close button */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #000;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
}

.close-btn:hover {
    background: #ff0000;
}

/* Typing cursor effect */
.typing-cursor {
    border-right: 2px solid #fff;
    animation: blink 0.7s steps(2, start) infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

h3 {
    font-family: 'Press Start 2P', cursive;
    text-align: center; /* Center the text */
    margin-top: -65px; /* Add some space between the image and the h3 */
    font-size: 1.2em; /* Adjust font size */
    color: #fff; /* Green color to match the theme */
    animation: blink 1s infinite alternate; /* Optional: Add a blinking effect */
    width: 100%; /* Ensure it spans the full width */
}

/* Blue box for h3 */
.h3-box {
    background-color: #33076d; /* Blue background */
    padding: 15px 20px; /* Padding around the text */
    border-radius: 25px; /* Rounded corners */
    text-align: center; /* Center the text */
    margin: 0 auto; /* Center the box horizontally */
    width: fit-content; /* Make the box only as wide as its content */
    box-shadow: 0 0 10px #ffffff; /* Optional: Add a glowing effect */
    margin-top: -105px; /* Adjust the position to match your original h3 margin */
}

/* Adjust h3 styling to match your original code */
.h3-box h3 {
    text-align: center; /* Center the text */
    margin: 0; /* Remove default margin */
    font-size: 1.2em; /* Adjust font size */
    color: #fff; /* White color for better contrast */
    animation: blink 1s infinite alternate; /* Optional: Add blinking effect */
    width: 100%; /* Ensure it spans the full width */
}

@keyframes blink {
    0% { opacity: 1; }
    100% { opacity: 0.5; }
}

.navbar a {
    font-family: 'Press Start 2P', cursive;
    color: white;
    text-decoration: none;
    font-size: 1em;
    transition: 0.3s;
}

.navbar a:hover {
    transform: scale(1.1);
    background-color: #33076d;
    color: rgba(14, 239, 209, 0.997);
    box-shadow: 0 0 10px rgba(14, 239, 209, 0.997); /* Glowing box effect */
    border: 2px solid rgba(14, 239, 209, 0.997);
    padding: 5px 10px; /* Add padding to keep spacing */
    border-radius: 5px; /* Optional: rounded corners */
    text-decoration: none; /* Remove underline for cleaner hover effect */
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 15px 0;
    }

    .navbar a {
        font-size: 0.9em;
    }

    section {
        height: auto;
        padding: 50px 20px;
    }

    h2 {
        font-size: 1.8em;
    }

    p {
        font-size: 1em;
    }
}

/* Particle Effect Container */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Place it behind other content */
    background: linear-gradient(to bottom right, 
        #184050 20%,  
        #41226a 40%,  
        #1d0f3a 50%,  
        #190e41 75%,  
        #1c1f3f 85%   
    );
}

/* Responsive Design for Mobile Screens */
@media (max-width: 768px) {
    /* Adjust body for smaller screens */
    body {
        height: auto; /* Allow content to scroll */
        padding: 20px; /* Add padding for better spacing */
        overflow-y: auto; /* Allow vertical scrolling */
    }

    /* Adjust h1 for smaller screens */
    h1 {
        font-size: 2em; /* Reduce font size for smaller screens */
        margin-left: 0; /* Remove left margin */
    }

    /* Adjust h2 for smaller screens */
    h2 {
        font-size: 1.2em; /* Reduce font size for smaller screens */
    }

    /* Adjust image for smaller screens */
    img {
        width: 200px; /* Smaller image for mobile */
        margin: 20px auto; /* Adjust margin for better spacing */
    }

    /* Adjust h3 and its container for smaller screens */
    .h3-box {
        margin-top: -60px; /* Adjust position for smaller screens */
        padding: 10px 15px; /* Reduce padding for smaller screens */
    }

    .h3-box h3 {
        font-size: 1em; /* Reduce font size for smaller screens */
    }

    /* Adjust navigation for smaller screens */
    .navbar {
        position: static; /* Remove absolute positioning */
        flex-direction: column; /* Stack navigation links vertically */
        gap: 10px; /* Reduce gap between links */
        padding: 15px 0; /* Add padding for better spacing */
    }

    .navbar a {
        font-size: 0.9em; /* Reduce font size for smaller screens */
        padding: 8px 16px; /* Adjust padding for smaller screens */
    }

    /* Adjust terminal box for smaller screens */
    #terminal-box {
        width: 95%; /* Wider on mobile */
        height: 80%; /* Taller on mobile */
        font-size: 0.9em; /* Smaller font for mobile */
    }
}
