/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    overflow: hidden;
}

/* Header */
header {
    text-align: center;
    padding: 20px;
    background-color: #007bff;
    color: white;
}

.corner-text {
    position: fixed;
    top: 50px;
    left: 30px;
    font-size: 3vw;
    font-weight: bold;
    transform: rotate(-10deg) scale(1);
    animation: growShrink 4s ease-in-out infinite, colorShift 8s ease-in-out infinite;
    transition: all 0.8s ease-in-out;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* Animation for subtle size pulsing */
@keyframes growShrink {
    0%, 100% { transform: rotate(-10deg) scale(1); }
    50% { transform: rotate(-10deg) scale(1.1); }
}

@keyframes colorShift {
    0% { color: #ff6b6b; }
    25% { color: #ffa07a; }
    50% { color: #6b8cff; }
    75% { color: #98fb98; }
    100% { color: #ff6b6b; }
}

/* MOBILE: Moves text to the center, larger size, and straight */
@media (max-width: 600px) {
    .corner-text {
        position: fixed;
        transform: translate(-50%, -50%) scale(1);
        font-size: 5vw;
        text-align: center;
        animation: growShrink 4s ease-in-out infinite, colorShift 8s ease-in-out infinite;
    }
}

/* Card Container */
.card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Changed from height to min-height for better responsiveness */
    background-image: url("https://cdn.shopify.com/s/files/1/0895/0952/7853/files/Starry-background.webp?v=1737124314");
    background-size: 600px; /* Adjusted to a fixed pixel size for natural star scaling */
    background-position: center;
    background-attachment: fixed;
    image-rendering: -webkit-optimize-contrast; /* Improves rendering in WebKit browsers */
    image-rendering: crisp-edges;
    background-repeat: repeat;
    overflow-x: hidden;
}

/* Card Styling */
.card {
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: auto;
    width: 100vh;
    padding: 5px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Card Image */
.card-image {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #ddd;
    margin-top: 7px;
}

/* Footer */
footer {
    text-align: center;
    padding: 5px;
    background-color: lavender;
    color: rgb(0, 0, 0);
    position: fixed;
    width: 100%;
    bottom: 0;
    border: 1px solid black;
}

/* Balloon Container */
.balloon-container {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.balloon-container a p {
    background-color: lavender;
    width: fit-content;
    padding: 5px;
    border: 1px solid black;
    border-radius: 10%;
}

/* Balloon Styling */
.balloon {
    justify-items: center;
    position: absolute;
    bottom: -150px;
    width: 12vw;
    height: 12vw;
    max-width: 120px;
    max-height: 120px;
    background-color: rgba(255, 99, 71, 0.9);
    border-radius: 50%;
    animation: floatUp 18s cubic-bezier(0.36, 0.54, 0.55, 1) infinite;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.balloon:hover {
    transform: scale(1.1);
}

.balloon span {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

/* Balloon Floating Animation */
@keyframes floatUp {
    0% { transform: translateX(0) scale(1); opacity: 0; }
    20% { transform: translateX(100px) scale(1.1); opacity: 0.5; }
    35% {transform: translateX(-70px) scale(1.1); opacity: 1;}
    50% { transform: translateX(30px) scale(1.1); opacity: 1; }
    75% { transform: translateX(-80px) scale(1.1); opacity: 0; }
    100% { bottom: 110%; transform: translateX(80px) scale(1); opacity: 0; }
}

/* Balloon Colors and Delays */
.balloon:nth-child(1) { background-color: #ff6b6b; left: 70%; animation-delay: 0s; }

/* Static Name for Mobile Devices */
.static-credits {
    display: none;
    text-align: center;
    position: fixed;
    bottom: 20px;
    margin: 40px;
    width: 75%;
    font-size: 12px;
    font-weight: bold;
    color: black;
    background-color: lavender;
    border: 4px solid black;
    border-radius: 15%;
}

/* Hide Balloons and Show Static Credits on Mobile */
@media (max-width: 600px) {
    .balloon-container {
        display: none;
    }
    .static-credits {
        display: block;
    }
}