body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: black; /* Set background color to black */
    color: white; /* Set text color to white */
    transition: transform 0.3s; /* Smooth transition for transform */
}

body:hover {
    transform: scale(1.02); /* Slightly increase body size on hover */
}

header {
    background-color: purple; /* Set header color to purple */
    color: white;
    padding: 10px 0;
    text-align: center;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

header nav ul li {
    display: inline;
    margin: 0 10px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    padding: 5px 10px; /* Add padding for button-like appearance */
    border: 2px solid transparent; /* Add border for hover effect */
    transition: transform 0.3s, border-color 0.3s; /* Smooth transition for transform and border color */
}

header nav ul li a:hover {
    transform: scale(1.1); /* Increase size on hover */
    border-color: white; /* Change border color on hover */
}

main {
    padding: 20px;
    background: url('images/stars.jpg') repeat; /* Apply starry background to the main content area */
    display: flex;
    flex-wrap: wrap; /* Allow wrapping of flex items */
    justify-content: space-around; /* Distribute items evenly */
    color: white; /* Ensure text in main content is white */
}

.planet {
    position: relative;
    margin: 10px; /* Adds space between planet elements */
    flex: 0 0 22%; /* Ensure 4 items per row with some margin */
    box-sizing: border-box;
}

.planet img {
    width: 100%; /* Make image fill the planet container */
    height: auto; /* Keep image aspect ratio */
}

#planet5 img, #planet6 img { 
    height: 300px; /* Adjust height for Jupiter and Saturn to be even with Uranus and Neptune */
}

.info {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 100%;
    height: 100%;
    text-align: center; /* Centers text within the info box */
    padding: 10px; /* Adds padding inside the info box */
    box-sizing: border-box; /* Ensures padding is included in the width and height */
}

.planet:hover .info {
    display: block;
}

.image-gallery img {
    width: 200px;
    height: 200px;
    margin: 10px;
}

form {
    display: flex;
    flex-direction: column;
}

label, input, textarea, button {
    margin: 10px 0;
    color: white; /* Ensure form text is white */
}

/* Rotating image styles */
.rotating-image {
    width: 100%;
    max-width: 600px;
    margin: auto;
}

.rotating-image img {
    width: 100%;
    height: auto;
    color: white; /* Ensure rotating image text is white */
}