/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    font-family: 'Montserrat', sans-serif;
}

body {
    line-height: 2;
}

/* 导航栏样式 */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3.5rem;
    background: hsla(0, 0%, 0%, 0.85);
    z-index: 1000;
}

.nav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    height: 100%;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 当前页面 */
.nav-link.current {
    color: #ffd100;
}


.nav-link:hover,
.nav-link:focus {
    color: #ffd100;
}

/* 英雄区域 */
.hero {
    height: 100vh;
    background:
        linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
        url('./img/我看你千早了.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-align: center;
    padding-top: 5rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 800px;
    padding: 0 2rem;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

.hero-text h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.hero-text .course-info {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.hero-text .motto {
    font-style: italic;
}

/* 内容区域 */
.content {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #333;
}

h3 {
    font-size: 1.3rem;
    margin-top: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

p, ul {
    margin-bottom: 1rem;
}

ul li {
    margin-bottom: 0.5rem;
}

/* 页脚 */
footer {
    background: #1a1a1a;
    color: white;
    text-align: center;
    padding: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
        align-items: center;
    }

    .nav-link {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .hero-content {
        gap: 1rem;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }
}

/* 无障碍焦点样式 */
:focus-visible {
    box-shadow: 0 0 0 3px #ffd100; 
    border-radius: 8px; /* 配合圆角，按需调整数值 */
}

/* 回到顶部按钮 */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #ffd100;
    color: #000000ef;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

#backToTopBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#backToTopBtn:active {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 页脚 */
footer {
    background: hsl(0, 0%, 0%);
}

.code-img {
  width: 400px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
