* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 亮色主题变量 */
    --primary-color: #ffffff;
    --secondary-color: #f8f9fa;
    --text-color: #333333;
    --text-secondary: #666666;
    --accent-color: #f093fb;
    --icon-bg: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --border-radius: 12px;
    --hover-shadow: 0 10px 25px rgba(240, 147, 251, 0.25);
    --glow-color: rgba(240, 147, 251, 0.5);
    --transition-speed: 0.3s;
}

.dark-theme {
    /* 暗色主题变量 */
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --text-color: #f0f0f0;
    --text-secondary: #cccccc;
    --accent-color: #f5576c;
    --icon-bg: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    --hover-shadow: 0 10px 25px rgba(245, 87, 108, 0.25);
    --glow-color: rgba(245, 87, 108, 0.5);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    /* 添加背景动画 */
    animation: bgAnimation 10s ease infinite;
    min-height: 100vh;
    transition: background-color var(--transition-speed) ease;
    animation: bgAnimation 20s linear infinite;
}

/* 背景动画 */
@keyframes bgAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    /* 添加容器动画 */
    animation: containerAppear 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    opacity: 0;
}

/* 容器出现动画 */
@keyframes containerAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* 添加卡片悬浮效果 */
    transform: translateY(0);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.profile-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    /* 添加脉冲动画 */
    animation: pulse 2s infinite;
    position: relative;
    margin-bottom: 20px;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 头像脉冲动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 var(--glow-color);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(240, 147, 251, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(240, 147, 251, 0);
    }
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 添加图片滤镜效果 */
    filter: saturate(1.2) contrast(1.05);
    transition: filter var(--transition-speed) ease;
}

.avatar-img:hover {
    filter: saturate(1.4) contrast(1.1);
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    /* 添加文字阴影 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* 添加标题动画 */
    animation: titleGlow 3s ease-in-out infinite alternate;
    position: relative;
}

/* 标题发光动画 */
@keyframes titleGlow {
    0% {
        filter: brightness(1);
        text-shadow: 0 0 5px rgba(240, 147, 251, 0.3);
    }
    100% {
        filter: brightness(1.15);
        text-shadow: 0 0 15px rgba(245, 87, 108, 0.5);
    }
}

/* 分类导航 */
.categories {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.category {
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    animation: categorySlideIn 0.5s ease-out both;
}

.category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.category-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-color);
    position: relative;
    padding-left: 25px;
    /* 添加标题动画 */
    animation: slideInLeft 0.5s ease-out both;
    /* 添加渐变下划线效果 */
    padding-bottom: 10px;
}

.category-title::after {
    content: '';
    position: absolute;
    left: 25px;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #f093fb);
    border-radius: 3px;
    animation: lineWidth 1s ease-out both;
}

@keyframes lineWidth {
    0% {
        width: 0;
    }
    100% {
        width: 60px;
    }
}

/* 标题滑入动画 */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.category-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 25px;
    background: var(--icon-bg);
    border-radius: 5px;
    /* 添加装饰动画 */
    animation: barPulse 2s ease-in-out infinite;
}

/* 装饰条脉冲动画 */
@keyframes barPulse {
    0% {
        transform: translateY(-50%) scaleY(1);
    }
    50% {
        transform: translateY(-50%) scaleY(1.3);
    }
    100% {
        transform: translateY(-50%) scaleY(1);
    }
}

.links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 25px;
    margin-top: 10px;
    padding: 5px;
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
    /* 添加链接项动画 */
    animation: fadeInUp 0.4s ease-out both;
    position: relative;
    overflow: hidden;
    /* 添加边框效果 */
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    z-index: 1;
    /* 添加上边框装饰 */
    border-top: 3px solid var(--accent-color);
}

/* 链接项淡入动画 */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加弹性动画效果 */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* 为链接项添加弹性效果 */
.link-item {
    animation: bounceIn 0.6s ease-out both;
    /* 启用硬件加速 */
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.link-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
    /* 添加悬停背景效果 */
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.15) 0%, rgba(245, 87, 108, 0.15) 100%);
}

/* 添加悬停波纹效果 */
.link-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.link-item:active::before {
    width: 400px;
    height: 400px;
}

.icon-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    margin-bottom: 20px;
    /* 添加图标动画 */
    transition: all var(--transition-speed) ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    /* 添加内阴影效果 */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15), inset 0 0 15px rgba(255, 255, 255, 0.2);
}

.link-item:hover .icon-box {
    transform: scale(1.2) rotate(12deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.link-item span {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    /* 添加文字动画 */
    transition: all var(--transition-speed) ease;
    position: relative;
    /* 添加文字阴影 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.link-item:hover span {
    color: #f5576c;
    transform: translateY(-3px);
    /* 添加放大效果 */
    transform: translateY(-3px) scale(1.05);
}

/* 底部信息 */
footer {
    margin-top: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    /* 添加底部动画 */
    animation: fadeIn 0.8s ease-out both;
    padding: 20px;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    /* 添加链接动画 */
    transition: all var(--transition-speed) ease;
    position: relative;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
    /* 添加悬停效果 */
    color: #f093fb;
    text-shadow: 0 0 8px rgba(240, 147, 251, 0.5);
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .profile-container {
        padding: 25px 20px;
    }

    .avatar {
        width: 70px;
        height: 70px;
    }

    .logo h1 {
        font-size: 26px;
    }

    .links {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .link-item {
        padding: 20px 15px;
    }

    .icon-box {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .category {
        padding: 25px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .particles-container {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .profile-container {
        padding: 20px 15px;
    }

    .avatar {
        width: 60px;
        height: 60px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .links {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .link-item {
        padding: 20px 10px;
    }
    
    .icon-box {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .category-title {
        font-size: 19px;
    }
    
    .category {
        padding: 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category {
    animation: fadeIn 0.5s ease-out;
}

.category:nth-child(2) {
    animation-delay: 0.1s;
}

.category:nth-child(3) {
    animation-delay: 0.2s;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--icon-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    opacity: 0.9;
}

/* 添加粒子效果容器 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}