/* Header 样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.7); /* 亚克力透明效果 */
    backdrop-filter: blur(10px); /* 模糊背景 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 阴影 */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
}

/* Logo 样式 */
.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.site-name {
    font-size: 1.5rem;
    color: #333;
    font-weight: 700;
    transition: transform 0.3s ease, text-shadow 0.5s ease;
    margin: 0;
}

/* 鼠标悬停时的效果 */
.site-name:hover {
    transform: scale(1.15);  /* 放大效果 */
    animation: glow 0.5s ease forwards;  /* 发光动画只执行一次 */
}

/* 发光脉动动画 */
@keyframes glow {
    0% {
        text-shadow: 0 0 0px rgba(219, 236, 255, 0.8), 0 0 0px rgba(219, 236, 255, 0.6), 0 0 0px rgba(219, 236, 255, 0.4);
    }
    50% {
        text-shadow: 0 0 10px rgba(219, 236, 255, 1), 0 0 15px rgba(219, 236, 255, 0.8), 0 0 20px rgba(219, 236, 255, 0.6);
    }
    100% {
        text-shadow: 0 0 6px rgba(219, 236, 255, 0.8), 0 0 9px rgba(219, 236, 255, 0.6), 0 0 12px rgba(219, 236, 255, 0.4);
    }
}

/* 菜单样式 */
.menu-container {
    display: flex;
    justify-content: center;
    flex-grow: 1;
}

.menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
  }

  .menu li {
    margin: 0 15px;
    position: relative;
  }

  .menu a {
    text-decoration: none;
    color: #444;
    font-size: 1rem;
    padding: 5px 10px;
    display: block;
    position: relative;
    font-weight: bold;
    transition: color 0.4s ease, transform 0.3s ease;
    background-size: 200% 100%;
    background-position: right bottom;
  }

  .menu li:hover > a {
    color: #007bff;
    background-position: left bottom; /* 颜色从中间展开 */
    transform: scale(1.1); /* 文字放大 */
  }

  .menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007bff;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
  }

  .menu li:hover > a::after {
    transform: scaleX(1);
    transform-origin: bottom left;
  }


/* 子菜单样式 - 修复动画问题 */
.submenu {
    display: block;
    opacity: 0;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    list-style: none;
    padding: 10px 0;
    overflow: hidden;
    transition: opacity 0.5s ease, height 0.4s ease; /* 增加过渡时间 */
    position: absolute;
    top: 110%;
    left: -50%;
}

.menu li:hover .submenu {
    opacity: 1;
    height: auto;
    padding: 10px 0;
}


/* 用户区样式 */
.user-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-btn {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.login-btn:hover {
    background-color: #0056b3;
}

/* 头像样式 - 修正右侧溢出 */
.avatar {
    width: 40px;
    height: 40px;
    margin-right: 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;  /* 关键修改：确保头像不会溢出 */
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}








































/* 页脚样式 */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.7); /* 亚克力透明效果 */
    backdrop-filter: blur(10px); /* 模糊背景 */
    box-shadow: 6px 4px 4px 6px rgba(0, 0, 0, 0.1); /* 阴影 */
    position: fixed;
    width: 100%;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
    max-width: 100%; /* 限制最大宽度 */
    box-sizing: border-box; /* 包含内边距和边框在内的宽度计算 */
}

/* 鼠标悬停时改变背景颜色 */
footer:hover {
    background-color: rgba(255, 255, 255, 0.85);
}

/* 左侧内容 */
.footer-left {
    font-size: 0.9rem;
    color: #333;
}

.footer-left a {
    color: #333;
    text-decoration: none;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.footer-left a:hover {
    color: #007bff; /* 悬停时蓝色 */
}

/* 右侧内容 */
.footer-right {
    
    font-size: 0.9rem;
    color: #333;
}

.footer-right span {
    font-weight: bold;
}

.footer-right a {
    color: #333;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.3s ease;
}

.footer-right a:hover {
    color: #007bff; /* 悬停时蓝色 */
}