:root {
    --paper-color: #E8F1F2;
    --ink-color: #2E5E6E;
    --accent-color: #3A7B8C;
    --shadow-color: rgba(0,0,0,0.1);
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: "楷体", "STKaiti", serif;
    background: var(--paper-color) fixed;
    color: var(--ink-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('https://img.zcool.cn/community/01f3fa5d18d473a801213f26e4776a.jpg@1280w_1l_2o_100sh.jpg');   
    background-size: cover;
    background-attachment: fixed;
    background-blend-mode: overlay;
    background-repeat: no-repeat;
    background-position: center;
}

.book-cover {
    width: 90%;
    max-width: 900px;
    min-height: 60vh;
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.8s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.front-cover {
    background: rgba(232, 241, 242, 0.95);
    border: 1px solid #A3C4D2;
    box-shadow: 0 10px 25px var(--shadow-color);
    padding: 2rem;
    text-align: center;
    transform-origin: left center;
    backface-visibility: hidden;
    width: 100%;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
 
.author-portrait {
    width: 200px;
    height: 250px;
    margin: 0 auto 1.5rem;
    background: url('wsf.webp')  center/cover;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    clip-path: ellipse(45% 50% at 50% 50%);
}

.open-book {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    background: var(--accent-color);
    color: white;
    border-radius: 3px;
    font-size: 1rem;
    transition: all 0.3s;
    margin: 1.5rem 0;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px var(--shadow-color);
    font-family: "楷体", serif;
}

.open-book:hover {
    background: var(--ink-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px var(--shadow-color);
}
 
/* 移动端优先的布局样式 */
.links-section {
    width: 100%;
    max-width: 400px;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-top: 1.5rem;
    order: 3; /* 确保在移动端显示顺序 */
}
 
.friend-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 0.8rem;
    text-align: center;
    margin: 0;
    padding: 0;
}
 
.friend-links-grid a {
    color: var(--accent-color);
    text-decoration: none;
    padding: 0.5rem 0.3rem;
    border-bottom: 1px dashed rgba(58, 123, 140, 0.4);
    transition: all 0.3s;
    font-size: 0.9rem;
}
 
.friend-links-grid a:hover {
    color: var(--ink-color);
    border-bottom-color: var(--ink-color);
}
 
.links-title {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 1rem;
    letter-spacing: 1px;
}

.book-cover.opened   {
    transform: rotateY(-150deg);
    pointer-events: none;
}
 
/* 桌面端布局调整 */
@media (min-width: 768px) {
    .front-cover {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 2.5rem;
    }
    
    .author-portrait {
        width: 240px;
        height: 300px;
        margin: 0 2rem 0 0;
    }
    
    .links-section {
        max-width: 280px;
        margin-top: 0;
        order: 0;
    }
    
    .friend-links-grid {
        grid-template-columns: 1fr;
    }
    
    .open-book {
        padding: 1rem 3rem;
        font-size: 1.1rem;
        margin: 2rem 0;
    }
}
 
@media (min-width: 992px) {
    .author-portrait {
        width: 280px;
        height: 350px;
    }
    
    .links-section {
        max-width: 320px;
    }
}