* {
    box-sizing: border-box;
}

header {
    margin-bottom: 1.875rem;
}

body {
    background-color: #f4f3f1;
    font-family: 'Work Sans', sans-serif;
    margin: 0;
    padding: 1.5rem;
}

h1 {
    text-align: center;
    font-size: 2.05rem;
}

.flex-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, 21.875rem);
    justify-content: center;
    gap: 2.5rem;

    flex: 1;
    padding: 1rem;
    flex-wrap: grid;
    box-sizing: border-box;
}

/*
 * Card styles
 */
.card-link {
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.card {
    position: relative;
    z-index: 1;
    background-color: #efe6dd;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    min-height: 30rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.03);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}

.card-img {
    width: 100%;
    height: 30vh;
    object-fit: cover;
}

/* Card text styles */
.card-txt {
    padding: 1.25rem 1.875rem;
    flex-grow: 1;
    text-align: center;

    display: flex;
    flex-direction: column;    
}
.card-txt h3 { margin: 0.625rem 0; }
.card-txt p { 
    margin: 0.375rem 0;
    font-size: 0.96rem;
}
p.note {
    font-size: 0.83rem;
    /* font-weight: 600; */
    font-style:italic;
    padding-top: 0.5rem;
    margin-top: auto;

    color: #555;
}
b {
    font-weight: 550;
}
p.description { color: #555; }
p.completion-time {
    font-style: italic;
    color: #555;
}

/* Coming Soon card overlay */
.coming-soon {
    position: relative;
}
.coming-soon img {
    opacity: 0;
}
.coming-soon .card::after {
    content: "🚧 Coming Soon...";
    position: absolute;
    inset: 0;
    background: #d6cec6;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}

@media (max-width: 48rem) {
    .flex-container {
        grid-template-columns: 1fr;
        padding: 0 5%;
        box-sizing: border-box;
    }

    .card-link {
        width: 100%;
    }
}

/* Footer */
footer {
    padding: 1rem;
    text-align: center;
    width: 100%;
    margin-top: 1.25rem;
}

/* Emoji animation */
.falling-emoji {
    position: fixed;
    top: 0;
    left: 0;
    font-size: 2rem;
    animation: fall 2.5s linear forwards;
    pointer-events: none;
    z-index: 3;
    will-change: transform, opacity;
}

@keyframes fall {
    from {
        transform: translateY(-3.125rem);
        opacity: 1;
    }
    to {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Button styles */
.back-button {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 0.031rem;
    border: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    touch-action: manipulation;
}

.back-button:hover {
    background-color: #555;
}

/* Fun button!!!!!!!! */
.fun-button {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.5rem;
    /* font-size: 1.2rem; */
    /* font-weight: bold; */
    /* color: white; */
    background: linear-gradient(135deg, #ff69b4, #ff85a2);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
}

.button-emoji {
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.fun-button:active {
    filter: brightness(0.85);
}

@media (hover: hover) and (pointer: fine) {
    .fun-button:hover {
        transform: translateY(-0.125rem);
        box-shadow: 0 0.375rem 0.875rem rgba(0, 0, 0, 0.3);
    }
    
    .fun-button:hover .button-emoji {
        transform: rotate(15deg) scale(1.1);
    }
}
