/* ---------- 全局重置 & 基础变量 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0c10;
    --bg-card: rgba(20, 24, 32, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary-glow: #5f7ef2;
    --accent: #8b5cf6;
    --text-light: #f1f5f9;
    --text-dim: #a0aec0;
    --transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

body {
    background-color: var(--bg-dark);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: var(--text-light);
    line-height: 1.5;
    overflow-x: hidden;
}

/* 动态渐变背景 (增加层次感) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(80, 70, 200, 0.15), transparent 60%),
                radial-gradient(circle at 85% 70%, rgba(139, 92, 246, 0.2), transparent 70%);
    pointer-events: none;
    z-index: -2;
}

/* 网格纹理装饰 */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(60, 70, 100, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(60, 70, 100, 0.1) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: -1;
}

/* 平滑滚动与容器 */
html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---------- 玻璃导航栏 ---------- */
.navbar {
    position: sticky;
    top: 24px;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(10, 12, 16, 0.6);
    border-radius: 2.5rem;
    margin: 1.5rem auto;
    width: calc(100% - 3rem);
    max-width: 1200px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 2rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e0e7ff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    cursor: default;
}

.nav-links {
    display: flex;
    gap: 2.2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
    font-size: 1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
    border-radius: 2px;
}

.nav-links a:hover {
    color: #c4b5fd;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 汉堡菜单 (移动端) 隐藏 */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
}

/* ---------- Hero 区域 现代感---------- */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 0;
}

.hero h1 {
    font-size: clamp(2.8rem, 8vw, 5rem);
    font-weight: 800;
    background: linear-gradient(125deg, #ffffff, #b9a9ff, #6d8aff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 6s linear infinite;
    letter-spacing: -0.02em;
}

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

.hero p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 620px;
    backdrop-filter: blur(4px);
}

.cta-button {
    background: linear-gradient(105deg, #4f46e5, #7c3aed);
    border: none;
    padding: 0.9rem 2.2rem;
    border-radius: 3rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    margin-top: 0.5rem;
}

.cta-button:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.4);
    background: linear-gradient(105deg, #6366f1, #8b5cf6);
}

/* ---------- 卡片网格 section ---------- */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.3px;
}

.section-title span {
    background: linear-gradient(120deg, #b9c3ff, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 2rem;
    padding: 2rem 1.5rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.3);
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 25px 35px -12px rgba(0, 0, 0, 0.4);
    background: rgba(25, 30, 40, 0.8);
}

.card-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.glass-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.glass-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
}

.tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

/* ---------- 交互示例区 : 动态计数器与消息 ---------- */
.interactive-panel {
    background: rgba(15, 19, 26, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--glass-border);
    margin-top: 2rem;
}

.counter-box {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: baseline;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.counter-btn {
    background: #1e293b;
    border: none;
    font-size: 1.8rem;
    width: 60px;
    height: 60px;
    border-radius: 2rem;
    color: white;
    cursor: pointer;
    transition: 0.15s linear;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.counter-btn:active {
    transform: scale(0.94);
}

.counter-value {
    font-size: 3rem;
    font-weight: 700;
    font-family: monospace;
    background: linear-gradient(145deg, #e2e8f0, #b9c3ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    min-width: 120px;
}

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

.message-input input {
    padding: 0.8rem 1.2rem;
    border-radius: 3rem;
    border: 1px solid #2d3748;
    background: #11161f;
    color: white;
    width: 260px;
    outline: none;
    transition: 0.2s;
}

.message-input input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.message-input button {
    background: #2d3748;
    border: none;
    padding: 0 1.5rem;
    border-radius: 3rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.message-input button:hover {
    background: #4f46e5;
}

.feedback {
    margin: 1.5rem auto 0;
    font-size: 1rem;
    color: #a5b4fc;
    background: rgba(0,0,0,0.3);
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 60px;
}

/* ---------- 页脚 ---------- */
.footer {
    text-align: center;
    padding: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 3rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* 响应式调整 */
@media (max-width: 780px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
        padding: 1rem 0 0.8rem;
    }
    .nav-links.active {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .container {
        padding: 0 1.2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .counter-box {
        gap: 1rem;
    }
}