* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
}

header {
    background-color: rgba(255, 255, 255, 1);
    height: 65px;
    width: 100%;
    position: fixed;
    z-index: 1000;  /* 确保 header 居于最上层 */
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 23px;
    /* border-bottom: 2px solid #ddd; */
}

h1 {
    color: black;
    position: absolute;
    margin: 0;
    font-size: 20px;
    left: 50px;
    top: 0;
    line-height: 70px;
    display: flex;
    align-items: center;
    width: auto;
    z-index: 1000;  /* 确保标题在 header 内 */
    font-weight: 500;

    font-size: 22px;
}
h1::after {
    content: "AI for Creative Innovation Design Joint Lab"; /* 默认显示英文 */.
    font-family: 'Roboto', sans-serif;
  }
  
  h1:hover::after {
    content: attr(data-text); /* 悬停时替换成 data-text 里的中文 */
  }
  
  
  /* 添加 logo 样式 */
  h1::before {
    content: "";
    background-image: url("images/logo.png");
    background-size: contain; /* 让 logo 适应 */
    background-repeat: no-repeat;
    width: 55px; /* 适当调整 logo 大小 */
    height: 55px;
    display: inline-block;
    position: relative; /* 改为 relative，避免被覆盖 */
    z-index: 100;
    margin-right: 10px; /* 让 logo 和文字之间有间距 */
  }
  header ul {
    position:absolute;
    right:2vw;
    top:0;
    line-height:70px;
    font-weight: 500;
    font-size:20px;
    
  }
header li {
    display: inline;
    margin-right: 1.5vw;
}

header a {
    position: relative;
    color: #808080;
    text-decoration: none;
    display: inline-block;
    line-height: 40px;
    padding: 0 10px;
}

header a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    right: -5px;
    bottom: 0;
    background-color: black;
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

header a:hover::after {
    opacity: 1;
    padding: 4px 4px;
}

header a:hover {
    color: white;
}

/* 主页的背景 */
.news {
    height: 100vh;
    background-image: url("images/2.png"); /* 默认背景 */
    background-repeat: no-repeat;
    background-size: contain;  /* 确保背景图片覆盖整个区域 */
    background-position: center; /* 图片居中 */
    background-color:white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* margin-top: 65px; 确保 header 不会挡住 .news */
    transition: background-image 0.5s ease-in-out; 
    position: relative;
    z-index: 1; /* 让背景图片位于 header 下面 */
}

/* 触发区域 */
.hover-area {
    position: absolute;
    width: 105px;
    height: 75px;
    background-color: rgba(255, 0, 0, 0); /* 可见区域 */
    /* border: 2px dashed black; */
    cursor: pointer;
    z-index: 999;
    transform: skew(-10deg, 0deg) rotate(19deg); /* 水平倾斜 + 旋转 */
}


/* 12 个 hover-area 均匀分布 */
#area1 { top: 37%; left: 16.8%; } /* news&updates */
#area2 { top: 46%; left: 24%; }   /* people */
#area3 { top: 10.5%; left: 41.5%; }/* about */
#area4 { top: 23%; left: 38.5%;} /* Research */
#area5 { top: 41%; left: 42%; } /* publications */
#area6 { top: 44.5%; left: 34.5%; } /* Teaching */
#area7 { top: 59%; left: 42%; } /* Job */
#area8 { top: 67.5%; left: 38%; } /* Contacts */
#area9 { top: 60%; left: 54%; } /* Video */
#area10 { top: 57.5%; left: 66.8%; } /* Events */
#area11 { top: 45%; left: 79.8%; } /* Press */
#area12 { top: 83%; left: 63.5%; } /* Member */





.news h2 {
    font-size:60px;
    margin-top:60px;
} 
.news p {
    color:#FEF7E6;
    font-size:18px;
    margin:25px 0;
}
.news a {
    color:white;
    text-decoration: none;
    border: 1px solid black;
    padding:4px 20px;
    border-radius: 20px;
    background-color: black;
    transition: border-width 0.5s ease;
    position: absolute; 
    bottom: 30px;       
    left: 50%;          
    transform: translateX(-50%); 
}
.news a:hover {
    /* background-color: #333;  */
    opacity: 1;  
    padding: 10px 20px;      
}
input::placeholder {
    color:#DDDDDD;
}
input:focus {
    outline: none; /* 移除焦點效果 */
    border-color:#E0E9A3; /* 焦點時的邊框顏色 */
} */
footer {
    background-color:#000000;
    color:#B7B7B7;
    height:60px;
    display:flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}
.menu {
    display:none;
}
/* 响应式设计 */
@media screen and (max-width: 768px) {
    /* 隐藏默认菜单 */
    header ul {
        display: none;
        position: absolute;
        top: 90px; /* 让菜单紧贴 menu 按钮 */
        left: 0;
        width: 100%; /* 让菜单占满整个屏幕宽度 */
        background-color: rgba(0, 0, 0, 0.8); /* 背景颜色，可调 */
        text-align: center; /* 让文本居中 */
        padding: 10px 0;
    }

    /* 显示菜单按钮 */
    .menu {
        display: block;
        background-color: black;
        color: white;
        font-size: 20px;  /* 调整字体大小 */
        font-weight: bold; /* 让字体更清晰 */
        position: absolute;
        top: 20px;
        left: 20px;
        border: none;
        cursor: pointer;
        padding: 5px 10px;
        border-radius: 10px;
        z-index: 1000;
    }

    /* 设置菜单列表为竖排 */
    header ul li {
        display: block; /* 让菜单变成竖排 */
        margin: 5px 0; /* 增加行距 */
    }

    /* 调整菜单链接样式 */
    header ul li a {
        display: block;
        color: white;
        text-decoration: none;
        font-size: 18px;
        padding: 10px 0;
        /* transition: background 0.3s; */
    }

    h1 {
        font-size: 18px;  /* 调整字体大小，使其在小屏幕上更紧凑 */
        text-align: left; /* 让 h1 居中 */
        width: auto;  /* 让 h1 占满屏幕宽度 */
        left: 100px;
        /* transform: translateX(-50%); 居中对齐 */
        top: 25px;  /* 调整位置，使其更靠近顶部 */
        line-height: normal;  /* 让行高变得更适合小屏幕 */
    }
}