/* 首页样式 */

/* 首页背景 */
.home-page {
    background-color: #000000ee; /* 黑色背景 */
    overflow: hidden; /* 隐藏溢出内容 */
    font-family: 'Anek Latin', 'Microsoft YaHei', sans-serif; /* 默认字体 */
    position: relative; /* 确保伪元素相对于此容器定位 */
    min-height: 100vh; /* 确保至少占满整个视口高度 */
    display: flex; /* 使用flex布局 */
    flex-direction: column; /* 垂直方向排列 */
    justify-content: center; /* 垂直居中 */
}

.home-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/texture.png'); /* 纹理图片 */
    background-repeat: repeat;
    background-size: 500px 500px;
    opacity: 0.5; /* 调整纹理透明度 */
    z-index: 0; /* 确保纹理在背景色上方 */
    mix-blend-mode: overlay; /* 使用 mix-blend-mode 替代 background-blend-mode */
    pointer-events: none;
}

/* 首页文字按钮 */
.home-buttons {
    position: fixed;
    top: 40px; /* 调整顶部位置，与银幕保持距离 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1000;
    align-items: center; /* 按钮内容居中 */
}

.home-button {
    color: #fff;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.home-button:hover {
    color: #ffcc00;
}

/* 加载页面样式 */
#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* 背景颜色 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 确保加载页面在最上层 */
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3); /* 加载动画边框 */
    border-top: 4px solid #ffcc00; /* 加载动画颜色 */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite; /* 旋转动画 */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-screen p {
    color: #fff;
    margin-top: 10px;
    font-family: 'Anek Latin', sans-serif;
    font-size: 16px;
}

/* 欢迎部分 */
.welcome-section {
    width: 100%; /* 占满整个页面宽度 */
    min-height: 100vh; /* 至少占满整个页面高度 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直居中 */
    align-items: center; /* 水平居中 */
    color: #fff;
    text-align: center;
    margin: 0;
    padding: 0;
    overflow: hidden; /* 隐藏溢出内容 */
    position: relative; /* 添加相对定位 */
    padding-top: 60px; /* 为顶部按钮留出空间 */
    padding-bottom: 0; /* 移除底部内边距 */
}

/*文字动画*/
.line-1 {
    display: flex;
    justify-content: center;
    gap: 2px; /* 字符间距 */
}

.char {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.line-1:hover .char {
    transform: translateY(-5px) rotate(5deg); /* 散开效果 */
    opacity: 1;
}

/* 为每个字符设置不同的偏移量 */
.line-1:hover .char:nth-child(1) { transform: translateY(-5px) rotate(-5deg); }
.line-1:hover .char:nth-child(2) { transform: translateY(-3px) rotate(3deg); }
.line-1:hover .char:nth-child(3) { transform: translateY(-4px) rotate(-2deg); }
.line-1:hover .char:nth-child(4) { transform: translateY(-6px) rotate(4deg); }
.line-1:hover .char:nth-child(5) { transform: translateY(-2px) rotate(-3deg); }
.line-1:hover .char:nth-child(6) { transform: translateY(-5px) rotate(2deg); }
.line-1:hover .char:nth-child(7) { transform: translateY(-3px) rotate(-4deg); }
.line-1:hover .char:nth-child(8) { transform: translateY(-4px) rotate(3deg); }
.line-1:hover .char:nth-child(9) { transform: translateY(-6px) rotate(-2deg); }
.line-1:hover .char:nth-child(10) { transform: translateY(-2px) rotate(4deg); }
.line-1:hover .char:nth-child(11) { transform: translateY(-5px) rotate(-3deg); }
.line-1:hover .char:nth-child(12) { transform: translateY(-3px) rotate(2deg); }
.line-1:hover .char:nth-child(13) { transform: translateY(-4px) rotate(-4deg); }

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}


.shake-trigger {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.3s ease;
}

.shake-trigger:active {
    animation: shake 0.3s ease; /* 点击时晃动 */
}

/* 21:9 银幕容器 */
.screen-container {
    width: 80%; /* 减小宽度，为顶部和底部按钮留出空间 */
    aspect-ratio: 21 / 9; /* 21:9 比例 */
    max-width: 1200px; /* 最大宽度 */
    background-color: rgba(24, 29, 37, 0.5); /* 半透明背景 */
    margin-bottom: 40px; /* 与文字的间距 */
    margin-top: 60px; /* 与顶部按钮的间距 */
    overflow: hidden;
    cursor: pointer; /* 鼠标悬停时显示手型 */
    position: relative; /* 为文字区定位做准备 */
}

/* 银幕图片 */
.screen-media {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例并覆盖整个容器 */
}

/* 图片介绍文字区 */
.image-caption {
    position: absolute;
    top: 5px;
    left: 5px;
    color: #fff;
    text-align: left;
    font-family: 'Anek Latin', sans-serif;
    border-radius: 1px;
    font-size: medium;
}

.caption-line-1 {
    margin: 0;
    color: #fff; /* 第一行白色 */
    line-height: 1.5; /* 缩小行距 */
}

.caption-line-2 {
    margin: 0;
    color: rgba(255, 255, 255, 0.8); /* 第二行稍浅 */
    line-height: 2; /* 缩小行距 */
}

.caption-line-3 {
    margin: 0;
    color: rgba(255, 255, 255, 0.6); /* 第三行更浅 */
}

/* 图片淡入淡出动画 */
.screen-media {
    opacity: 1;
    transition: opacity 1s ease;
}

.screen-media.fade-out {
    opacity: 0;
}

/* 银幕下方文字 */
.screen-text {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    text-transform: uppercase;
    text-align: center;
    color: #fff; /* 改为白色 */
    margin-top: 20px; /* 增加与银幕的间距 */
    margin-bottom: 80px; /* 恢复与底部联系方式的间距 */
    position: relative; /* 添加相对定位 */
    z-index: 5; /* 确保文字在适当的层级 */
}

.screen-text .line-1 {
    font-size: 1.5rem;
    margin-bottom: 5px; /* 恢复原始行间距 */
    line-height: 0.6; /* 恢复原始行高 */
}

.screen-text .line-2 {
    font-size: 2rem;
    margin-bottom: 5px; /* 恢复原始行间距 */
    line-height: 0.4; /* 恢复原始行高 */
}

.screen-text .line-3 {
    font-size: 1.5rem;
}

/* Cids Ho 链接样式 */
.cids-ho-link {
    color: inherit; /* 继承父元素颜色 */
    text-decoration: none; /* 去掉下划线 */
    transition: color 0.3s ease; /* 添加颜色过渡效果 */
}

.cids-ho-link:hover {
    color: #ffcc00; /* 鼠标悬停时改变颜色 */
}

/* The Selected Works 链接样式 */
.selected-works-link {
    color: inherit; /* 继承父元素颜色 */
    text-decoration: none; /* 去掉下划线 */
    transition: color 0.3s ease; /* 添加颜色过渡效果 */
}

.selected-works-link:hover {
    color: #ffcc00; /* 鼠标悬停时改变颜色 */
}

/*联系方式*/
.contact-section {
    position: fixed;
    bottom: 100px; /* 恢复原始位置 */
    left: 50%;
    right: auto;
    transform: translateX(-50%); /* 恢复水平居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 90%;
    max-width: 300px;
    z-index: 10; /* 提高z-index确保联系方式在最上层 */
    background-color: transparent; /* 保持背景透明 */
}

/* 联系方式内容 */
.contact-content {
    display: flex; /* 始终显示 */
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    opacity: 1;
    transform: none;
    position: static;
    background-color: transparent;
    padding: 0;
}

.icon-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
}

.icon-buttons .icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.icon-buttons .icon:hover {
    transform: scale(1.2);
}

.contact-info {
    color: #fff;
    font-family: 'Anek Latin', sans-serif;
    font-size: 14px; /* 恢复原来的字体大小 */
    text-align: center;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.1); /* 添加半透明背景 */
    padding: 10px;
    border-radius: 5px;
    width: 100%; /* 确保宽度一致 */
}

.contact-info p {
    margin: 5px 0;
    transition: color 0.3s ease;
}

.contact-info p:hover {
    color: #ffcc00;
}

/* 复制成功提示框 */
.copy-notification {
    position: fixed;
    bottom: 20px; /* 距离底部 20px */
    left: 50%; /* 水平居中 */
    transform: translateX(-50%); /* 确保居中 */
    background-color: rgba(0, 0, 0, 0.8); /* 半透明黑色背景 */
    color: #fff;
    padding: 0px 20px; /* 内边距 */
    border-radius: 5px; /* 圆角 */
    font-family: 'Anek Latin', sans-serif;
    font-size: 14px; /* 字体大小 */
    opacity: 0; /* 初始隐藏 */
    transition: opacity 0.3s ease; /* 淡入淡出效果 */
    pointer-events: none; /* 防止干扰点击 */
    white-space: nowrap; /* 防止文字换行 */
    z-index: 20; /* 确保提示框在最上层 */
}

.copy-notification.show {
    opacity: 1;
}

/* 重写响应式设计部分 */
/* 针对1080p分辨率的特定调整 */
@media (min-width: 1080px) and (max-width: 1920px) {
    .screen-container {
        width: 75%; /* 减小宽度，保持比例的同时减小整体大小 */
        max-width: 1000px; /* 限制最大宽度 */
        margin-top: 50px; /* 与顶部按钮的间距 */
    }
    
    .home-buttons {
        top: 30px; /* 调整顶部按钮位置，与银幕保持距离 */
    }
    
    .contact-section {
        bottom: 80px; /* 调整底部位置 */
    }
    
    .screen-text {
        margin-top: 15px; /* 调整文字与银幕的间距 */
        margin-bottom: 80px; /* 与底部联系方式的间距 */
    }
    
    .welcome-section {
        padding-top: 0; /* 移除顶部内边距 */
        padding-bottom: 0; /* 移除底部内边距 */
    }
}

/* 平板设备 */
@media (max-width: 1079px) {
    .screen-container {
        width: 85%;
        margin-top: 40px; /* 与顶部按钮的间距 */
    }
    
    .home-buttons {
        top: 20px;
    }
    
    .contact-section {
        bottom: 60px;
    }
    
    .screen-text .line-1 {
        font-size: 1.3rem; /* 适当缩小字号 */
    }
    
    .screen-text .line-2 {
        font-size: 1.8rem; /* 适当缩小字号 */
    }
    
    .screen-text .line-3 {
        font-size: 1.3rem; /* 适当缩小字号 */
    }
}

/* 手机设备 */
@media (max-width: 767px) {
    .screen-container {
        width: 90%;
        margin-top: 30px; /* 与顶部按钮的间距 */
    }
    
    .home-buttons {
        top: 15px;
    }
    
    .contact-section {
        bottom: 50px;
    }
    
    .screen-text .line-1 {
        font-size: 1.2rem; /* 在移动端缩小字号 */
        line-height: 0.8; /* 调整行高 */
    }
    
    .screen-text .line-2 {
        font-size: 1.6rem; /* 在移动端缩小字号 */
        line-height: 0.6; /* 调整行高 */
    }
    
    .screen-text .line-3 {
        font-size: 1.2rem; /* 在移动端缩小字号 */
    }
    
    .home-button {
        font-size: 1.2rem; /* 缩小按钮字号 */
    }
    
    .contact-info {
        font-size: 12px; /* 缩小联系方式字号 */
    }
    
    .icon-buttons .icon {
        width: 20px; /* 缩小图标 */
        height: 20px;
    }
}

/* 小型手机设备 */
@media (max-width: 480px) {
    .screen-container {
        aspect-ratio: 16 / 9; /* 在小屏幕上调整为 16:9 */
        margin-top: 25px; /* 与顶部按钮的间距 */
    }
    
    .home-buttons {
        top: 10px;
        gap: 10px; /* 减小按钮间距 */
    }
    
    .contact-section {
        bottom: 40px;
    }
    
    .screen-text .line-1 {
        font-size: 1rem; /* 在小型移动端进一步缩小字号 */
    }
    
    .screen-text .line-2 {
        font-size: 1.4rem; /* 在小型移动端进一步缩小字号 */
    }
    
    .screen-text .line-3 {
        font-size: 1rem; /* 在小型移动端进一步缩小字号 */
    }
    
    .home-button {
        font-size: 1.1rem; /* 进一步缩小按钮字号 */
    }
    
    .contact-info {
        font-size: 11px; /* 进一步缩小联系方式字号 */
    }
}

/* 极小屏幕设备 */
@media (max-width: 360px) {
    .screen-text .line-1 {
        font-size: 0.9rem; /* 在极小屏幕上进一步缩小字号 */
    }
    
    .screen-text .line-2 {
        font-size: 1.2rem; /* 在极小屏幕上进一步缩小字号 */
    }
    
    .screen-text .line-3 {
        font-size: 0.9rem; /* 在极小屏幕上进一步缩小字号 */
    }
    
    .home-button {
        font-size: 1rem; /* 在极小屏幕上进一步缩小按钮字号 */
    }
    
    .contact-info {
        font-size: 10px; /* 在极小屏幕上进一步缩小联系方式字号 */
    }
}

/* 为移动设备添加点击效果 */
@media (hover: none) and (pointer: coarse) {
    .home-button:active,
    .contact-info p:active {
        color: #ffcc00; /* 点击时改变颜色 */
    }
}

/* 移除不需要的媒体查询 */