/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 移动端优化的全局样式 */
@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) fixed;
        background-size: 400% 400%;
        animation: gradientBG 10s ease infinite;
    }
    
    @keyframes gradientBG {
        0% {
            background-position: 0% 50%;
        }
        50% {
            background-position: 100% 50%;
        }
        100% {
            background-position: 0% 50%;
        }
    }
}

/* 毛玻璃效果容器 */
.glass-container {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 炫酷动画效果 */
.glass-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
    transition: all 0.3s ease;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* 移动端优化的毛玻璃效果 */
@media (max-width: 768px) {
    .glass-container {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 20px 0 rgba(31, 38, 135, 0.3);
    }
    
    .glass-container::before {
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    }
    
    /* 移除移动端的悬停效果 */
    .glass-container:hover {
        transform: none;
        box-shadow: 0 4px 20px 0 rgba(31, 38, 135, 0.3);
    }
}

@media (max-width: 480px) {
    .glass-container {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        background: rgba(255, 255, 255, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow: 0 2px 15px 0 rgba(31, 38, 135, 0.25);
    }
}

/* 头部导航 */
header {
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    animation: fadeInDown 1s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: block;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

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

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 移动端导航优化 */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        background: rgba(255, 255, 255, 0.2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    nav ul {
        flex-wrap: wrap;
        padding: 0 0.5rem;
    }
    
    nav ul li {
        margin: 0.3rem 0.5rem;
    }
    
    nav ul li a {
        padding: 0.5rem 1rem;
        font-size: 1.1rem;
        border-radius: 25px;
    }
}

@media (max-width: 480px) {
    header {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        background: rgba(255, 255, 255, 0.25);
        border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    }
    
    nav ul {
        padding: 0 0.3rem;
    }
    
    nav ul li {
        margin: 0.2rem 0.3rem;
    }
    
    nav ul li a {
        padding: 0.4rem 0.8rem;
        font-size: 1rem;
        border-radius: 20px;
    }
}

/* 主要内容区域 */
main {
    margin-top: 100px; /* 为固定导航留出空间 */
    padding: 2rem;
}

section {
    padding: 2rem;
    margin: 1rem auto;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transform: perspective(1000px) rotateX(0deg);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

section:hover {
    transform: perspective(1000px) rotateX(5deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

/* 英雄区域 */
#hero {
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #667eea, 0 0 20px #667eea;
    }
    to {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #764ba2, 0 0 40px #764ba2;
    }
}

#hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 项目区域 */
.project {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.project:hover::before {
    left: 100%;
}

.project:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.project h3 {
    margin-top: 0;
    color: #fff;
    position: relative;
}

.project h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.project:hover h3::after {
    width: 100%;
}

/* 联系方式 */
#contact a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#contact a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

#contact a:hover::before {
    left: 100%;
}

#contact a:hover {
    background: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 一些日常 */
#daily a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

#daily a:hover {
    background: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* APlayer样式调整 */
.aplayer {
    border-radius: 10px !important;
    margin: 20px !important;
    animation: slideInUp 0.5s ease;
}

.aplayer.aplayer-fixed {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 1000 !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 页脚 */
footer {
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: fadeIn 1s ease;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    nav ul li a {
        padding: 0.5rem 1rem;
        font-size: 1.1rem;
    }
    
    #hero h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1rem;
        margin-top: 80px;
    }
    
    section {
        padding: 1.5rem 1rem;
        margin: 0.8rem auto;
        max-width: 95%;
        border-radius: 20px;
    }
    
    #hero {
        padding: 2rem 1rem;
        border-radius: 20px;
    }
    
    .project {
        padding: 1.2rem 1rem;
        margin-bottom: 1rem;
        border-radius: 15px;
    }
    
    .aplayer.aplayer-fixed {
        width: 90% !important;
        left: 5% !important;
        right: 5% !important;
    }
    
    footer {
        padding: 1rem 0.5rem;
        font-size: 0.9rem;
    }
    
    #contact a, #daily a {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        margin: 0.3rem 0.5rem;
        border-radius: 25px;
    }
}

/* 针对小屏幕设备的额外优化 */
@media (max-width: 480px) {
    header {
        padding: 0.5rem 0;
    }
    
    nav ul li {
        margin: 0.3rem 0;
    }
    
    nav ul li a {
        padding: 0.4rem 0.8rem;
        font-size: 1rem;
        border-radius: 15px;
    }
    
    #hero h1 {
        font-size: 1.7rem;
    }
    
    #hero p {
        font-size: 1rem;
    }
    
    main {
        padding: 0.5rem;
        margin-top: 70px;
    }
    
    section {
        padding: 1.2rem 0.8rem;
        margin: 0.5rem auto;
        max-width: 98%;
        border-radius: 15px;
    }
    
    #hero {
        padding: 1.5rem 0.8rem;
        border-radius: 15px;
    }
    
    .project {
        padding: 1rem 0.8rem;
        margin-bottom: 0.8rem;
        border-radius: 12px;
    }
    
    .project h3 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .project p {
        font-size: 0.95rem;
    }
    
    #contact a, #daily a {
        display: block;
        margin: 0.3rem 0;
        text-align: center;
        padding: 0.6rem;
        font-size: 1rem;
        border-radius: 20px;
    }
    
    .aplayer.aplayer-fixed {
        width: 95% !important;
        left: 2.5% !important;
        right: 2.5% !important;
        bottom: 10px !important;
    }
    
    footer {
        padding: 0.8rem 0.3rem;
        font-size: 0.85rem;
    }
    
    footer p {
        margin: 0.3rem 0;
    }
}