:root {
    --primary: #00f3ff;
    --secondary: #ff00ff;
    --accent: #00ff88;
    --dark-1: #0a0a0f;
    --dark-2: #11111f;
    --dark-3: #1a1a2e;
    --light: #ffffff;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background: var(--dark-1);
    color: var(--light);
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 粒子背景 */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--dark-1) 0%, var(--dark-2) 50%, #1a237e 100%);
}

/* 导航栏 */
.navbar {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 5px 30px rgba(0, 243, 255, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px var(--primary);
    transition: all 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--primary);
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav {
    gap: 0.5rem;
}

.nav-link {
    color: var(--light) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary) !important;
    transform: translateY(-2px);
}

.nav-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem;
}

.toggler-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    position: relative;
    transition: all 0.3s ease;
}

.toggler-icon::before,
.toggler-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
}

.toggler-icon::before {
    top: -6px;
}

.toggler-icon::after {
    top: 6px;
}

/* 主内容区 */
.main-content {
    position: relative;
    z-index: 1;
}

/* 英雄区域 */
.hero-section {
    height: 40vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 243, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
    animation: glitch 5s infinite;
}

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

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 2rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

/* 项目区域 */
.projects-section {
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(10px);
    min-height: 60vh;
    padding: 4rem 0;
}

.category-section {
    margin-bottom: 5rem;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* 项目卡片 */
.project-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(15px);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.1), rgba(255, 0, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 
        0 20px 40px rgba(0, 243, 255, 0.3),
        0 0 80px rgba(0, 243, 255, 0.1);
}

.project-card:hover::before {
    opacity: 1;
}

.card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(10, 10, 15, 0.8));
}

.card-content {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.card-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(0, 243, 255, 0.2);
    transform: translateY(-2px);
}

.card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--dark-1);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 243, 255, 0.4);
    color: var(--dark-1);
}

.card-btn.outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.card-btn.outline:hover {
    background: var(--primary);
    color: var(--dark-1);
}

.card-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 页脚 */
.footer {
    background: rgba(5, 5, 8, 0.95);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0 2rem;
    backdrop-filter: blur(20px);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.footer-text h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.footer-text p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer-copyright {
    text-align: center;
    width: 100%;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .card-buttons {
        flex-direction: column;
    }
    
    .card-btn {
        justify-content: center;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--dark-2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
}