body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.bg-image {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
}

.navbar {
    width: 200px;  /* 减小宽度 */
    /* 修改背景颜色透明度为 70% */
    background-color: rgba(51, 51, 51, 0.7);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    text-align: center;  /* 添加文本居中 */
}

.nav-brand {
    color: white;
    padding: 20px;
    font-size: 1.5em;
    text-align: center;
    background-color: #222;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    display: block;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background-color: #444;
    border-left: 4px solid #a1a1a1;
    transform: translateX(5px);
}



.nav-item:hover::after {
    transform: translateX(0);
}

.sub-nav {
    display: none;
    /* 修改背景颜色并设置 50% 透明度 */
    background-color: rgba(68, 68, 68, 0.5); 
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
}

.nav-item-container:hover .sub-nav {
    display: block;
    opacity: 0.5; /* 保持下拉导航栏透明度为 30% */
    transform: translateX(0);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-nav-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 0;
}

.sub-nav-item {
    color: #ddd;
    text-decoration: none;
    padding: 8px 20px;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.sub-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #555;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}

.sub-nav-item:hover::before {
    transform: scaleX(1);
}

/* 立方体样式 */
.content {
    margin-left: 220px;
    padding: 20px;
    width: calc(100% - 220px);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.transparent-box {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 60px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    min-width: 400px;
    min-height: 400px;
}

.cube-container {
    perspective: 1000px;
    width: 200px;
    height: 200px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 10s infinite linear;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.front {
    transform: translateZ(100px);
    background: rgba(249, 173, 85, 0.8);
}

.back {
    transform: translateZ(-100px) rotateY(180deg);
    background: rgba(161, 242, 85, 0.8);
}

.right {
    transform: translateX(100px) rotateY(90deg);
    background: rgba(103, 198, 254, 0.8);
}

.left {
    transform: translateX(-100px) rotateY(-90deg);
    background: rgba(100, 241, 234, 0.8);
}

.top {
    transform: translateY(-100px) rotateX(90deg);
    background: rgba(205, 113, 242, 0.8);
}

.bottom {
    transform: translateY(100px) rotateX(-90deg);
    background: rgba(248, 102, 182, 0.8);
}

@keyframes rotate {
    0% {
        transform: rotateX(0) rotateY(0) rotateZ(0);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
} 
.back-to-home {
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 10px 20px;
    background-color: #747475;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    z-index: 1000; /* 确保按钮显示在其他元素之上 */
}

.back-to-home:hover {
    background-color: #4d4d4d;
}