@charset "UTF-8";

/* ----

# Sweet
# By: Dreamer-Paul
# Last Update: 2021.4.17
---- */

/* 0 - 全局
-------------------------------- */
html, body{
    height: 100%;
}

*{
    margin: 0;
    padding: 0;
}

*, *:before, *:after{
    box-sizing: border-box;
}

a{
    color: #3498db;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6{
    font-weight: lighter;
}

p{
    margin-bottom: 1em;
}
p:last-child{
    margin-bottom: 0;
}

body{
    color: #222;
    width: 100%;
    margin: auto;
    display: table;
    max-width: 20em;
    font-weight: lighter;
    vertical-align: middle;
    background: #fff center/cover no-repeat fixed;
    font: 16px/1.5 '思源黑体 CN', 'Microsoft Yahei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
}

@media screen and (min-width: 1930px){
    body{
        font-size: 1.3em;
    }
}

.text-right{
    text-align: right;
}

.text-center{
    text-align: center;
}

/* 1 - 载入动画
-------------------------------- */
#loader{
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    display: none;
    position: fixed;
    /* display: flex; */
    background: #fff;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    transition: opacity .3s, visibility .3s;
}
#loader.hidden{
    opacity: 0;
    visibility: hidden;
}
#loader img{
    max-width: 10em;
    border-radius: 100%;
    border: 3px #fff solid;
    box-shadow: 0 0 0 3px #1979ca;
}
#loader:before, #loader:after{
    content: '';
    width: 20em;
    height: 3px;
    margin: 1em;
    display: block;
    background: #1979ca;
    animation: loader-line-left 1s both;
}
#loader:after{
    animation: loader-line-right 1s both;
}

@keyframes loader-line-left {
    0%{ transform: scaleX(0); transform-origin: left; }
    50%{ transform: scaleX(1); transform-origin: left; }
    100%{ transform: scaleX(0); transform-origin: right; }
}
@keyframes loader-line-right {
    0%{ transform: scaleX(0);  transform-origin: right; }
    50%{ transform: scaleX(1);  transform-origin: left; }
    100%{ transform: scaleX(0);  transform-origin: left; }
}

/* 2 - 正文
-------------------------------- */
main{
    max-width: 25em;
    display: table-cell;
    vertical-align: middle;
}
main .content{
    width: 100%;
    padding: 1em;
    margin: 3em 0;
    background: #fff;
    border-radius: 5px;
    /* animation: content .5s 2.2s both; */
    box-shadow: 0 0 20px rgba(0, 0, 0, .2);
}

@keyframes content {
    0%{
        opacity: 0;
        transform: translateY(-3em);
    }
    100%{
        opacity: 1;
        transform: translateY(0);
    }
}

/* - 作者 */
main .me{
    margin-top: -3em;
    margin-bottom: 1em;
    text-align: center;
}
main .me .avatar{
    max-width: 6em;
    border-radius: 100%;
    border: 5px #fff solid;
}
main .me .name{
    margin-top: .25em;
}

/* - 段落 */
main section{
    display: none;
    margin: 2em 0;
    animation: section .3s;
}
main section.active{
    display: block;
}

@keyframes section {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

/* - 首页 */
#main{
    grid-gap: 3.25em 1em;
    text-align: center;
    grid-template-columns: repeat(3, 1fr);
}
#main.active{
    display: grid;
}
#main a{
    transition: transform .3s;
}
#main a:hover{
    transform: scale(1.1);
}
#main i{
    display: block;
    font-size: 2.5em;
    margin-bottom: .3em;
}
#main .title{
    color: #666;
    display: block;
}

/* - 文章和作品 */
#articles a, #products a{
    color: inherit;
    display: block;
    max-width: 18em;
    overflow: hidden;
    position: relative;

    padding-right: 5em;
    margin-bottom: .75em;
    white-space: nowrap;
    text-overflow: ellipsis;
}
#articles a:last-child, #products a:last-child{
    margin-bottom: 0;
}
#articles .meta, #products .meta{
    right: 0;
    color: #999;
    position: absolute;
}

/* - 关于 */
#about{
    line-height: 1.8;
}

/* - 操作 */
.actions{
    display: flex;
    color: #fff;
    user-select: none;
    background: #4cebe3;
    /* 状态栏颜色 */
    margin: 0 -1em -1em -1em;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}
.actions .item{
    flex: 1;
    padding: .75em 0;
    cursor: pointer;
    position: relative;
    text-align: center;
    display: inline-block;
    transition: transform .3s;
}
.actions .item.active{
    text-shadow: 0 0 5px #fff;
}
.actions .item.active:before{
    top: -1em;
    left: calc(50% - .5em);
    content: "";
    display: block;
    position: absolute;
    border: .5em solid transparent;
    border-bottom-color: #5be9d1;
    /* 箭头颜色 */
}

/* 3 - 页尾
-------------------------------- */
footer{
    left: 0;
    right: 0;
    bottom: 0;
    color: #fff;
    padding: 1em 0;
    position: fixed;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, .6) 30%, transparent);
}
footer a{
    color: #fff;
}

.juzhongonggao{
    text-align: center;
}

body {
    background-image: url('static/background-1.jpg');
    background-size: cover;
    transition: background-image 1s ease-in-out;
    -webkit-tap-highlight-color: transparent;
}

/* 修改后的模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background-color: #fefefe;
    margin: 10px auto;
    padding: 15px;
    width: 90%;
    max-width: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    top: 5%;
}

/* 密码输入模态框 */
#passwordModal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.password-modal-content {
    background-color: #fefefe;
    margin: 20% auto;
    padding: 20px;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    text-align: center;
}

.password-input {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.submit-password {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.submit-password:hover {
    background-color: #45a049;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px auto;
        padding: 10px;
        width: 95%;
        top: 2%;
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .modal-content h3 {
        font-size: 1.1rem;
    }
    
    .modal-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .close {
        font-size: 24px;
        right: 10px;
        top: 5px;
    }
    
    .disclaimer-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .password-modal-content {
        margin: 30% auto;
        width: 90%;
    }
}
