body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    background-image: url("../src/background-img.jpg");
    background-size: cover;
    background-attachment: fixed;
    background-position: bottom;
}

a{
    text-decoration: none;
}

/* 置顶栏 */
.topbar {
    background: linear-gradient(120deg, rgba(10, 190, 145, .6) 0, rgba(50, 114, 190, .6) 100%);
    color: white;;
    text-align: center;
    z-index: 100; /* 置顶栏在其他内容之上 */
    display: flex;
    justify-content: space-between;
    line-height: 100%;
    border-radius: 10px;
    height:70px;
    padding: 0 20px;
}

.topbar .openbtn {
    font-size: 20px;
    cursor: pointer;
    background: linear-gradient(120deg, rgba(27, 255, 208, .6) 0, rgba(100, 171, 255, .6) 100%);
    color: #f4f4f9;
    border: none;
    padding: 10px;
    border-radius:10px;
    flex-shrink: 1;
    height: 50px;
    width: 50px;
    margin: 10px 0;
    font-weight: 50px;
    border: 0;
}

.topbar .openbtn:hover {
    background-color: #444;
}

.topbar .title {
    height: 100%; 
    display:flex;
    align-items: center;
}

.topbar .title .logo{
    height: 100%; 
    width: auto;
    max-width: 150px; 
    margin-right: 10px;
}

.topbar .function {
    display: flex;
    align-items: center; 
    flex-shrink: 1;
}

.topbar .message {
    height: 30px; 
    width: auto;
    margin-right: 10px; 
}

.topbar .account {
    font-size: 20px;
    cursor: pointer;
    background: linear-gradient(120deg, rgba(27, 255, 208, .6) 0, rgba(100, 171, 255, .6) 100%);
    color: white;
    border: none;
    padding: 10px;
    border-radius:10px;

}

.topbar .account:hover {
    background-color: #444;
}

.topbar .openbtn-mobel {
    display: none; 
}

.topbar .function .account-mobel {
    display: none; 
}

/* 侧边栏 */
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 101; /* 侧边栏在置顶栏之上 */
    top: 0;
    left: 0;
    background:linear-gradient(120deg, rgba(255, 255, 255,0) 0,  rgba(102, 102, 204,1) 100%);
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    border-radius: 10px;
}


.sidebar .closebtn{
    padding: 10px 15px;
    text-decoration: none;
    font-size: 25px;
    color:rgba(27, 255, 208, .6);
    display: block;
    transition: 0.3s;
}

.sidebar .closebtn:hover{
    color: rgb(5, 30, 131);
}

.sidebar .sidebar-content{
    border-top: #19E8A2 6px solid;
    height: 95%;
    background: rgba(0, 0, 0, 0);
}

.sidebar .link {
    padding: 10px 15px;
    text-decoration: none;
    font-size: 25px;
    background: rgba(0,0,0,0);
    display: block;
    transition: 0.3s;
    border-radius: 10px;
    border-top: rgb(152, 45, 244 ) 2px solid;
    color: #ffffff;
}

.sidebar .link:hover {
    background: linear-gradient(120deg, rgba(27, 255, 208, .6) 0, rgba(100, 171, 255, .6) 100%);
}

.sidebar .link:active {
    background-color: #444;
}

.sidebar .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
}

/* 覆盖层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 98; /* 覆盖层在侧边栏之下 */
    display: none;
}

.overlay.active {
    display: block;
}

/* 底部栏 */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1em 0;
    width: 100%;
    bottom: 0;

}

footer .footer-top {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 20px 0;
}

footer .footer-top .subtitle {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

footer .footer-top ul {
    list-style-type: none;
    padding: 0;
}

footer .footer-top ul li {
    margin-bottom: 5px;
}

footer .footer-top ul li a {
    text-decoration: none;
    color: white;
}

footer .footer-top ul li a:hover {
    text-decoration: underline;
}

footer .footer-top .contact img{
    height: 25px;
    width: 25px;
      
}

footer .footer-top .contact {
    line-height: 25px;
    text-align: center;
      
}

footer .footer-bottom img{
    height: 14px;
    width: 14px;
}

footer .footer-bottom a{
    color:white;
}

footer .footer-bottom a:hover{
    text-decoration: underline;
}

footer .footer-top-mobel {
    display: none;
}

/* 手机版样式 */
@media (max-width: 768px) {

    body {
        background-image: url("../src/background-img-mobel.jpg");
    }

    .topbar {
        background: linear-gradient(120deg, rgba(27, 255, 208, .6) 0, rgba(100, 171, 255, .6) 100%);
        width: 100%;
        padding: 0;
    }

    .topbar .openbtn {
        display: none;
    }

    .topbar .openbtn-mobel {
        display: block;
        font-size: 20px;
        cursor: pointer;
        background: linear-gradient(120deg, rgba(27, 255, 208, .6) 0, rgba(100, 171, 255, .6) 100%);
        color: white;
        border: none;
        padding: 15px;
        border-radius: 10px;
        flex-shrink: 1;
    }

    .topbar .openbtn-mobel:hover {
        background-color: #444;
    }

    .topbar .title .sub-title {
        display: none;
    }

    .topbar .logo {
        height: 50%;
    }

    .topbar .function {
        height: 100%;
    }

    .topbar .message {
        height: 45px;
    }

    .topbar .function .account {
        display: none;
    }

    .topbar .function .account-mobel {
        display: block;
        height: 45px;
        width: 45px;
        background-image: url("../src/account.png");
        background-size: cover;
    }

    footer .footer-top {
        display: block;
    }
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* 确保加载动画在最上层 */
}

.loader::before {
    content: '';
    width: 45px;
    height: 40px;
    background: 
        linear-gradient(#ffffff calc(1*100%/6), #000000 0 calc(3*100%/6), #ffffff 0),
        linear-gradient(#ffffff calc(2*100%/6), #000000 0 calc(4*100%/6), #ffffff 0),
        linear-gradient(#ffffff calc(3*100%/6), #000000 0 calc(5*100%/6), #ffffff 0);
    background-size: 10px 400%;
    background-repeat: no-repeat;
    animation: matrix 1s infinite linear;
}
  
@keyframes matrix {
    0% {
        background-position: 0% 100%, 50% 100%, 100% 100%
    }
    100% {
        background-position: 0% 0%, 50% 0%, 100% 0%
    }
} 
    


