* {
    box-sizing: border-box;
}
/* Retro Christmas Wishlist Styles */

@font-face {
    font-family: 'Comic Sans MS';
    src: url('/fonts/comicbd.ttf?v=1') format('truetype');
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background-color: #008080;
    color: #FFFFFF;
    margin: 0;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
    position: relative;
}

#icon-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.icon {
    position: absolute;
    width: 50px;
    height: 50px;
    opacity: 0.5;
    pointer-events: none;
}

.marquee-container {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
    pointer-events: none;
}

.marquee-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: max-content;
}
.marquee-wrapper > * {
    flex-shrink: 0;
}

.marquee-separator {
    font-size: 2.5em;
    color: #ffff00;
    text-shadow: 2px 2px 0px #000000;
    vertical-align: middle;
}

header {
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

header h1 {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 4em;
    text-align: center;
    color: #ff00ff;
    text-shadow: 3px 3px 0px #000000, 6px 6px 0px #ffff00;
    margin-bottom: 20px;
    display: inline-block;
    white-space: nowrap; /* Prevent wrapping */
    vertical-align: middle;
}

main {
    width: 80%;
    margin: 20px auto;
    background-color: #c0c0c0;
    border: 5px ridge #ff00ff;
    padding: 20px;
    position: relative;
    z-index: 1;
}

h2 {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    color: #0000ff;
    border-bottom: 3px double #0000ff;
    padding-bottom: 5px;
}

#wishlist {
    list-style-type: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

@media (min-width: 1200px) {
    #wishlist {
        grid-template-columns: repeat(3, 1fr);
    }
}

li {
    background-color: #ffffff;
    color: #000000;
    padding: 15px;
    border: 2px solid #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #000000;
    width: 100%;
}

li img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain; /* Ensures the entire image fits without cropping */
    margin-bottom: 10px;
    box-shadow: 5px 5px 5px #888888;
}

li span {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 1.5em;
    display: inline-block; /* Needed for transform to work */
}

/* Responsive Styles */
@media (max-width: 768px) {

    main {
        width: 95%;
        padding: 10px;
        box-sizing: border-box; /* Ensures padding is included in the width */
        margin: 10px auto;
    }

    header h1 {
        font-size: 2.5em;
    }

    #wishlist {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    li img {
        width: 100%; /* Full width on mobile */
        height: auto; /* Maintain aspect ratio */
        max-height: 300px; /* Prevent images from being excessively tall */
    }

    input[type="text"],
    input[type="url"] {
        width: 100%;
        margin-bottom: 10px;
    }

    button {
        width: 100%;
    }
}

form {
    margin-top: 20px;
}

label {
    color: #000000;
}

input[type="text"] {
    width: calc(100% - 110px);
    padding: 5px;
    border: 2px inset #808080;
}

button {
    padding: 5px 10px;
    background-color: #00ff00;
    border: 2px outset #008000;
    cursor: pointer;
}

footer {
    text-align: center;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}