/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 桌面容器 */
#desktop {
    min-width: 1250px;
    min-height: 700px;
    margin: 0 auto;
    width: 100vw;
    height: 100vh;
    background: var(--background-color);
    background-image: linear-gradient(var(--line-color) 1px, transparent 0px),
        linear-gradient(90deg, var(--line-color) 1px, transparent 0px);
    background-size: 20px 20px;
    position: relative;
    overflow: hidden;
}

/* 导航栏 */
.nav-bar {
    color: white;
    width: 100%;
    height: 40px;
    background-image: url('../images/lucky.jpg');
    padding: 0px 16px;
    overflow: hidden;

    .nav-title {
        font-family: "moondance", sans-serif;
        font-size: 2rem;
        user-select: none;
        /* cursor: pointer; */
    }

    .nav-links {
        opacity: 0;
        transition: opacity 0.3s ease;
        position: absolute;
        width: 160px;
        height: 220px;
        top: 50px;
        left: 10px;
        background-color: rgba(255, 255, 255, 0.646);
        border-radius: 10px;
        box-shadow: var(--show-border);
        display: flex;
        flex-direction: column;

        .link-item {
            display: flex;
            margin: 10px;
            align-items: center;

            img {
                width: 50px;
                height: 50px;
            }

            a {
                font-family: mincho;
                font-size: 1.5rem;
                display: block;
                color: var(--main-color);
                text-decoration: none;
                padding: 5px 10px;
                transition: all 0.3s ease;

            }
        }
    }

    .nav-title:hover+.nav-links,
    .nav-links:hover {
        opacity: 1;
        /* 显示 */
    }
}

/* 爱心对话样式 */
.heart {
    position: absolute;
    cursor: pointer;
    color: white;
    user-select: none;
    top: 23%;
    left: 18%;
    z-index: 1;
}

.heart:hover {
    transform: scale(1.05);
}

/* 动态样式 */
.records {
    position: absolute;
    top: 8%;
    right: 8%;
    height: 80px;
    color: var(--background-color);
    background-image: url(../images/records.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;

    .records-new {
        width: 98%;
        height: 20px;
        overflow: hidden;
        padding: 0px 10px;
        margin-bottom: 20px;
        margin-left: 20px;
        font-family: mincho;
        font-size: 1rem;
        color: inherit;
    }

}

.records:hover {
    color: var(--background-color);
    cursor: pointer;
    transform: scale(1.05);
}

.records-new {
    display: none;
}

.records-new.active {
    display: block;
}

/* 主窗口样式 */
.main-box {
    position: absolute;
    background: var(--main-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    width: 45vw;
    height: 45vh;
    min-width: 400px;
    max-width: 600px;
    min-height: 360px;
    max-height: 500px;
    top: 20%;
    left: 32%;
    z-index: 1;
}

.mian-box-title {
    color: white;
    height: 8%;
    margin: 30px 0px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    /* 文字不能选中 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.title-cn {
    font-family: mincho;
    font-size: 1.4rem;
    color: var(--text-color);
    position: relative;
    z-index: 2;
    /* 设置较高的层级 */
    margin-bottom: -22px;
    /* 通过负margin创造重叠效果 */
}

.title-en {
    font-family: meddon;
    font-size: 1.4rem;
    color: var(--background-color);
    position: relative;
    z-index: 1;
    /* 设置较低的层级 */
}

.mian-box-title:hover * {
    transform: scale(1.1);
}

.main-box-content {
    margin: 0px 20px;
    font-family: mincho;
    font-size: 2rem;
    color: var(--background-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-box-buttons {
    width: 100%;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    transform: translateX(20px);

    button {
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        margin: 0;
    }

    button:hover {
        transform: scale(1.1);
    }
}

.left-box {
    position: absolute;
    background: var(--main-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 360px;
    height: 180px;
    top: 40%;
    left: 8%;
    display: flex;
    justify-content: center;
    align-items: center;

    .box-content {
        padding: 10px;
        height: 88%;
        width: 95%;
        background-image: url(../images/lucky.jpg);
        background-size: cover;
        background-position: -0px -240px;
        background-repeat: no-repeat;
        display: flex;
    }

}

.right-box {
    position: absolute;
    background-image: url(../images/strawberry.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 380px;
    height: 220px;
    top: 55%;
    left: 60%;
}

.music-box {
    position: absolute;
    width: 300px;
    top: 70%;
    left: 20%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    .music-name {
        width: 100%;
        display: flex;
        justify-content: left;
        align-items: center;
        margin-bottom: 16px;
        font-family: moondance;
        font-size: 2.2rem;
        color: var(--main-color)
    }

    .music-progressContainer {
        width: 100%;
        height: 2px;
        background-color: var(--main-color);
        border-radius: 5px;
        margin-bottom: 30px;

        .progress {
            width: 0;
            height: 100%;
            background-color: var(--secondary-color);
        }
    }

    .music-buttons {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    button {
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        margin: 0;
    }
}

.window {
    position: absolute;
    background: var(--main-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 500px;
    height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;

    /* 窗口标题栏 */
    .title-bar {
        width: 100%;
        height: 40px;
        background: var(--main-color);
        color: var(--background-color);
        padding: 10px;
        cursor: move;
        display: flex;
        justify-content: space-between;
        border-radius: 8px 8px 0 0;
    }

    /* 窗口内容区域 */
    .content {
        color: var(--text-color);
        padding: 10px;
        width: 98%;
        height: 86%;
        box-sizing: border-box;
        border: 1px solid var(--border-color);
        background-color: var(--background-color);
        /* padding 包含在高度内 */
        overflow: hidden;
    }

    .scroll-content {
        height: 100%;
        overflow-y: scroll;
        scrollbar-color: var(--main-color) #FFF7F0;
        scrollbar-width: thin;
    }

    /* 关闭按钮 */
    .close-btn {
        cursor: pointer;
        padding: 0 5px;
    }
}

.about-content .messages-content {
    /* 设置内容区域的基本样式 */
    padding: 0px 10px 30px 15px;
    line-height: 1.5;
}