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

* {
    box-sizing: border-box;
}

body {
    font-family: 'Muli', sans-serif;
    background-color: rgb(236, 236, 236);
    height: 95vh;
}

#title {
    text-align: center;
    padding-top: 5vh;
}

.container {
    width: 100vw;

    /* 子元素按列排，水平居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card {
    height: 300px;
    width: 250px;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 0 8px 0 rgba(0,0,0,0.2);
    /* margin: 上下 左右 */
    margin: 20px 0;

    opacity: 0;     /* 默认隐藏 */
    transition: opacity 0.3s ease-in-out;
}

.card.active {
    opacity: 1;
}

.card img {
    border-radius: 5px 5px 0 0;
    width: 100%;
}

.card p {
    width: fit-content;
    /* margin: 上 左右 下 */
    margin: 10px auto 0;
}

/* 调试使用，显示trigger线 */
.line {
    position: fixed;
    height: 2px;
    width: 100vw;
    background-color: red;
    z-index: -1;

    opacity: 0;
}

.btn {
    border: none;
    padding: 10px;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    border-radius: 5px;
    box-shadow: 0 0 8px 0 rgba(0,0,0,0.2);
}