/* 
  Author: Kristen Glodich
  Course: ITWP 1050
  Assignment: Homework 5 - Responsiveness
*/

/*ADDED CONTENT FOR HOMEWORK 5*/

/*change h1 and body text size on smaller screens*/
@media (max-width: 800px) {
    h1 {
        font-size: 1.5em;
    }

    body {
        font-size: 0.9em;
    }
}

/*remove background image and change color on smaller screens*/
@media (max-width: 600px) {
    body {
        background-color: #6b8cff;
        background-image: none;
    }
}

/*copy paste from homework 4*/
/*page background and font*/
body {
    font-family: 'Press Start 2P', monospace;
    background: url('images/background.png') no-repeat center center fixed; 
    background-size: cover;
    color: #222222;
    text-align: center;
    padding: 20px;
}


/*header*/
header h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #d12323;
}


/*content section*/
.content {
    margin: 30px auto;
    max-width: 900px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
}


/*image styling*/
.content-images {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}


/*rotation transform on mario image on hover*/
.mario {
    transition: transform 0.5s ease-in-out;
}

.mario:hover {
    transform: rotate(360deg); /* Spinning effect */
}


/*scale transform on goomba image on hover*/
.goomba {
    transition: transform 0.3s ease-in-out;
}

.goomba:hover {
    transform: scaleY(0.4) scaleX(1.5);
}


/*combo tranform with transition properties*/
.combo {
    transform: rotate(3deg) scale(1.1) skewY(5deg);
    background-color: #fdf4dc;
    transition-property: background-color, transform;
    transition-duration: 1s;
    transition-delay: 0.5s;
}

.combo:hover {
    background-color: #ffb100;
}


/*footer with skew transform, with box and flex display for readability*/
footer {
    background-color: #8B4513;
    padding: 15px 0;
    text-align: center;
    color: #ffffff;
}

.footer-content {
    transform: skewX(-10deg);
    text-align: center;
    display: flex; 
    justify-content: center;
    gap: 15px;
}

footer a {
    color: #FFD700;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}


/*ADDED CONTENT FOR HOMEWORK 5*/

/*make images responsive*/
img {
    max-width: 100%;
    height: auto;
}


/*POWER UP SECTION*/

/*grid*/
.item-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    margin-top: 20px;
}

.item {
    padding: 20px;
    border-radius: 10px;
    flex: 1 1 150px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
}

/*make images responsive inside items*/
.item img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease-in-out;
}

/*popping out effect on hover*/
.item:hover img {
    transform: scale(1.2);
}

/*make items stack on smaller screens*/
@media (max-width: 600px) {
    .item-grid {
        flex-direction: column;
        align-items: center;
    }
}

/*names that pop out on hover*/
.item {
    position: relative;
    overflow: hidden;
}

.item-name {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    font-size: 0.7em;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.item:hover .item-name {
    opacity: 1;
}