@import url('https://fonts.googleapis.com/css?family=Questrial&display=swap');

:root {
    --main-color: #0f0f0f;
    --main-bg-color: #f0f0f0;
    --blip-bg-color: rgba(255, 255 ,255 ,0.8);
    --shadow-rgb: 0, 0, 0;
}

@media (prefers-color-scheme: dark) {
    :root {
        --main-color: #f0f0f0;
        --main-bg-color: #0f0f0f;
        --blip-bg-color: rgba(0, 0, 0, 0.8);
        --shadow-rgb: 255, 255, 255;
    }

    .blip img.light {
        display: none !important;
    }

    .blip img.dark {
        display: block !important;
    }
}

html, body {
    font-size: 18px;
    font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
    color: var(--main-bg-color);
    background-color: #c0c0c0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 100%;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.wrapper {
    display: flex;
    align-items: center;
    min-height: 100%;
}

.content {
    margin: 10px auto;
    width: 500px;
    max-width: 90%;
    max-width: calc(100% - 30px);
    padding: 15px;
    border-radius: 20px;
    background-color: rgba(var(--shadow-rgb), 0.3);
    text-align: center;
    transition: background-color 0.5s;
}
.content:hover {
    background-color: rgba(var(--shadow-rgb), 0.7);
}

h1 {
    font-size: 40px;
    margin-bottom: 15px;
}

.blips {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-height: 1000px;
    transition: max-height 0.5s;
    overflow-y: hidden;
}

.blip {
    position: relative;
    width: 30%;
    border-radius: 20px;
    background-color: var(--blip-bg-color);
    margin-bottom: 15px;
    padding: 20px;
}

.blip:before {
    content: attr(title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    padding: 0px;
    border-radius: 5px;
    text-align: center;
    color: var(--main-color);
    background-color: var(--main-bg-color);
    line-height: 36px;
    z-index: 1;
    overflow: hidden;
    white-space: nowrap;
    max-width: 0px;
    box-shadow: 3px 3px 3px 0px rgba(0, 0, 0, 0.4);
    transition: max-width 0.5s, padding 0.5s;
}
.blip:hover:before {
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
}

.blip img {
    display: block;
    width: 100%;
    height: 100%;
}
.blip img.dark {
    display: none;
}
.blip:hover img {
    animation: bounce 0.5s normal forwards ease-in-out;
}

input[name="blip-toggle"]{
    display: none;
}
label[for="blip-toggle"] {
    display: block;
    cursor: pointer;
    transition: transform 0.5s;
}
label[for="blip-toggle"] svg {
    width: 40px;
    fill: var(--main-bg-color);
}
input[name="blip-toggle"]:not(:checked) ~ .blips {
    max-height: 0px;
}
input[name="blip-toggle"]:not(:checked) ~ label[for="blip-toggle"] {
    transform: scaleY(-1);
}

@keyframes bounce {
    50% {
        opacity: 1;
        transform: scale(1.1, 1.1);
    }
    100% {
        transform: scale(1, 1);
    }
}