/* styles.css */
*{
    margin: 0;
    padding:0; 
}
html,
body {
    width: 100%;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    /* background-color: #83cfef; */
    font-size: 26.6666vw;
}

header{
    height: 60px;
    line-height: 80px;
    text-align: center;
    background-color:#fff;
    border-bottom: solid 1px #ddd;
    display: flex;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
header div{
    width: 640px;
    height: 60px;
    position: relative;
}

header div .logo{
    width: 100px;
    position: absolute;
    left: 20px;
    top: 20px;
}
header h1{
    font-size: 2rem;
    position: absolute;
    left: 130px;
    font-size: 24px;
    top: 20px;
    line-height:24px;
    color: #666;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    /* 初始列数 */
    column-count: 4;
    column-gap: 10px;
    padding: 10px;

}

.item {
    /* 防止元素被分割 */
    break-inside: avoid-column;
    margin-bottom: 10px;
    width: 10rem;
    height: 10rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.item a {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    overflow: hidden;
    /* border: solid 1px red; */
    margin: 0;
    padding: 0;
    text-decoration: none;
}

.item a p {
    color: #fff;
    position: absolute;
    top: 100%;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    line-height: 200px;
    font-size: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.item img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}


.item a:hover p {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    top: 0;
}