:root {
    --bg-base: #f4f7f6; /* 轻冷白底色 */
    --glass-bg: rgba(255, 255, 255, 0.45); /* 提升透明度，让底色透出来 */
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
    --text-primary: #1e293b;
    --text-sec: #64748b;
    --pill-bg: rgba(255,255,255,0.5);
    --pill-hover: rgba(255,255,255,0.85);
    --pill-active: rgba(255,255,255,0.95);
    --pill-active-shadow: 0 4px 12px rgba(0,0,0,0.1);
    --theme-color: #2563eb;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-base);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* 高饱和度环境光球 (提升玻璃层次感) */
.color-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.6;
    animation: float 12s infinite ease-in-out alternate;
    will-change: transform;
    transform: translateZ(0);
}
.blob-1 { width: 45vw; height: 45vw; background: #00f2fe; top: -10%; left: -10%; }
.blob-2 { width: 50vw; height: 50vw; background: #4facfe; bottom: -20%; right: -10%; animation-delay: -5s; }
.blob-3 { width: 35vw; height: 35vw; background: #fa709a; top: 30%; left: 35%; animation-delay: -3s; }

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(60px) scale(1.1); }
}

.noise-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; z-index: 1000; opacity: 0.2;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    will-change: transform;
    transform: translateZ(0);
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.fade-up {
    animation: fadeUp 0.8s ease-out forwards;
    opacity: 0; transform: translateY(20px);
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Nav Pills */
.top-nav-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    height: 70px;
}
.top-nav {
    position: absolute;
    left: 100%;
    top: 20px;
    display: flex; 
    gap: 12px; 
    padding: 0;
    margin-left: 20px;
    white-space: nowrap;
}

.tag-pill {
    padding: 8px 20px; border-radius: 30px; border: 1px solid var(--glass-border);
    background: var(--pill-bg); color: var(--text-primary); font-weight: 500;
    cursor: pointer; transition: all 0.3s ease; 
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    font-size: 0.95rem; box-shadow: var(--glass-shadow);
}

.tag-pill:hover { background: var(--pill-hover); transform: translateY(-2px); box-shadow: var(--pill-active-shadow); }
.tag-pill.active { background: var(--pill-active); box-shadow: var(--pill-active-shadow); color: var(--theme-color); }

/* Header & Search */
.header-content { text-align: center; padding: 40px 0; margin-bottom: 30px; }
.main-title { font-size: 2.8rem; font-weight: 700; margin-bottom: 30px; color: var(--text-primary); text-shadow: none; letter-spacing: -1px;}
.search-container { position: relative; max-width: 600px; margin: 0 auto; display: flex; align-items: center; }

#searchInput {
    width: 100%; padding: 16px 40px 16px 24px; border-radius: 40px; border: 1px solid var(--glass-border);
    background: var(--glass-bg); font-size: 1.1rem; box-shadow: var(--glass-shadow);
    outline: none; transition: all 0.3s ease; font-family: inherit; color: var(--text-primary);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
#searchInput:focus { background: #fff; box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.1); border-color: var(--theme-color); }

.clear-btn {
    position: absolute; right: 16px; background: transparent; border: none;
    font-size: 1.5rem; color: #999; cursor: pointer; line-height: 1;
}

/* Category Filters */
.category-filters { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.cat-btn {
    padding: 6px 16px; border-radius: 20px; border: 1px solid var(--glass-border);
    background: var(--pill-bg); outline: none; cursor: pointer; transition: all 0.2s;
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--glass-shadow); color: var(--text-primary);
}
.cat-btn.active, .cat-btn:hover { background: rgba(255,255,255,0.8); }

/* Layouts */
.content-grid { margin-bottom: 60px; min-height: 400px; }
.masonry-layout { columns: 3 300px; column-gap: 20px; }
.grid-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.list-layout { display: flex; flex-direction: column; gap: 15px; max-width: 800px; margin: 0 auto; }
.timeline-layout { max-width: 800px; margin: 0 auto; padding-left: 20px; border-left: 2px solid rgba(255,255,255,0.5); }

/* Common Card Style */
.card {
    background: var(--glass-bg); 
    backdrop-filter: saturate(180%) blur(20px); 
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow); border-radius: 16px; padding: 20px;
    transition: all 0.3s ease; margin-bottom: 20px; break-inside: avoid-column;
    text-decoration: none; color: inherit; display: block;
    will-change: transform, opacity;
    transform: translateZ(0);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.15); }

/* Cards specific */
.card-title { font-size: 1.25rem; font-weight: 600; margin: 0 0 10px 0; }
.card-desc { color: var(--text-sec); font-size: 0.95rem; line-height: 1.5; margin-bottom: 15px; }
.card-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 0.8rem; padding: 4px 8px; background: rgba(0,0,0,0.05); border-radius: 4px; }

/* Tool */
.tool-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px;}
.tool-icon { width: 48px; height: 48px; border-radius: 12px; background: #eee; display:flex; align-items:center; justify-content:center; font-size: 1.5rem;}
.download-btn { display: inline-block; padding: 8px 16px; background: var(--theme-color); color: #fff; text-decoration: none; border-radius: 20px; font-size: 0.9rem; }

/* Article */
.article-meta { font-size: 0.85rem; color: #888; margin-bottom: 10px; }
.article-summary { height: 0; overflow: hidden; opacity: 0; transition: all 0.3s ease; }
.article-summary.open { height: auto; opacity: 1; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(0,0,0,0.1); }
.toggle-btn { cursor: pointer; color: var(--theme-color); font-size: 0.9rem; margin-top: 5px; display: inline-block; background:none; border:none; padding:0; outline:none; }
.toggle-btn:hover { text-decoration: underline; }

/* Timeline Policy */
.timeline-item { position: relative; padding-left: 20px; margin-bottom: 30px; }
.timeline-item::before {
    content: ''; position: absolute; left: -27px; top: 0; width: 12px; height: 12px;
    border-radius: 50%; background: var(--theme-color); border: 2px solid #fff; box-shadow: var(--glass-shadow);
}
.policy-year { font-weight: bold; color: var(--theme-color); margin-bottom: 5px; font-size: 1.1rem; }

/* 移动端 (手机/小平板) 适配 */
@media (max-width: 768px) {
    /* 取消顶部导航的绝对定位溢出，强制单行显示，支持横向滑动 */
    .top-nav {
        position: static;
        flex-wrap: nowrap;
        justify-content: flex-start;
        margin-left: 0;
        margin-bottom: 0;
        margin-top: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px; /* 留出一点滚动空间 */
    }
    
    /* 隐藏顶部导航滚动条 */
    .top-nav::-webkit-scrollbar {
        display: none;
    }
    
    /* 缩小导航按钮的尺寸，尽量让它全部停留在当前屏幕 */
    .tag-pill {
        padding: 6px 14px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    .top-nav-wrapper {
        height: auto;
    }
    
    /* 缩小标题和调整间距 */
    .main-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    .header-content {
        padding: 20px 0;
    }
    
    /* 缩小最外层边距 */
    #app {
        padding: 10px;
    }
    
    /* 分类按钮支持横向溢出滚动，以免太挤换行太长 */
    .category-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 滚动条隐藏，保持美观 */
    .category-filters::-webkit-scrollbar {
        display: none;
    }
    
    /* 强制所有瀑布流和网格变成单列，提升手机可读性 */
    .masonry-layout {
        columns: 1;
    }
    .grid-layout {
        grid-template-columns: 1fr;
    }
    
    /* 减少卡片的内边距和整体外边距 */
    .card {
        padding: 16px;
        margin-bottom: 15px;
    }
    .content-grid {
        margin-bottom: 30px;
    }
    
    /* 调整搜索框在手机上的体积 */
    #searchInput {
        font-size: 1rem;
        padding: 12px 36px 12px 20px;
    }
}
