
@font-face {
    font-family: 'pixelFont';
    src: url("Font/PressStart2P.ttf");
}

* {
box-sizing: border-box;
}
body {
    background-color: rgb(255, 255, 255);
    margin: 0 auto;
    color: #fff;
    cursor: url("img/cursor.gif"), auto;
}

.nav {
    position: sticky;
    margin: 30px;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);      /* 关键：向左回退自身宽度的一半 */
    display: inline-block;            /* 关键：让导航宽度由内容决定 */
    width: auto;                     /* 可选：确保宽度自适应 */
    z-index: 1000;                   /* 可选：防止被其他元素覆盖 */
}
  
.icon:active {
    cursor: grabbing;
  } 
@font-face {
    font-family: 'pixelFont';
    src: url("Font/PressStart2P.ttf");
}

/* 修改图标容器样式 */
.icon {
    /* 保持原有定位代码 */
    position: fixed;
    cursor: grab;
    user-select: none;
    transition: 0.3s;
    
    /* 新增文字布局样式 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* 图标与文字的间距 */
}

/* 修改链接样式 */
.icon a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important; /* 移除下划线 */
    color: #000 !important; /* 黑色文字 */
    font-family: 'pixelFont', monospace; /* 应用像素字体 */
    font-size: 12px; /* 根据需要调整 */
    line-height: 1.4;
}

/* 图片样式调整 */
.icon img {
    display: block; /* 确保图片独立成块 */
    margin-bottom: 5px; /* 图片与文字的间距 */
    pointer-events: none;
}

/* 可选：添加悬停效果 */
.icon:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.3));
}