body {
    /* 设置背景图片 */
    background-image: url('../static/image/DH.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    padding: 20px;
}


#autoPlayAudio {
    display: none;
}

.center {
    text-align: center;
    position: relative;
}

/*按钮*/
button {
    padding: 15px 30px;
    font-size: 20px;
    color: white;
    background-color: #4CAF50; 
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease; 
}

button:hover {
    background-color: #45a049;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2); 
}

.blue-button {
    background-color: #007BFF; 
}

.blue-button:hover {
    background-color: #0056b3; 
}

/* 字体 */
.text {
    width: 500px; 
    position: absolute;
    top: -170px; 
    left: 50%; 
    transform: translateX(-50%); 
    font-size: 72px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px black;
    padding: 5px 10px;
    border-radius: 5px;
}

.button-spacing {
    margin: 20px;
}

.right-side {
    margin-left: 100px;
    position: relative;
    width: 600px;
    height: 400px; 
    float: right;
    margin-top: 20px;
    border-radius: 10px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
    overflow: hidden;
}

footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: rgba(248, 248, 248, 0.5);
  height: 30px;
  line-height: 5px;
  text-align: center;
}




#randomImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content; /* 使用更合适的宽度控制 */
    background-color: rgba(51, 51, 51, 0.7);
    color: white;
    padding: 5px 15px; /* 添加左右内边距 */
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 5px; /* 增加圆角效果 */
}

.navbar nav ul {
    list-style-type: none;
    text-align: center;
    margin: 0;
    padding: 0;
    display: flex; /* 使用弹性布局 */
    justify-content: center; /* 水平居中对齐 */
    gap: 10px; /* 元素之间的间距 */
}

.navbar nav ul li {
    line-height: 30px;
}

.navbar nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    padding: 5px 10px;
    transition: color 0.3s ease;
    display: inline-block; /* 显示为行内块元素以适应弹性布局 */
}

.navbar nav ul li a:hover {
    color: #ffcc00;
}


@media (max-width: 768px) {
    body {
        background-size: auto;
        background-position: top center;
        padding: 10px;
    }

    .center {
        width: 100%;
    }

    .text {
        width: 90%;
        font-size: 48px;
        top: -100px;
        position: static;
        margin-bottom: 20px;
    }

    button {
        padding: 10px 20px;
        font-size: 16px;
    }

    .button-spacing {
        margin: 10px;
    }

    .right-side {
        margin-left: 0;
        width: 100%;
        height: auto;
        margin-top: 10px;
    }

    #randomImage {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .navbar nav ul li {
        display: block;
        margin-bottom: 10px; 
        margin-right: 0; 
    }

    .navbar nav ul li a {
        font-size: 13px; 
    }
    .text {
        font-size: 30px;
    }
}