body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

.container {
    max-width: 1250px;
    margin: auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0); /* 完全透明 */
}

header {
    padding: 20px 10px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.header-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* 当空间不足时，自动换行 */
    justify-content: center;
    width: 100%;
}

.avatar {
    margin-right: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* 防止头像在小屏幕下被压缩 */
}

.avatar img {
    display: block;
    width: 150px; /* 固定宽度，适应小屏幕 */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.separator {
    background-color: #6A005F; /* 设置分割线颜色 */
    width: 5px;
    height: 150px;
    margin: 0 10px;
    flex-shrink: 0; /* 防止分割线在小屏幕下被压缩 */
}

.profile {
    flex: 1; /* 占据剩余空间 */
    padding: 20px;
    word-wrap: break-word; /* 强制换行 */
    box-sizing: border-box;
}

.profile h1 {
    margin: 0;
    font-size: 24px;
}

.profile h3 {
    margin: 5px 0;
    font-size: 18px;
    color: #555;
}

.profile p {
    margin: 10px 0;
    font-size: 16px;
}


.name,
.jobs,
.desc {
    margin: 5px;
}

.name {
    font-size: 34px;
    margin: 0.5em 0 0.5em;
}

.jobs {
    color: #000066;
    font-size: 17px;
    margin: 0.5em 0 0 0;
}

.desc {
    font-size: 16px;
    line-height: 1.6;
    margin: 0.3em 0 0 0;
}

.banner {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(1, 1, 1, 0.5);
    background-color: #fff;
    border: 2px solid #6A005F;
}

.banner h2 {
    margin: 0 0 10px;
    color: #6A005F;
    font-size: 24px;
    padding-bottom: 5px; /* 添加内边距，增加标题与下方边框的间距 */
    border-bottom: 3px solid;
    word-wrap: break-word; /* 强制换行 */
}

.banner p {
    font-size: 16px;
    line-height: 1.5;
    word-wrap: break-word; /* 强制换行 */
    overflow-wrap: break-word; /* 处理长单词的换行 */
    margin-bottom: 15px;
}

.banner ul {
    list-style-type: disc;
    padding-left: 20px;
}

.banner ul li {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 5px;
    word-wrap: break-word; /* 强制换行 */
}

td {
    text-align: center; /* 居中文本内容 */
    margin: auto; /* 水平居中 */
}

.news-list {
    list-style: "👏";
    font-family: Microsoft YaHei;
}

.news-list li {
    margin-left: 2%;
    margin-top: 8px;
}

.students-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* 自动填充列，每列最小200px */
    grid-auto-rows: 1fr; /* 自动行高，保证所有卡片等高 */
    gap: 10px; /* 卡片之间的间距 */
    margin-top: 10px;
    width: 100%;
}

/* 单个学生卡片样式 */
.student-card {
    display: flex;
    flex-direction: column; /* 让图片和文字垂直排列 */
    align-items: center;
    background-color: #fff;
    height: 300px; /* 固定高度 */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    cursor: pointer; /* 使卡片可点击 */
}

/* 调整图片样式 */
.student-photo {
    width: 100%;
    aspect-ratio: 1 / 1; /* 关键：强制宽高比1:1 */
    object-fit: cover; /* 保持比例并填充容器 */
    border-radius: 8px;
    margin-bottom: 10px;
  }

/* 链接样式 */
.student-card a {
    text-decoration: none;
    color: #333;
}

.student-card:hover {
    transform: translateY(-5px); /* 悬浮效果 */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 1000px) {
    .student-card {
        flex: 0 0 100%; /* Take full width on small screens */
    }
    .header-box {
        flex-direction: column; /* 垂直堆叠布局 */
        align-items: center;
    }

    .avatar img {
        width: 120px; /* 小屏幕下的头像宽度 */
        margin-bottom: 15px;
    }

    .separator {
        width: 150px;
        height: 5px; /* 水平分割线 */
        margin: 10px 0;
    }

    .profile {
        padding: 15px;
        text-align: center; /* 文字居中 */
    }

    .profile h1 {
        font-size: 20px;
    }

    .profile h3 {
        font-size: 16px;
    }

    .profile p {
        font-size: 14px;
    }
    .student-card {
        padding: 10px;
        height: auto; /* 取消固定高度，允许卡片根据内容自动调整高度 */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 减小阴影效果 */
    }

    .students-table {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* 在更小的屏幕上减小最小列宽 */
    }

    .student-card img {
        max-width: 80%;
        height: auto;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner {
    animation: fadeIn 0.5s ease-out;
    will-change: opacity, transform;
}
