/* ============================================================
 * 全部标签云页面 (page_tags.php)
 * 现代 / 动画 / 美观
 * ============================================================ */

.tags-page {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 14px 14px 50px;
}

/* ── Hero ─────────────────────────────────────────────── */
.tags-hero {
    position: relative;
    margin: 0;
    padding: 56px 32px 48px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4c1d95 100%);
    border: 1px solid rgba(255, 255, 255, .08);
}
.tags-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, .45), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, .35), transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(56, 189, 248, .3), transparent 60%);
    animation: heroShift 14s ease-in-out infinite alternate;
}
@keyframes heroShift {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(-3%, 2%); }
}
.tags-hero-inner { position: relative; z-index: 1; text-align: center; }
.tags-hero-title {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    margin: 0 0 12px;
    background: linear-gradient(120deg, #fff 0%, #c7d2fe 50%, #f0abfc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleFloat 5s ease-in-out infinite;
}
@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}
.tags-hero-sub {
    color: rgba(255, 255, 255, .7);
    font-size: 15px;
    margin: 0 0 28px;
}
.tags-hero-sub b { color: #f0abfc; font-weight: 700; }

.tags-search {
    display: flex;
    align-items: center;
    max-width: 460px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    padding: 0 18px;
    backdrop-filter: blur(8px);
    transition: all .25s ease;
}
.tags-search:focus-within {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(196, 181, 253, .7);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, .2);
}
.tags-search-ic {
    width: 18px; height: 18px;
    color: rgba(255, 255, 255, .6);
    flex: none;
}
.tags-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 12px 10px;
    color: #fff;
    font-size: 14px;
}
.tags-search input::placeholder { color: rgba(255, 255, 255, .45); }

/* ── 统计条 ───────────────────────────────────────────── */
.tags-stat-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 22px 0;
}
.tags-stat-item {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: transform .2s ease, border-color .2s ease;
}
.tags-stat-item:hover {
    transform: translateY(-2px);
    border-color: rgba(167, 139, 250, .5);
}
.tags-stat-num {
    display: block;
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(120deg, #818cf8, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tags-stat-lbl {
    display: block;
    font-size: 12px;
    color: var(--dim2);
    margin-top: 4px;
    letter-spacing: 1px;
}

/* ── 空状态 ───────────────────────────────────────────── */
.tags-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--dim);
}
.tags-empty-ic { font-size: 56px; margin-bottom: 14px; }

/* ── 标签云 ───────────────────────────────────────────── */
.tags-cloud-section {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}
.tags-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tags-section-title::before {
    content: "";
    width: 4px; height: 18px;
    border-radius: 3px;
    background: linear-gradient(180deg, #818cf8, #f472b6);
}
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.tc-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: hsl(var(--h), 80%, 72%);
    background: hsla(var(--h), 80%, 60%, .08);
    border: 1px solid hsla(var(--h), 80%, 60%, .3);
    font-weight: 600;
    line-height: 1.4;
    transition: all .22s ease;
    animation: chipIn .5s ease both;
}
@keyframes chipIn {
    from { opacity: 0; transform: translateY(8px) scale(.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tc-chip i {
    font-style: normal;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    background: hsla(var(--h), 80%, 60%, .18);
    color: hsl(var(--h), 80%, 80%);
    font-weight: 700;
}
.tc-chip:hover {
    color: #fff;
    background: hsl(var(--h), 80%, 58%);
    border-color: hsl(var(--h), 80%, 58%);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 22px hsla(var(--h), 80%, 50%, .35);
}
.tc-chip:hover i { background: rgba(255, 255, 255, .25); color: #fff; }

/* ── 字母索引 ─────────────────────────────────────────── */
.tags-alphabet {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 26px;
    padding: 14px;
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: 12px;
    position: sticky;
    top: 66px;
    z-index: 5;
    backdrop-filter: blur(6px);
}
.ta-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    color: var(--dim);
    background: var(--card2);
    border: 1px solid var(--line);
    transition: all .18s ease;
}
.ta-link:hover {
    color: #fff;
    background: linear-gradient(135deg, #818cf8, #f472b6);
    border-color: transparent;
    transform: translateY(-2px);
}

/* ── 分组列表 ─────────────────────────────────────────── */
.tags-groups { display: flex; flex-direction: column; gap: 20px; }
.tags-group {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px 22px;
    scroll-margin-top: 70px;
    transition: border-color .2s ease;
}
.tags-group:target {
    border-color: rgba(167, 139, 250, .6);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, .12);
}
.tags-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 16px;
    color: var(--txt);
}
.tags-group-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, #818cf8, #f472b6);
}
.tags-group-count {
    font-size: 12px;
    color: var(--dim2);
    font-weight: 400;
}
.tags-group-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.tg-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 9px;
    text-decoration: none;
    color: var(--txt);
    background: var(--card2);
    border: 1px solid transparent;
    transition: all .18s ease;
    animation: itemIn .4s ease both;
}
@keyframes itemIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}
.tg-name {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tg-use {
    font-size: 11px;
    color: var(--dim2);
    flex: none;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--bg2);
    font-family: var(--mono);
}
.tg-item:hover {
    border-color: rgba(129, 140, 248, .4);
    background: rgba(129, 140, 248, .08);
    transform: translateX(3px);
}
.tg-item:hover .tg-use { color: #a5b4fc; background: rgba(129, 140, 248, .15); }

/* ── 响应式 ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .tags-page { padding: 10px 10px 40px; }
    .tags-hero { padding: 40px 20px 32px; }
    .tags-hero-title { font-size: 30px; }
    .tags-stat-bar { grid-template-columns: 1fr; }
    .tags-cloud-section { padding: 20px 14px; }
    .tags-group { padding: 16px; }
    .tags-group-list { grid-template-columns: 1fr; }
    .tags-alphabet { top: 10px; }
}
