/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    background: #0a0a1f;
    line-height: 1.6;
}

/* Vanta.js背景容器 */
#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ==================== 头部区域 ==================== */
.hero {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 60px;
}

/* 头像样式 */
.avatar-wrapper {
    display: inline-block;
    margin-bottom: 30px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

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

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid transparent;
    background: linear-gradient(#0a0a1f, #0a0a1f) padding-box,
                linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff) border-box;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.5),
                0 0 60px rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(255, 0, 255, 0.8),
                0 0 80px rgba(0, 255, 255, 0.5);
}

/* 故障效果标题 */
.glitch-title {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite, glitch 1s infinite;
    position: relative;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-title::before {
    animation: glitch-1 0.5s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    -webkit-text-fill-color: rgba(255, 0, 255, 0.8);
}

.glitch-title::after {
    animation: glitch-2 0.5s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    -webkit-text-fill-color: rgba(0, 255, 255, 0.8);
}

@keyframes glitch-1 {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

@keyframes glitch-2 {
    0% { transform: translate(0); }
    20% { transform: translate(3px, -3px); }
    40% { transform: translate(3px, 3px); }
    60% { transform: translate(-3px, -3px); }
    80% { transform: translate(-3px, 3px); }
    100% { transform: translate(0); }
}

/* 副标题 */
.subtitle {
    font-size: 1.5rem;
    color: #a0a0ff;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(160, 160, 255, 0.5);
}

/* 联系信息 */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.contact-item {
    font-size: 1.1rem;
    color: #d0d0ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-item .icon {
    font-size: 1.3rem;
}

.contact-item a {
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    color: #ff00ff;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
}

/* ==================== 章节标题 ==================== */
.section {
    margin-bottom: 80px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.gradient-text {
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

/* ==================== 视频网格 ==================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.video-card {
    position: relative;
    padding-top: 56.25%; /* 16:9宽高比 */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(255, 0, 255, 0.3);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.video-card iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(255, 0, 255, 0.5),
                0 0 30px rgba(0, 255, 255, 0.3);
}

/* ==================== 游戏/应用卡片网格 ==================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.game-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.game-card:hover .card-glow {
    opacity: 1;
    animation: rotate-glow 2s linear infinite;
}

@keyframes rotate-glow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.game-card:hover {
    transform: translateY(-15px) scale(1.05);
    border-color: rgba(255, 0, 255, 0.5);
    box-shadow: 0 20px 60px rgba(255, 0, 255, 0.6),
                0 0 40px rgba(0, 255, 255, 0.4),
                inset 0 0 20px rgba(255, 0, 255, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    transition: all 0.3s ease;
}

.game-card:hover .card-icon {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(255, 0, 255, 0.8));
}

.game-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.game-card p {
    color: #c0c0ff;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

/* ==================== 页脚 ==================== */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    color: #a0a0ff;
    font-size: 1rem;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .glitch-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 15px;
    }

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

    .video-grid {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        padding: 20px 15px;
    }

    .hero {
        padding: 40px 15px;
    }
}

@media (max-width: 480px) {
    .glitch-title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .contact-item {
        font-size: 0.95rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .game-card {
        padding: 20px;
    }

    .card-icon {
        font-size: 2.5rem;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 10, 31, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff00ff, #00ffff);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ffff, #ff00ff);
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 1s ease-out;
}