/* 初始化样式 */
* {
    margin: 0;
    padding: 0;

}

html {
    scroll-behavior: smooth;

}

body {
    margin: 0;
    background: #e6e6e6;
    font-family: 'Mirages Custom', 'Merriweather', 'Open Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', 'WenQuanYi Micro Hei', 'Segoe UI Emoji', 'Segoe UI Symbol', Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
}

/* 整体的A */
a {
    text-decoration: none;
    color: #2196f3;
}

/* 去掉li的点 */
li {
    list-style: none;
}

/* 鼠标滚动条 */
body::-webkit-scrollbar {
    width: 4px;
    height: 1px;
}

body::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background: #777;
}

body::-webkit-scrollbar-track {
    background: #383838;
}

.dWidth {
    width: 1000px;
    margin: 0 auto;
}

/* 全局需要的阴影 */
.boxShadow{
    box-shadow: 0px 1em 1em -20px rgb(0 0 0 / 25%);
}

/* ---头部--- */
header {
    position: relative;
    height: 100vh;
}

/* 头部背景 */
header .pic {
    position: absolute;
    z-index: -100;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('../image/bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

/* 背景遮罩 */
header .mask {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -99;
    width: 100%;
    height: 100vh;
    background: #000;
    background-size: 32px 32px;
    background-image: radial-gradient(farthest-side, #ffffff26 10%, transparent 10%);
    background-position: center center;
    opacity: .6;
}

/* 头像信息部分 */
header .my {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    line-height: 50px;
    animation:myLoading 1s cubic-bezier(0,0,0.2,1);
}

/* 头像 */
header .my img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
}

/* 昵称 */
header .my h1 {
    font-weight: 200;
}

/* 按钮 */
header .my .gottop a {
    display: block;
    width: 100px;
    height: 50px;
    margin: 10px auto 0;
    border: 2px solid #bdbdbd;
    border-radius: 20px;
    line-height: 50px;
    color: #bdbdbd;
    transition: border .3s, border-radius .6s, color .3s;
}

header .my .gottop a:hover {
    border: 2px solid #fff;
    border-radius: 25px;
    color: #fff;
}

/* 淡入动画 */
@keyframes myLoading {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
/* ----main 内容部分---- */
/* 此部分外框样式 */
.main {
    /* 设置透明的边框定位跳转 */
    border-top: 1px solid transparent;
    /* 设计-50px与location的margin-top相加后 */
    margin-top: -80px;
}

.location {
    margin-top: 30px;
    border-radius: 20px;
    background-color: #fff;
    /* 此处overflow只是为了隐藏多余 */
    overflow: hidden;
}

/* 内容 */
.main .content {
    position: relative;
    padding: 50px;
    line-height: 3em;
    border-radius: 0 0 20px 20px;
    /* 此处overflow只是为了隐藏多余 */
    overflow: hidden;
}

/* 标题 */
.main .content h2 {
    border-left: 0px solid #2196f3;
    padding-left: 0px;
    border-radius: 0;
    color: #000;
    transition: border-left .3s,padding-left 1s,border-radius .5s,color .2s;
}

.main .content:hover h2 {
    border-left: 20px solid #2196f3;
    padding-left: 10px;
    border-radius: 10px 0 0 10px;
    color: #2196f3;
}

/* 雪碧图 */
.main .content .spring{
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100px;
    height: 100px;
    background-image: url(../image/sprites.gif);
    background-size: 310px auto;
}

/* 雪碧图根据n的倍数循环 */
.main .content:nth-child(2n) .spring{
    background-position: -105px 0;
}
.main .content:nth-child(3n) .spring{
    background-position: -210px 0;
}

/* 打招呼 */
.hello {
    padding: 30px;
    color: #888;
    font-size: 1.5em;
    text-align: center;
    line-height: 25px;
}


.hello  span{
    font-size: 0.6em;
}

/* 回到顶部 */
.backtop {
    display: flex;
    justify-content: flex-end;
    margin-top: -99px;
}
.backtop a {
    display: block;
    width: 109px;
    height: 99px;
    transform: translateY(14.7px);
    background-image: url(../image/sprites.png);
    background-size: 400px auto;
    background-position: -4px -132px;
}

/* 底部 */
footer {
    padding: 50px;
    text-align: center;
    background-color: #383838;
    color: #888;
    font-size: 12px;
    line-height: 20px;
}

footer a {
    color: #888;
    transition: all .3;
}

footer a:hover {
    color: #fff;
}

/* links */
.links li {
    display: inline-block;
    margin-right: .5em;
}

.links li:last-child {
    margin-right: 0;
}

.links li a {
    display: block;
    padding: 0 1em;
    height: 3em;
    line-height: 3em;
    font-size: 15px;
    transition: all .3s;
}

.links li a:hover {
    background: #2196f3;
    color: #fff;
    border-radius: 1.5em;
}

/* buttonA */
.buttonA {
    display: inline-block;
    height: 3em;
    line-height: 3em;
    padding: 0 1em;
    border: 2px solid #2196f3;
    border-radius: 20px;
    transition: all .3s;
}

.buttonA:hover {
    background-color: #2196f3;
    color: #fff;
    border-radius: 1.5em;
}


.main .content .buttonA {
    margin-top: 10px;
}

/* 媒体查询自适应 */
@media screen and (max-width: 1100px) {
    .dWidth {
        width: auto;
        margin-left: 20px;
        margin-right: 20px;
    }
}
@media screen and (max-width: 640px) {
    .links li {
        display: block;
        margin: 10px 0;
    }
    .links li:last-child {
        margin-bottom: 0;
    }
    .main .content:hover h2 {
        border-left: 0px solid #2196f3;
        padding-left: 0px;
        border-radius: 0;
        color: #000;
    }
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    body {
        background: #383838;
    }
    a {
        color: #f0f0f0;
    }
    .boxShadow {
        box-shadow: 0px 1em 1em -20px rgb(255 255 255 / 25%);
    }
    header .mask {
        opacity: 0.7;
    }
    footer {
        background-color: #2c2a2a;
    }
    .location {
        background-color: #2c2a2a;
        color: #f0f0f0;
    }
    .hello {
        color: #f0f0f0;
    }
    .links li a {
        border-bottom: 1px dotted #f0f0f0;
    }
    .links li a:hover {
        color: #383838;
        background: #f0f0f0;
        border-bottom: 1px solid #f0f0f0;
    }
    .buttonA, .main .content .posts li a {
        border-color: #f0f0f0;
    }
    .buttonA:hover, .main .content .posts li:hover a {
        color: #383838;
        background-color: #f0f0f0;
    }
    .main .content h2 {
        border-color: #f0f0f0;
        color: #f0f0f0;
    }
    .main .content:hover h2 {
        color: #f0f0f0;
        border-color: #f0f0f0;
    }
    body::-webkit-scrollbar-track {
        background: #2c2a2a;
    }
}
