/* ===== 首页特有样式 ===== */
/* 本文件包含首页独有的样式定义，用于增强首页的视觉效果和交互体验 */
/* 注意：这里只添加首页特有的样式，不覆盖style.css中的基础样式 */

/* ===== 首页导航栏样式增强 ===== */
/* 在基础导航栏样式基础上添加首页特有的交互效果 */

/* 首页导航栏容器特有样式 - 保持原有样式，预留扩展空间 */
.navbar .container {
    /* 保持原有样式，只添加特殊效果 */
    /* 可在此添加首页导航栏的特殊样式 */
}

/* 首页导航链接图标悬停特效 - 图标向上浮动效果 */
.nav-link:hover i {
    transform: translateY(-2px); /* 悬停时图标向上移动2px */
}

/* 首页导航菜单按钮动画特效 - 汉堡菜单的过渡动画 */
.nav-toggle span {
    transition: all 0.3s ease; /* 所有属性0.3秒缓动过渡 */
}

/* ===== 首页滚动进度条样式 ===== */
/* 显示页面滚动进度的可视化指示器 */
.index-scroll-progress {
    position: fixed; /* 固定定位，始终显示在页面顶部 */
    top: 80px; /* 位于导航栏下方 */
    left: 0; /* 从页面左侧开始 */
    width: 0%; /* 初始宽度为0，通过JavaScript动态更新 */
    height: 4px; /* 进度条高度 */
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4); /* 彩色渐变背景 */
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3); /* 红色阴影效果 */
    border-radius: 0 2px 2px 0; /* 右侧圆角 */
    z-index: 999; /* 高层级，确保显示在其他元素之上 */
    transition: width 0.3s ease; /* 宽度变化的平滑过渡 */
}

/* ===== 首页英雄区域样式增强 ===== */
/* 首页主要展示区域的样式定义，包含动画效果 */

/* 英雄区域容器样式 */
.hero-section {
    position: relative; /* 相对定位，为内部绝对定位元素提供基准 */
    min-height: calc(100vh - 80px); /* 最小高度减去导航栏高度 */
    max-height: calc(100vh - 80px); /* 最大高度限制，防止超出视口 */
    display: flex;
    align-items: center;
    padding: 20px 0; /* 减少上下内边距避免溢出 */
    overflow: hidden; /* 隐藏溢出内容，确保动画效果不影响布局 */
    box-sizing: border-box; /* 确保padding包含在高度内 */
}

/* 英雄区域主标题样式 */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem); /* 响应式字体大小 */
    font-weight: 800; /* 超粗字体权重 */
    margin-bottom: 1.5rem; /* 底部外边距 */
    opacity: 0; /* 初始透明，用于动画效果 */
    transform: translateY(30px); /* 初始向下偏移30px */
    transition: all 0.8s ease; /* 所有属性0.8秒缓动过渡 */
}

/* 英雄区域主标题动画激活状态 */
.hero-title.animate {
    opacity: 1; /* 完全不透明 */
    transform: translateY(0); /* 回到原始位置 */
}

/* 英雄区域副标题样式 */
.hero-subtitle {
    font-size: clamp(1.1rem, 2.8vw, 1.8rem); /* 响应式字体大小 */
    font-weight: 400; /* 正常字体权重 */
    margin-bottom: 2rem; /* 底部外边距 */
    opacity: 0; /* 初始透明，用于动画效果 */
    transform: translateY(30px); /* 初始向下偏移30px */
    transition: all 0.8s ease; /* 所有属性0.8秒缓动过渡 */
    transition-delay: 0.2s; /* 延迟0.2秒开始动画，形成序列效果 */
}

/* 英雄区域副标题动画激活状态 */
.hero-subtitle.animate {
    opacity: 1; /* 完全不透明 */
    transform: translateY(0); /* 回到原始位置 */
}

/* 英雄区域按钮样式 */
.hero-btn {
    opacity: 0; /* 初始透明，用于动画效果 */
    transform: translateY(20px); /* 初始向下偏移20px */
    transition: all 0.6s ease; /* 所有属性0.6秒缓动过渡 */
}

/* 英雄区域按钮动画激活状态 */
.hero-btn.animate {
    opacity: 1; /* 完全不透明 */
    transform: translateY(0); /* 回到原始位置 */
}

/* ===== 首页爱好卡片样式增强 ===== */
/* 在基础爱好卡片样式基础上添加首页特有的交互效果 */

/* 爱好卡片基础样式保持 - 预留扩展空间 */
.hobbies-section .hobby-card {
    /* 保持原有样式，只添加特殊的交互效果 */
    /* 可在此添加首页爱好卡片的特殊样式 */
}

/* 爱好卡片悬停效果增强 - 更明显的浮动和缩放效果 */
.hobbies-section .hobby-card:hover {
    /* 增强悬停效果：向上移动10px并轻微放大 */
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.3);
}

/* 英雄区域容器 - 左右两栏布局 */
.hero-container {
    display: flex;
    align-items: flex-start;
    gap: clamp(2rem, 8vw, 6rem);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* 左侧欢迎板块 */
.hero-welcome {
    flex: 1; /* 增加左侧宽度 */
    text-align: center;
    padding-right: clamp(1rem, 3vw, 2rem);
}

/* 右侧声明板块 */
.hero-disclaimer {
    flex: 1; /* 调整右侧宽度为等宽 */
    text-align: left;
    padding-left: clamp(1rem, 3vw, 2rem);
    /* 添加华丽的入场动画 */
    opacity: 0;
    transform: translateX(50px) scale(0.9);
    animation: disclaimerSlideIn 1.2s ease-out 1.5s forwards;
}

.disclaimer-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
    /* 标题特殊动画效果 */
    opacity: 0;
    transform: translateY(-30px) rotateX(90deg);
    animation: titleFlipIn 1s ease-out 1.8s forwards;
    position: relative;
    overflow: hidden;
}

/* 标题发光效果 */
.disclaimer-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.3), transparent);
    animation: titleShine 3s ease-in-out 2.5s infinite;
}

.disclaimer-text {
    text-align: left;
}

.disclaimer-text p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    /* 每个段落的华丽动画 */
    opacity: 0;
    transform: translateX(30px) rotateY(45deg);
    animation: paragraphSlideIn 0.8s ease-out forwards;
    transform-origin: left center;
}

/* 为每个段落设置不同的动画延迟 */
.disclaimer-text p:nth-child(1) {
    animation-delay: 2.2s;
    transform: translateX(30px) rotateY(45deg) scale(0.8);
}

.disclaimer-text p:nth-child(2) {
    animation-delay: 2.4s;
    transform: translateX(40px) rotateY(60deg) scale(0.8);
}

.disclaimer-text p:nth-child(3) {
    animation-delay: 2.6s;
    transform: translateX(35px) rotateY(30deg) scale(0.8);
}

.disclaimer-text p:nth-child(4) {
    animation-delay: 2.8s;
    transform: translateX(45px) rotateY(75deg) scale(0.8);
}

.disclaimer-text p:nth-child(5) {
    animation-delay: 3.0s;
    transform: translateX(25px) rotateY(15deg) scale(0.8);
}

.disclaimer-text p:last-child {
    margin-bottom: 0;
}

.disclaimer-text strong {
    color: var(--primary-color);
    font-weight: 600;
    /* 强调文字的特殊效果 */
    position: relative;
    display: inline-block;
    animation: strongPulse 2s ease-in-out infinite;
}

/* 强调文字发光效果 */
.disclaimer-text strong::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    border-radius: 3px;
    z-index: -1;
    animation: strongGlow 3s ease-in-out infinite;
}

/* ===== 响应式设计 ===== */
/* 针对不同屏幕尺寸优化首页布局和交互效果 */

/* 平板设备样式调整 (最大宽度992px) */
@media (max-width: 992px) {
    /* 导航栏容器内边距调整 */
    .navbar .container {
        padding: 0 1rem; /* 减少左右内边距，适应较小屏幕 */
    }
    
    /* 移动端导航菜单样式 - 全屏形式 */
    .nav-menu {
        position: fixed; /* 固定定位，覆盖在页面内容之上 */
        top: 80px; /* 位于导航栏下方 */
        left: -100%; /* 初始位置在屏幕左侧外 */
        width: 100%; /* 全屏宽度 */
        height: calc(100vh - 80px); /* 高度为视窗高度减去导航栏高度 */
        background: rgba(255, 255, 255, 0.98); /* 半透明白色背景 */
        backdrop-filter: blur(20px); /* 背景模糊效果 */
        flex-direction: column; /* 垂直排列菜单项 */
        justify-content: flex-start; /* 从顶部开始排列 */
        align-items: center; /* 居中对齐 */
        padding: 2rem 0; /* 上下内边距 */
        transition: left 0.3s ease; /* 左侧位置的平滑过渡 */
        z-index: 999; /* 高层级，确保显示在其他元素之上 */
        border-radius: 0; /* 移除圆角 */
        box-shadow: none; /* 移除阴影 */
        border: none; /* 移除边框 */
    }
    
    /* 导航菜单激活状态 - 滑入效果 */
    .nav-menu.active {
        left: 0; /* 滑入到屏幕内 */
        display: flex; /* 确保显示为弹性布局 */
    }
    
    /* 导航菜单项间距调整 */
    .nav-menu li {
        margin: 0.8rem 0; /* 上下外边距，与其他页面保持一致 */
    }
    
    /* 导航链接样式调整 */
    .nav-link {
        width: 90%; /* 增加到90%宽度，给文字更多空间 */
        justify-content: flex-start; /* 左对齐，图标和文字在一行 */
        padding: 0.8rem 1.5rem; /* 适中的内边距 */
        margin-bottom: 0.8rem; /* 链接之间的间距 */
        font-size: 0.9rem; /* 适合手机屏幕的字体 */
        text-align: left; /* 文本左对齐 */
        gap: 0.5rem; /* 图标和文字之间的间距 */
        min-width: 200px; /* 最小宽度 - 确保按钮有足够宽度 */
    }
    
    /* 显示汉堡菜单按钮 */
    .nav-toggle {
        display: flex; /* 显示菜单切换按钮 */
    }
    
    /* 汉堡菜单激活状态动画 - 第一条线旋转 */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px); /* 旋转45度并移动位置 */
    }
    
    /* 汉堡菜单激活状态动画 - 第二条线隐藏 */
    .nav-toggle.active span:nth-child(2) {
        opacity: 0; /* 中间线条透明 */
    }
    
    /* 汉堡菜单激活状态动画 - 第三条线旋转 */
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px); /* 旋转-45度并移动位置 */
    }
    
    /* 英雄区域标题在平板设备上保持响应式 */
    .hero-title {
        /* 使用clamp保持响应式，无需固定值 */
    }
    
    /* 英雄区域副标题在平板设备上保持响应式 */
    .hero-subtitle {
        /* 使用clamp保持响应式，无需固定值 */
    }
}

/* 手机设备样式调整 (最大宽度576px) */
@media (max-width: 576px) {
    /* 导航栏高度调整 */
    .navbar {
        height: 70px; /* 从80px减小到70px，节省屏幕空间 */
    }
    
    /* 导航菜单全屏显示 */
    .nav-menu {
        top: 70px; /* 适应新的导航栏高度 */
        width: 100%; /* 全屏宽度 */
        max-width: none; /* 移除最大宽度限制 */
        height: calc(100vh - 70px); /* 适应新的导航栏高度 */
    }
    
    /* 滚动进度条位置调整 */
    .index-scroll-progress {
        top: 70px; /* 适应新的导航栏高度 */
    }
    
    /* 英雄区域内边距调整 */
    .hero-section {
        min-height: calc(100vh - 70px); /* 最小高度适应手机设备导航栏高度 */
        max-height: calc(100vh - 70px); /* 最大高度限制，防止超出视口 */
        padding: 10px 0; /* 进一步减少上下内边距避免溢出 */
        box-sizing: border-box; /* 确保padding包含在高度内 */
    }
    
    /* 英雄区域主标题在手机设备上保持响应式 */
    .hero-title {
        /* 使用clamp保持响应式，无需固定值 */
    }
    
    /* 英雄区域副标题在手机设备上保持响应式 */
    .hero-subtitle {
        /* 使用clamp保持响应式，无需固定值 */
    }
    
    /* 英雄区域容器在小屏幕上垂直堆叠 */
    .hero-container {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-lg);
        padding: 0 var(--spacing-md);
    }
    
    /* 左右板块在小屏幕上移除额外内边距并居中对齐 */
    .hero-welcome,
    .hero-disclaimer {
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }
    
    /* 声明标题在手机设备上保持响应式 */
    .disclaimer-title {
        /* 使用clamp保持响应式，无需固定值 */
    }
}

/* ===== 声明板块华丽动画关键帧 ===== */

/* 声明板块整体滑入动画 */
@keyframes disclaimerSlideIn {
    0% {
        opacity: 0;
        transform: translateX(50px) scale(0.9) rotateY(15deg);
    }
    50% {
        opacity: 0.7;
        transform: translateX(10px) scale(0.95) rotateY(5deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1) rotateY(0deg);
    }
}

/* 标题3D翻转入场动画 */
@keyframes titleFlipIn {
    0% {
        opacity: 0;
        transform: translateY(-30px) rotateX(90deg) scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-5px) rotateX(45deg) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) scale(1);
    }
}

/* 标题发光扫过效果 */
@keyframes titleShine {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        left: 0%;
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* 段落3D滑入动画 */
@keyframes paragraphSlideIn {
    0% {
        opacity: 0;
        transform: translateX(30px) rotateY(45deg) scale(0.8);
    }
    60% {
        opacity: 0.8;
        transform: translateX(5px) rotateY(10deg) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotateY(0deg) scale(1);
    }
}

/* 强调文字脉冲动画 */
@keyframes strongPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(255, 107, 157, 0.3);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 15px rgba(255, 107, 157, 0.6), 0 0 25px rgba(255, 107, 157, 0.4);
    }
}

/* 强调文字发光背景动画 */
@keyframes strongGlow {
    0%, 100% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.2;
        transform: scale(1.1);
    }
}

/* ===== 重要警告样式 ===== */

/* 重要警告段落样式 */
.important-warning {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(255, 149, 0, 0.1));
    border: 2px solid #ff3b30;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
    animation: warningPulse 2s ease-in-out infinite, warningShake 0.5s ease-in-out 3s;
    box-shadow: 0 4px 20px rgba(255, 59, 48, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* 警告图标样式 */
.warning-icon {
    font-size: 1.2em;
    margin-right: 0.5rem;
    animation: iconBounce 1s ease-in-out infinite;
    display: inline-block;
    filter: drop-shadow(0 0 5px rgba(255, 149, 0, 0.8));
}

/* 高亮文本样式 */
.highlight-text {
    color: #ff3b30;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 59, 48, 0.5);
    animation: textGlow 3s ease-in-out infinite;
    background: linear-gradient(45deg, #ff3b30, #ff9500, #ff3b30);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 3s ease-in-out infinite, gradientShift 4s ease-in-out infinite;
}

/* 重要警告脉冲动画 */
@keyframes warningPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 59, 48, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
        border-color: #ff3b30;
    }
    50% {
        box-shadow: 0 6px 30px rgba(255, 59, 48, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
        border-color: #ff9500;
    }
}

/* 警告轻微摇摆动画 */
@keyframes warningShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* 图标弹跳动画 */
@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.1);
    }
}

/* 文字发光动画 */
@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 59, 48, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 59, 48, 0.8), 0 0 30px rgba(255, 149, 0, 0.6);
    }
}

/* 渐变色彩移动动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .important-warning {
        padding: 0.8rem 1rem;
        margin: 0.8rem 0;
        border-radius: 8px;
    }
    
    .warning-icon {
        font-size: 1.1em;
        margin-right: 0.3rem;
    }
    
    .highlight-text {
        font-size: 0.95em;
    }
}