/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 字体设置 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Roboto, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: #0f172a;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 动态背景粒子效果 - 改回紫色 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: backgroundPulse 8s ease-in-out infinite;
}

/* 添加漂浮粒子 - 改回紫色 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(196, 181, 253, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(196, 181, 253, 0.2), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(196, 181, 253, 0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* 广告区域样式 - 移到顶部 */
.ad-section {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(196, 181, 253, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ad-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 181, 253, 0.5), transparent);
    animation: adGlow 3s ease-in-out infinite;
}

.ad-title {
    font-size: 1rem;
    font-weight: 600;
    color: #c084fc;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(196, 181, 253, 0.3);
}

.ad-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.ad-link {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(196, 181, 253, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(196, 181, 253, 0.2);
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.ad-link:hover {
    background: rgba(196, 181, 253, 0.2);
    color: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 181, 253, 0.2);
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
    position: relative;
}

/* 添加标题光晕效果 - 改回紫色 */
.header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(196, 181, 253, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: titleGlow 6s ease-in-out infinite;
    z-index: -1;
}

.title {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Microsoft YaHei', system-ui, sans-serif;
    background: linear-gradient(135deg, #c084fc, #a855f7);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    line-height: 1.1;
    animation: subtleFlow 4s ease-in-out infinite;
    position: relative;
    filter: drop-shadow(0 0 20px rgba(196, 181, 253, 0.3));
}

.subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    font-weight: 400;
    opacity: 0.8;
    animation: subtitlePulse 4s ease-in-out infinite;
}

/* 主要内容区域 */
.main {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
    flex: 1;
}

/* 分类卡片样式 - 移除流动边框特效 */
.category-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* 发光效果 - 改回紫色 */
.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 181, 253, 0.3), transparent);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(196, 181, 253, 0.2);
    filter: brightness(1.1);
}

/* 分类头部 */
.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.category-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    display: inline-block;
    transition: all 0.3s ease;
    color: #c084fc;
    animation: iconFloat 3s ease-in-out infinite;
}

.category-card:hover .category-icon {
    transform: scale(1.2) rotate(360deg);
    filter: drop-shadow(0 0 10px #c084fc);
}

.category-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0;
    position: relative;
}

/* 链接网格 */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

/* 导航链接样式 */
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(51, 65, 85, 0.6);
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(148, 163, 184, 0.1);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

/* 简化扫光效果 - 改回紫色 */
.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(196, 181, 253, 0.2), 
        transparent
    );
    transition: left 0.6s ease;
}

.nav-link:hover::before {
    left: 100%;
}

/* 波纹效果 - 改回紫色 */
.nav-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(196, 181, 253, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.nav-link:hover::after {
    width: 300px;
    height: 300px;
}

.nav-link:hover {
    background: rgba(196, 181, 253, 0.15);
    color: #f1f5f9;
    transform: translateY(-2px);
    border-color: rgba(196, 181, 253, 0.4);
    box-shadow: 
        0 8px 25px rgba(196, 181, 253, 0.2),
        0 0 20px rgba(196, 181, 253, 0.1);
    filter: brightness(1.2);
}

/* 图标样式 */
.link-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
    display: inline-block;
    transition: all 0.3s ease;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

/* 网站favicon图标样式 */
.site-favicon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.nav-link:hover .link-icon,
.nav-link:hover .site-favicon {
    transform: scale(1.2) rotate(5deg);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(196, 181, 253, 0.5));
}

/* 底部样式 */
.footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    margin-top: auto;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 181, 253, 0.5), transparent);
    animation: footerGlow 4s ease-in-out infinite;
}

.footer p {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 400;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }
    
    .title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .links-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .ad-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ad-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .category-card {
        padding: 1.25rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c084fc, #a855f7);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a855f7, #c084fc);
}

/* 自定义动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes backgroundPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
    }
}

@keyframes particleFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100vh) rotate(360deg); }
}

@keyframes subtleFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes titleGlow {
    0%, 100% { 
        opacity: 0.3; 
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.6; 
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes subtitlePulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

@keyframes footerGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes adGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.category-card {
    animation: fadeInUp 0.8s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        color: #e5e7eb;
    }
    
    body::before {
        background: 
            radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(196, 181, 253, 0.08) 0%, transparent 50%);
    }
    
    .title {
        background: linear-gradient(135deg, #c084fc, #a855f7);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .subtitle {
        color: #9ca3af;
    }
    
    .category-card {
        background: rgba(31, 41, 55, 0.8);
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .category-card:hover {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(196, 181, 253, 0.3);
    }
    
    .category-title {
        color: #f9fafb;
    }
    
    .category-header {
        border-bottom-color: rgba(75, 85, 99, 0.3);
    }
    
    .nav-link {
        background: rgba(17, 24, 39, 0.6);
        color: #d1d5db;
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .nav-link:hover {
        background: rgba(196, 181, 253, 0.15);
        color: #f9fafb;
    }
    
    .ad-section {
        background: rgba(31, 41, 55, 0.9);
        border-color: rgba(196, 181, 253, 0.3);
    }
    
    .ad-link {
        color: #d1d5db;
        background: rgba(196, 181, 253, 0.15);
        border-color: rgba(196, 181, 253, 0.3);
    }
    
    .ad-link:hover {
        background: rgba(196, 181, 253, 0.25);
        color: #f9fafb;
    }
    
    .footer {
        border-top-color: rgba(75, 85, 99, 0.3);
    }
    
    .footer p {
        color: #6b7280;
    }
}

/* 减少动画效果 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 