/* =============================================
   标签页 V2 样式 - 红色主题 (匹配全站)
   ============================================= */

/* ===== Hero 头部 ===== */
.tag-v2-hero {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #fff5f5 50%, #fef2f2 100%);
    padding: 24px 32px 20px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    overflow: hidden;
    color: #1e293b;
}
.tag-v2-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23E53935' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.tag-v2-hero::after {
    content: '';
    position: absolute; top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(229,57,53,.08), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.tag-v2-hero .tag-v2-orb {
    position: absolute; bottom: -40px; left: 20%;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(229,57,53,.06), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Hero 内容布局 */
.tag-v2-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}
.tag-v2-hero-left {
    flex: 1;
    min-width: 0;
}
.tag-v2-hero-right {
    flex-shrink: 0;
    margin-left: 24px;
}

.tag-v2-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 20px;
    background: rgba(229,57,53,.08); border: 1px solid rgba(229,57,53,.15);
    font-size: 12px; color: #E53935; margin-bottom: 10px;
}
.tag-v2-badge .tag-pulse {
    width: 6px; height: 6px; border-radius: 50%;
    background: #22c55e;
    animation: tag-pulse 2s infinite;
}
@keyframes tag-pulse {
    0%,100% { opacity: 1; }
    50% { opacity: .4; }
}
.tag-v2-title {
    font-size: 26px; font-weight: 800; margin: 0 0 6px;
    letter-spacing: -0.5px; line-height: 1.3;
}
.tag-v2-title .tag-accent { color: #E53935; }
.tag-v2-desc {
    font-size: 14px; color: #64748b;
    margin: 0 0 12px; line-height: 1.6;
}
.tag-v2-stats {
    display: flex; gap: 24px;
}
.tag-v2-stat-item {
    text-align: center;
}
.tag-v2-stat-num {
    font-size: 20px; font-weight: 800;
    background: linear-gradient(135deg, #E53935, #EF5350);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; line-height: 1.2;
}
.tag-v2-stat-label {
    font-size: 11px; color: #94a3b8;
    margin-top: 2px;
}

/* Follow Button */
.tag-v2-follow-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 22px; border-radius: 10px;
    background: linear-gradient(135deg, #E53935, #EF5350);
    color: #fff; border: none; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all .25s;
    box-shadow: 0 4px 16px rgba(229,57,53,.3);
    white-space: nowrap;
}
.tag-v2-follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(229,57,53,.4);
}
.tag-v2-follow-btn.followed {
    background: #fff;
    color: #E53935;
    border: 1px solid #FFCDD2;
    box-shadow: 0 1px 4px rgba(229,57,53,.1);
}
.tag-v2-follow-btn.followed:hover {
    border-color: #94a3b8; color: #64748b;
}

/* ===== 筛选标签 ===== */
.tag-v2-filters {
    display: flex; gap: 8px; margin-bottom: 20px;
    flex-wrap: wrap;
}
.tag-v2-filter {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 18px; border-radius: 10px;
    background: #fff; border: 1px solid #e2e8f0;
    color: #64748b; font-size: 13px; font-weight: 500;
    text-decoration: none; transition: all .2s;
}
.tag-v2-filter:hover {
    border-color: #E53935; color: #E53935;
    background: #fff5f5;
}
.tag-v2-filter.active {
    background: linear-gradient(135deg, #E53935, #EF5350);
    color: #fff; border-color: transparent;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(229,57,53,.25);
}

/* ===== 文章卡片 ===== */
.tag-v2-article {
    display: flex; gap: 20px;
    padding: 20px 24px;
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 14px; margin-bottom: 12px;
    transition: all .25s;
}
.tag-v2-article:hover {
    border-color: #FFCDD2;
    box-shadow: 0 4px 20px rgba(229,57,53,.08);
    transform: translateY(-1px);
}
.tag-v2-article-thumb {
    width: 200px; min-width: 200px; height: 130px;
    border-radius: 10px; overflow: hidden; flex-shrink: 0;
    display: block;
}
.tag-v2-article-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s;
}
.tag-v2-article:hover .tag-v2-article-thumb img {
    transform: scale(1.05);
}
.tag-v2-article-body {
    flex: 1; display: flex; flex-direction: column;
    justify-content: space-between; min-width: 0;
}
.tag-v2-article-title {
    font-size: 17px; font-weight: 700; line-height: 1.5;
    margin: 0 0 8px;
}
.tag-v2-article-title a {
    color: #1e293b; text-decoration: none;
    transition: color .2s;
}
.tag-v2-article-title a:hover { color: #E53935; }
.tag-v2-article-excerpt {
    font-size: 13px; color: #64748b; line-height: 1.7;
    margin: 0 0 12px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.tag-v2-article-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #94a3b8; flex-wrap: wrap;
}
.tag-v2-article-meta i { font-size: 12px; }
.tag-v2-meta-tag {
    padding: 2px 10px; border-radius: 6px;
    background: #fff5f5; color: #E53935;
    font-size: 11px; text-decoration: none;
    transition: all .2s;
}
.tag-v2-meta-tag:hover {
    background: #ffebee; color: #C62828;
}
.tag-v2-meta-right {
    margin-left: auto;
    display: flex; gap: 12px;
}

/* ===== 侧边栏 ===== */
.tag-v2-sidebar-card {
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 14px; margin-bottom: 16px;
    overflow: hidden; transition: box-shadow .2s;
}
.tag-v2-sidebar-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.tag-v2-sidebar-head {
    display: flex; align-items: center; gap: 8px;
    padding: 16px 18px; font-size: 15px; font-weight: 700;
    color: #1e293b; border-bottom: 1px solid #f1f5f9;
}
.tag-v2-sidebar-icon {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 8px;
    font-size: 14px;
}
.tag-v2-related-tags {
    padding: 14px 18px;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.tag-v2-pill {
    display: inline-block;
    padding: 5px 14px; border-radius: 20px;
    border: 1px solid #e2e8f0;
    color: #64748b; font-size: 12px;
    text-decoration: none; transition: all .2s;
}
.tag-v2-pill:hover {
    border-color: #E53935; color: #E53935;
    background: #fff5f5;
}
.tag-v2-pill.active {
    border-color: #E53935; color: #fff;
    background: linear-gradient(135deg, #E53935, #EF5350);
    font-weight: 600;
}
.tag-v2-hot-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 18px; text-decoration: none;
    color: #334155; font-size: 13px; line-height: 1.5;
    border-bottom: 1px solid #f8fafc;
    transition: all .2s;
}
.tag-v2-hot-item:hover {
    background: #f8fafc; color: #E53935;
    padding-left: 22px;
}
.tag-v2-hot-item:last-child { border-bottom: none; }
.tag-v2-hot-rank {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 6px;
    font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
    background: #f1f5f9; color: #94a3b8;
}
.tag-v2-hot-rank.top {
    background: linear-gradient(135deg, #E53935, #EF5350);
    color: #fff;
}
.tag-v2-hot-text {
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== 分页 ===== */
.tag-v2-pager {
    display: flex; justify-content: center;
    padding: 24px 0; margin-top: 8px;
}
.tag-v2-pager .pagination { margin: 0; }
.tag-v2-pager .page-item .page-link {
    border: 1px solid #e2e8f0; color: #475569;
    padding: 7px 14px; font-size: 13px;
    margin: 0 3px; border-radius: 8px;
    transition: all .2s;
}
.tag-v2-pager .page-item .page-link:hover {
    background: #E53935; color: #fff;
    border-color: #E53935;
}
.tag-v2-pager .page-item.active .page-link {
    background: linear-gradient(135deg, #E53935, #EF5350);
    border-color: transparent; color: #fff;
    box-shadow: 0 2px 8px rgba(229,57,53,.3);
}

/* ===== 空状态 ===== */
.tag-v2-empty {
    text-align: center; padding: 60px 20px;
    color: #94a3b8;
}
.tag-v2-empty i { font-size: 56px; opacity: .25; display: block; margin-bottom: 12px; }

/* ===== 关于标签 SEO ===== */
.tag-v2-about-text {
    padding: 14px 18px;
    font-size: 13px; color: #64748b;
    line-height: 1.7; margin: 0;
}
.tag-v2-about-text strong {
    color: #E53935;
}

/* ===== 标签索引页 ===== */
.tag-index-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #fff5f5 50%, #fef2f2 100%);
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 28px 32px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.tag-index-hero-inner {
    flex: 1;
    min-width: 0;
}
.tag-index-title {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}
.tag-index-title i { color: #E53935; }
.tag-index-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}
.tag-index-search {
    flex-shrink: 0;
    width: 340px;
}
.tag-index-search .input-group-text {
    background: #fff;
    border-color: #e2e8f0;
    color: #94a3b8;
}
.tag-index-search .form-control {
    border-color: #e2e8f0;
    font-size: 14px;
}
.tag-index-search .form-control:focus {
    border-color: #E53935;
    box-shadow: 0 0 0 3px rgba(229,57,53,.1);
}
.tag-index-search .btn-primary {
    background: linear-gradient(135deg, #E53935, #EF5350);
    border: none;
    font-weight: 600;
    padding: 0 20px;
}
.tag-index-search .btn-primary:hover {
    background: linear-gradient(135deg, #C62828, #E53935);
}
.tag-index-stats {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
    padding: 0 4px;
}
.tag-index-stats strong {
    color: #E53935;
    font-weight: 700;
}

/* 标签卡片网格 */
.tag-index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.tag-index-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all .25s;
    min-height: 90px;
}
.tag-index-card:hover {
    border-color: #FFCDD2;
    box-shadow: 0 4px 20px rgba(229,57,53,.1);
    transform: translateY(-2px);
}
.tag-index-card-top {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}
.tag-index-card-hash {
    font-size: 20px;
    font-weight: 800;
    color: #E53935;
    line-height: 1;
}
.tag-index-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tag-index-card:hover .tag-index-card-name {
    color: #E53935;
}
.tag-index-card-stats {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #94a3b8;
}
.tag-index-card-stats i {
    font-size: 11px;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .tag-index-grid { grid-template-columns: repeat(3, 1fr); }
    .tag-index-hero { flex-direction: column; align-items: stretch; gap: 16px; }
    .tag-index-search { width: 100%; }
}
@media (max-width: 768px) {
    .tag-v2-hero { padding: 20px 16px 16px; border-radius: 12px; }
    .tag-v2-hero-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .tag-v2-hero-right { margin-left: 0; }
    .tag-v2-title { font-size: 22px; }
    .tag-v2-stats { gap: 16px; }
    .tag-v2-stat-num { font-size: 18px; }
    .tag-v2-article { flex-direction: column; gap: 12px; padding: 16px; }
    .tag-v2-article-thumb { width: 100%; min-width: auto; height: 180px; }
    .tag-v2-filters { gap: 6px; }
    .tag-v2-filter { padding: 6px 14px; font-size: 12px; }
    .tag-index-grid { grid-template-columns: repeat(2, 1fr); }
    .tag-index-hero { padding: 20px 16px; }
    .tag-index-title { font-size: 20px; }
}
@media (max-width: 480px) {
    .tag-index-grid { grid-template-columns: 1fr; }
}
