@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap');

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

html {
    height: 100%;
}

body {
    height: 100%;
    width: 100%;
}

.panels {
    min-height: 100%;
    display: flex;
    color: white;
    font-family: 'Indie Flower', cursive;
    font-weight: 700;
}

.panel {
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex: 1;
    background-size: cover;
    background-position: center;
    transition: font-size 0.6s cubic-bezier(.17,.67,.78,-0.38),
                flex 0.6s ease-in,
                text-shadow 0.6s ease-in-out,
                background-image 0.6s;
    overflow: hidden;
    font-size: 3.5vw;
}

.panel.active {
    font-size: 6vw;
    flex: 5;
    text-shadow: 7px 4px 2px black;
}

.panel1 {
    background-image: url("../image/bg1.jpg");
}

.panel2 {
    background-image: url("../image/bg2.jpg");
}

.panel3 {
    background-image: url("../image/bg3.jpg");
}

.panel4 {
    background-image: url("../image/bg4.jpg");
}

.panel5 {
    background-image: url("../image/bg5.jpg");
}

.panel > * {
    transition: transform 0.5s;
    width: 100%;
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.panel > *:first-child {
    transform: translateY(-100%);
    font-size: 5vw;
}

.panel > *:last-child {
    transform: translateY(100%);
    font-size: 5vw;
}

.panel.panel-active > *:first-child {
    transform: translateY(0);
}

.panel.panel-active > *:last-child {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .panel {
        font-size: 5vw;
    }

    .panel.active {
        font-size: 8vw;
    }

    .panel > *:first-child {
        font-size: 6vw;
    }

    .panel > *:last-child {
        font-size: 6vw;
    }
}