/* ========================================
   基础样式与变量
======================================== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --bg-dark: #0f0f23;
    --bg-card: rgba(30, 30, 60, 0.6);
    --bg-card-hover: rgba(40, 40, 80, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: rgba(99, 102, 241, 0.3);
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #f472b6 0%, #6366f1 100%);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========================================
   粒子背景
======================================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ========================================
   导航栏
======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.nav-brand:hover {
    transform: scale(1.05);
}

.logo {
    font-size: 1.8rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}


/* ========================================
   Hero区域
======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-1);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
}

/* ========================================
   通用区域样式
======================================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title .icon {
    font-size: 1.5rem;
}

/* ========================================
   公告区域
======================================== */
.announcements {
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.announcement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.announcement-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateX(10px);
}

.announcement-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.announcement-badge {
    padding: 0.25rem 0.75rem;
    background: var(--gradient-2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.announcement-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.announcement-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.announcement-content {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.announcement-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.announcement-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.announcement-link:hover {
    color: var(--accent-light);
}

/* ========================================
   工具列表区域
======================================== */
.tools-section {
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.tool-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-brief {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-more {
    gap: 1rem;
}


/* ========================================
   详情页
======================================== */
.hidden {
    display: none !important;
}

/* ========================================
   交流群区域
======================================== */
.community-section {
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.community-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-2);
}

.community-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.community-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.community-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.community-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.community-qrcode {
    max-width: 200px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.community-qrcode:hover {
    transform: scale(1.05);
}

.community-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-2);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.community-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(244, 114, 182, 0.4);
}

.detail-container {
    min-height: 100vh;
    padding: 6rem 2rem 4rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.back-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateX(-5px);
}

.detail-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-icon {
    font-size: 4rem;
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    white-space: pre-line;
}

.detail-image {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--gradient-1);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.detail-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
}

/* ========================================
   页脚
======================================== */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

/* ========================================
   响应式设计
======================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-content {
        padding: 1.5rem;
    }
    
    .detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .detail-title {
        font-size: 1.8rem;
    }
}

/* ========================================
   滚动条美化
======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}
