/* styles.css */
:root {
    --primary-color: #ff6b9f;
    --secondary-color: #6b9fff;
    --text-color: #333;
    --neon-pink: #ff2d75;
    --neon-blue: #00f2ff;
}

body {
    font-family: 'DotGothic16', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('bkg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    height: 100%;
    position: relative;
    overflow-x: hidden;
}


header {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 15px 0;
    text-align: center;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline;
    margin: 0 20px;
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    padding: 5px 10px;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    color: var(--neon-pink);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--neon-pink);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a.active {
    color: var(--neon-pink);
    text-shadow: 0 0 5px rgba(255, 45, 117, 0.5);
}

.section {
    padding: 60px 20px;
    text-align: center;
    position: relative;
}

.content-box {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 50px;
    margin: 20px auto;
    max-width: 650px;
    color: var(--text-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    height: 50vh; /* 卡片内容占屏幕的1/2 */
}


.content-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue));
    z-index: -1;
    border-radius: 16px;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0% { filter: blur(5px); opacity: 0.7; }
    50% { filter: blur(8px); opacity: 0.4; }
    100% { filter: blur(5px); opacity: 0.7; }
}

h1 {
    color: var(--primary-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.avatar {
    margin: 20px auto;
    width: 180px;
    height: 180px;
    overflow: hidden;
    border-radius: 50%;
    border: 5px solid rgba(255, 105, 180, 0.8);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.avatar:hover .avatar-img {
    transform: scale(1.1);
}

/* 项目容器样式，保持水平布局 */
.projects-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* 联系方式容器样式，改为垂直布局 */
.contact-container {
    display: flex;
    flex-direction: column; /* 改为垂直布局 */
    align-items: center; /* 垂直居中对齐 */
    gap: 10px; /* 调整间距 */
    margin: 30px 0;
}


.neon-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: none;
    font-family: 'DotGothic16', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.neon-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.neon-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 30px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.neon-btn:hover::before {
    opacity: 0.5;
}

.highlight {
    font-weight: bold;
}

footer {
    background-color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 5px 0; /* 减小padding */
    position: fixed;
    width: 100%;
    bottom: 0;
    color: var(--primary-color);
    backdrop-filter: blur(5px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    height: 30px; /* 固定高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
}


#fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: var(--neon-pink);
    text-decoration: none;
    cursor: pointer;
    transform: rotate(90deg);
}

/* 樱花飘落效果 */
.sakura-falling {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image: url('https://img.icons8.com/ios-filled/50/ff6b9f/cherry-blossom.png');
    background-repeat: repeat;
    animation: sakuraFalling 20s linear infinite;
    opacity: 0.3;
}

.sakura-falling.right {
    animation: sakuraFallingRight 25s linear infinite;
    animation-delay: 5s;
}

@keyframes sakuraFalling {
    0% { background-position: 0 0; }
    100% { background-position: 1000px 1000px; }
}

@keyframes sakuraFallingRight {
    0% { background-position: 1000px 0; }
    100% { background-position: 0 1000px; }
}

@media (max-width: 768px) {
    nav ul li {
        margin: 0 10px;
    }
    
    .content-box {
        padding: 20px;
        margin: 20px 15px;
    }
    
    .projects-container, .contact-container {
        flex-direction: column;
        gap: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}


/* 为main添加底部padding */
main {
    padding-bottom: 60px; /* 确保内容不被footer遮挡 */
}

/* 调整contact部分间距 */
#contact {
    padding-bottom: 40px;
}

/* 游戏预览部分 */
.clickable-section {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.clickable-section:hover {
    transform: translateY(-5px);
}

.game-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-icon {
    font-size: 5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* 游戏弹窗样式 */
.game-screenshot {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.game-img {
    width: 100%;
    height: auto;
}

.game-info {
    text-align: center;
}

.game-features {
    text-align: left;
    margin: 20px 0;
}

.game-features ul {
    list-style-type: none;
    padding: 0;
}

.game-features li {
    padding: 8px 0;
    position: relative;
    padding-left: 30px;
}

.game-features li::before {
    content: "🕹️";
    position: absolute;
    left: 0;
}

/* 进度条样式 */
.game-progress {
    margin: 25px 0 40px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue));
    border-radius: 10px;
    transition: width 1s ease;
}

/* thanks 容器样式 */
.thanks {
    margin-top: 20px; /* 增大与上方元素的间距 */
    border: 1px solid rgba(255, 255, 255, 0.5); /* 调整边框颜色和透明度 */
    padding: 10px; /* 增大内边距 */
    width: 90%; /* 宽度改为 100%，使其自适应 */
    max-width: 600px; /* 设置最大宽度，防止在大屏幕上过于宽 */
    margin: 0 auto; /* 保持水平居中 */
    border-radius: 10px; /* 保持圆角 */
    background-color: rgba(255, 255, 255, 0.1); /* 调整背景颜色和透明度 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
    display: flex;
    flex-direction: column; /* 默认为垂直布局 */
    align-items: center; /* 确保内部内容居中 */
    gap: 10px; /* 增加内部元素的间距 */
}

.thanks h3 {
    margin-top: 0; /* 去掉标题默认的上外边距 */
    margin-bottom: 10px; /* 增大标题下方的间距 */
    color: var(--primary-color); /* 使用主题颜色 */
    font-family: 'Press Start 2P', cursive; /* 使用与标题一致的字体 */
    text-align: center; /* 让标题文字居中 */
    font-size: 1.2rem; /* 增大字体大小 */
    width: 100%; /* 确保标题宽度与容器一致 */
}

.thanks ul {
    list-style: none; /* 去掉列表默认的项目符号 */
    padding: 0; /* 去掉列表默认的内边距 */
    display: flex; /* 使用flex布局实现水平排列 */
    flex-direction: column; /* 默认为垂直布局 */
    justify-content: center; /* 子元素在容器中居中排列 */
    flex-wrap: wrap; /* 允许换行，防止在小屏幕上溢出 */
    gap: 10px; /* 添加间距 */
    width: 100%; /* 确保列表宽度与容器一致 */
}

.thanks ul li {
    font-size: 1rem; /* 调整字体大小 */
    color: var(--text-color); /* 使用主题文字颜色 */
    font-weight: bold; /* 加粗字体 */
    text-align: center; /* 文字居中 */
    padding: 5px; /* 添加内边距 */
    white-space: nowrap; /* 防止文字换行 */
    overflow: hidden; /* 隐藏溢出部分 */
    text-overflow: ellipsis; /* 显示省略号 */
}

/* 媒体查询：当屏幕宽度大于768px时，列表项改为水平布局 */
@media (min-width: 768px) {
    .thanks ul {
        flex-direction: row; /* 改为水平布局 */
    }
}
