/* ===== Hero ===== */
.tags-hero {
    background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 50%, #1e40af 100%);
    padding: 60px 0 80px;
    color: #fff;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.tags-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
            linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}
.tags-hero .container { position: relative; z-index: 2; }
.tags-hero-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.tags-hero-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 28px;
}
.tags-search {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}
.tags-search input {
    width: 100%;
    padding: 14px 52px 14px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.25s ease;
}
.tags-search input::placeholder { color: rgba(255,255,255,0.5); }
.tags-search input:focus {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.3);
}
.tags-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--color-primary);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tags-search button:hover { background: var(--color-primary-hover); }

/* ===== 热门标签快捷栏 ===== */
.hot-tags-bar {
    margin-top: -40px;
    position: relative;
    z-index: 10;
    margin-bottom: 48px;
}
.hot-tags-inner {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
.hot-tags-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hot-tags-title i { color: #ef4444; }
.hot-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hot-tag-chip {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hot-tag-chip:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}
.hot-tag-chip .count {
    font-size: 11px;
    opacity: 0.7;
}

/* ===== 分类筛选 ===== */
.category-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.category-bar::-webkit-scrollbar { display: none; }
.category-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.category-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.category-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

/* ===== 标签网格 ===== */
.tags-section { margin-bottom: 48px; }
.tags-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tags-section-title i { color: var(--color-primary); }
.tags-section-count {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: auto;
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 640px) { .tags-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .tags-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .tags-grid { grid-template-columns: repeat(5, 1fr); } }

.tag-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}
.tag-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--color-primary), #7c3aed);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.tag-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.tag-card:hover::before { opacity: 1; }
.tag-card-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.tag-card-info { flex: 1; min-width: 0; }
.tag-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tag-card-count {
    font-size: 12px;
    color: #94a3b8;
}

/* ===== 字母索引导航 ===== */
.alpha-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 32px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.alpha-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.alpha-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
