body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* 防止出现滚动条 */
    font-family: Arial, sans-serif;
}

.sidebar {
    width: 150px;
    height: 100%;
    background-color: #333;
    color: white;
    padding: 15px;
    position: fixed; /* 固定定位 */
    transition: transform 0.3s ease;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar a {
    text-decoration: none;
    color: white;
    display: block;
    padding: 10px;
}

.sidebar a:hover {
    background-color: #575757;
}

.login-tab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff;
    /* 距离左侧距离: 10px; */
    margin-left: 10px;
}
.login-tab img {
    width: 100%;
    height: 100%;
}

.content {
    margin-left: 150px; /* 增加侧边栏与右侧内容的距离 */
    padding: 20px;
    height: 100%;
    overflow-y: auto; /* 为内容区添加滚动条 */
    background-image: url(../img/logo-touming1.png);
    background: linear-gradient(250deg, #acecea, #f3d9e4);
    background-size: 500%;
    animation: bgAnimation 5s linear infinite;
}
@keyframes bgAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


.content-section {
    display: none; /* 默认隐藏所有内容 */
}

.content-section h1 {
    margin: 0 auto;
    text-align: center;
}

.content-section p {
    margin: 20px auto;
    text-align: center;
    font-size: 1.2rem;
}

.content-section.active {
    display: block; /* 只有激活的内容显示 */
}

.toggle-btn {
    margin-top: 120px;
    margin-left: 20px;
    padding: 10px;
    background-color: #444;
    color: white;
    border: none;
    cursor: pointer;
}

.toggle-btn:hover {
    background-color: #555;
}

/* 侧边导航栏初始状态 */
.closed {
    transform: translateX(-100%);
}
.sidebar ul li a.active {
    background-color: #575757; /* 选中项背景颜色 */
}




/* 测试打字机css样式 */
.container {
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    
}

h1 {
    font-size: 2.4rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.typewriter {
    font-size: 2rem;
    line-height: 1.4;
    margin: 1rem auto;
    min-height: 3em;
}

/* 光标样式 */
.cursor {
    display: inline-block;
    width: 2px;
    height: 2.2rem;
    background: #fff;
    vertical-align: middle;
    margin-left: 4px;
    animation: blink 1s infinite;
}

/* 光标动画 */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.controls {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.controls .btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.controls .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.speed-display {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 1rem;
}