/* ==================== 基础设置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 霓虹赛博朋克配色 - 更鲜艳酷炫 */
    --neon-purple: #a855f7;
    --neon-blue: #3b82f6;
    --neon-pink: #f012be;
    --neon-cyan: #00f5ff;
    --neon-green: #00ff9f;
    --neon-orange: #ff6b35;
    --neon-yellow: #ffd60a;

    --primary: #a855f7;
    --secondary: #3b82f6;
    --accent: #f012be;
    --cyan: #00f5ff;

    --bg-dark: #0a0118;
    --bg-darker: #050008;
    --text-primary: #ffffff;
    --text-secondary: #c4b5fd;
    --glass-bg: rgba(20, 10, 40, 0.5);
    --glass-border: rgba(168, 85, 247, 0.4);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==================== 动态背景 ==================== */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-bg {
    position: absolute;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(240, 18, 190, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 90%, rgba(0, 245, 255, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 10% 90%, rgba(0, 255, 159, 0.2) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    filter: saturate(1.3);
}

@keyframes gradientShift {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-8%, -8%) rotate(8deg);
    }
    66% {
        transform: translate(8%, 8%) rotate(-8deg);
    }
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(168, 85, 247, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 25s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* ==================== 鼠标光晕 ==================== */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3), rgba(59, 130, 246, 0.2), transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
    filter: blur(20px);
}

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

/* ==================== 玻璃拟态卡片 - 苹果液态玻璃效果 ==================== */
.glass-card {
    background: linear-gradient(
        135deg,
        rgba(20, 10, 40, 0.4) 0%,
        rgba(30, 20, 50, 0.3) 100%
    );
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid transparent;
    background-clip: padding-box;
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 2px 8px rgba(168, 85, 247, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

/* 玻璃边框渐变效果 */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(168, 85, 247, 0.5) 0%,
        rgba(59, 130, 246, 0.3) 25%,
        rgba(240, 18, 190, 0.3) 50%,
        rgba(0, 245, 255, 0.4) 75%,
        rgba(168, 85, 247, 0.5) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.5s;
}

/* 顶部高光效果 */
.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 40%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    border-radius: 24px 24px 0 0;
    pointer-events: none;
    opacity: 0.6;
}

/* Hover 液态流动效果 */
.glass-card:hover {
    transform: translateY(-8px) scale(1.01);
    background: linear-gradient(
        135deg,
        rgba(30, 15, 50, 0.5) 0%,
        rgba(40, 25, 60, 0.4) 100%
    );
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.7),
        0 4px 16px rgba(168, 85, 247, 0.3),
        0 0 40px rgba(0, 245, 255, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.2),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

.glass-card:hover::before {
    opacity: 1;
    background: linear-gradient(
        135deg,
        rgba(168, 85, 247, 0.8) 0%,
        rgba(59, 130, 246, 0.6) 25%,
        rgba(240, 18, 190, 0.6) 50%,
        rgba(0, 245, 255, 0.7) 75%,
        rgba(168, 85, 247, 0.8) 100%
    );
    animation: borderFlow 3s linear infinite;
}

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

/* ==================== Hero 区域 ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.glitch {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    background: linear-gradient(135deg,
        var(--neon-purple) 0%,
        var(--neon-blue) 25%,
        var(--neon-pink) 50%,
        var(--neon-cyan) 75%,
        var(--neon-purple) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
    animation: titleGlow 3s ease-in-out infinite, gradientFlow 4s linear infinite;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.6));
}

@keyframes titleGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.8))
                drop-shadow(0 0 40px rgba(168, 85, 247, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(0, 245, 255, 0.8))
                drop-shadow(0 0 60px rgba(0, 245, 255, 0.4));
    }
}

@keyframes gradientFlow {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--neon-cyan);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 300;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

.description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.tag {
    padding: 0.6rem 1.8rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(59, 130, 246, 0.2));
    border: 2px solid var(--neon-purple);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s;
    cursor: default;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.tag:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(0, 245, 255, 0.3));
    border-color: var(--neon-cyan);
    transform: scale(1.1) translateY(-3px);
    box-shadow:
        0 0 30px rgba(168, 85, 247, 0.6),
        0 0 50px rgba(0, 245, 255, 0.4);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--neon-cyan);
    font-size: 0.9rem;
    animation: bounce 2s infinite;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.arrow {
    width: 3px;
    height: 30px;
    background: linear-gradient(to bottom, var(--neon-cyan), transparent);
    box-shadow: 0 0 10px var(--neon-cyan);
}

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

/* ==================== 通用区域样式 ==================== */
section {
    margin: 6rem 0;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.5));
}

.title-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.8));
}

/* ==================== 关于区域 ==================== */
.about {
    margin-top: 0;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 20px;
    background: linear-gradient(
        135deg,
        rgba(20, 10, 40, 0.3) 0%,
        rgba(30, 20, 50, 0.25) 100%
    );
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 100%
    );
    border-radius: 20px 20px 0 0;
    pointer-events: none;
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: var(--neon-cyan);
    background: linear-gradient(
        135deg,
        rgba(30, 15, 50, 0.4) 0%,
        rgba(40, 25, 60, 0.35) 100%
    );
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 245, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
    position: relative;
    z-index: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* ==================== 技术文章 ==================== */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.article-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.1), transparent);
    transition: left 0.5s;
}

.article-item:hover::before {
    left: 100%;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.article-date {
    color: var(--text-secondary);
}

.article-category {
    color: var(--neon-cyan);
    font-weight: 600;
    padding: 0.2rem 0.8rem;
    background: rgba(0, 245, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 245, 255, 0.3);
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.article-title {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.article-item:hover .article-title {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateX(10px);
}

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ==================== 底部 ==================== */
.footer {
    margin-top: 8rem;
    padding: 3rem 0;
    text-align: center;
    border-top: 2px solid var(--glass-border);
    box-shadow: 0 -1px 30px rgba(168, 85, 247, 0.2);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.icp a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
}

.icp a:hover {
    color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.1);
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.beian a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.beian a img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.beian a:hover {
    color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.1);
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

/* ==================== 动画 ==================== */
.fade-in {
    animation: fadeIn 1s ease-out;
}

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

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

    section {
        margin: 4rem 0;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .hero {
        min-height: 90vh;
    }

    .tech-tags {
        gap: 0.5rem;
    }

    .tag {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .scroll-indicator {
        bottom: 2rem;
    }

    .footer {
        margin-top: 4rem;
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

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

    .article-title {
        font-size: 1.2rem;
    }

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

/* ==================== 性能优化 ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
