/* =====================================================================
 * 盒子主题 · 小工具「软件图标提示墙」
 * 文件：assets/css/hezi-widget-software-icons.css
 * 变量：
 *      --hezi-icon-accent   主题色（闪烁圆点 / 音浪条 / hover 边框）
 *      --hezi-icon-size     图标容器尺寸(px)
 *      --hezi-icon-gap      图标间距
 *      --hezi-icon-bg       图标容器背景（亮色）
 *      --hezi-icon-title-size 标题字号
 *      --hezi-icon-fill     单图标 hover 填充色（随机模式由 JS 设置，统一模式继承 accent）
 * ===================================================================== */
.hezi-icons {
    --hezi-icon-accent: #ff5722;
    --hezi-icon-size: 60px;
    --hezi-icon-gap: 15px;
    --hezi-icon-bg: #ffffff;
    --hezi-icon-title-size: 24px;
    --hezi-icon-fill: #4d4d4d;
    padding: 20px 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---------- 标题区 ---------- */
.hezi-icons__head {
    text-align: center;
    margin-bottom: 26px;
}
.hezi-icons__title {
    font-size: var(--hezi-icon-title-size);
    font-weight: 600;
    margin: 0 0 8px 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.hezi-icons__sub {
    font-size: 14px;
    color: #666;
    margin: 0 0 18px 0;
    font-weight: 400;
}

/* 闪烁圆点 */
.hezi-icons__dot {
    width: 8px;
    height: 8px;
    background-color: var(--hezi-icon-accent);
    border-radius: 50%;
    animation: hezi-icons-blink 2s infinite;
    box-shadow: 0 0 10px var(--hezi-icon-accent);
}
@keyframes hezi-icons-blink {
    0%, 50% { opacity: 1; transform: scale(1); }
    25%, 75% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* 音浪分割线 */
.hezi-icons__wave {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 220px;
    gap: 3px;
    height: 10px;
    margin: 0 auto;
}
.hezi-icons__wave span {
    width: 3px;
    height: 6px;
    border-radius: 1px;
    background-color: var(--hezi-icon-accent);
    animation: hezi-icons-wave 1.2s ease-in-out infinite;
}
.hezi-icons__wave span:nth-child(1) { animation-delay: -1.1s; background-color: #4c86f9; }
.hezi-icons__wave span:nth-child(2) { animation-delay: -1.0s; background-color: #49a84c; }
.hezi-icons__wave span:nth-child(3) { animation-delay: -0.9s; background-color: #f6bb02; }
.hezi-icons__wave span:nth-child(4) { animation-delay: -0.8s; background-color: #ff6b6b; }
.hezi-icons__wave span:nth-child(5) { animation-delay: -0.7s; background-color: #2196f3; }
.hezi-icons__wave span:nth-child(6) { animation-delay: -0.6s; background-color: #9c27b0; }
.hezi-icons__wave span:nth-child(7) { animation-delay: -0.5s; background-color: #00bcd4; }
.hezi-icons__wave span:nth-child(8) { animation-delay: -0.4s; background-color: #ff9800; }
.hezi-icons__wave span:nth-child(9) { animation-delay: -0.3s; background-color: #795548; }
@keyframes hezi-icons-wave {
    0%, 40%, 100% { transform: scaleY(0.3); }
    20% { transform: scaleY(1.8); }
}

/* ---------- 图标墙 ---------- */
.hezi-icons__list {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hezi-icons__list ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--hezi-icon-gap);
    margin: 0;
    padding: 0;
}
.hezi-icon-item {
    position: relative;
}
.hezi-icon-item .hezi-icon-tip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background-color: var(--hezi-icon-fill);
    padding: 6px 10px;
    opacity: 0;
    visibility: hidden;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 10;
    white-space: nowrap;
    border-radius: 4px;
    font-weight: 500;
    pointer-events: none;
}
.hezi-icon-item:hover .hezi-icon-tip {
    opacity: 1;
    visibility: visible;
    top: -50px;
}
.hezi-icon-item > a {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--hezi-icon-size);
    height: var(--hezi-icon-size);
    border-radius: 0;
    color: #4d4d4d;
    background-color: var(--hezi-icon-bg);
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.hezi-icon-item > a:hover {
    box-shadow: 3px 2px 45px 0 rgba(0, 0, 0, 0.5);
    transform: translateY(-5px);
}
.hezi-icon-item > a img {
    position: relative;
    z-index: 1;
    width: 50%;
    height: 50%;
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}
/* 无图标图时显示名称首字母占位 */
.hezi-icon-initial {
    position: relative;
    z-index: 1;
    font-size: calc(var(--hezi-icon-size) * 0.36);
    font-weight: 700;
    color: #888;
    transition: all 0.3s ease;
    line-height: 1;
}
.hezi-icon-item > a:hover .hezi-icon-initial {
    color: #fff;
}
.hezi-icon-item > a:hover img {
    filter: grayscale(0%);
    transform: scale(1.1);
}
.hezi-icon-fill {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0;
    background-color: var(--hezi-icon-fill);
    transition: height 0.3s ease-in-out;
    z-index: 0;
}
.hezi-icon-item > a:hover .hezi-icon-fill {
    height: 100%;
}

/* ---------- 暗黑模式（子比 body.dark-theme 为主，兼容其它写法） ---------- */
body.dark-theme .hezi-icons,
body.dark .hezi-icons,
body[data-theme="dark"] .hezi-icons,
.theme-dark .hezi-icons {
    --hezi-icon-bg: #2d3748;
}
body.dark-theme .hezi-icons__sub,
body.dark .hezi-icons__sub,
body[data-theme="dark"] .hezi-icons__sub,
.theme-dark .hezi-icons__sub {
    color: #aaa;
}
body.dark-theme .hezi-icon-item > a,
body.dark .hezi-icon-item > a,
body[data-theme="dark"] .hezi-icon-item > a,
.theme-dark .hezi-icon-item > a {
    color: #cfd3da;
}
body.dark-theme .hezi-icon-item > a:hover,
body.dark .hezi-icon-item > a:hover,
body[data-theme="dark"] .hezi-icon-item > a:hover,
.theme-dark .hezi-icon-item > a:hover {
    box-shadow: 3px 2px 45px 0 rgba(255, 255, 255, 0.2);
}
body.dark-theme .hezi-icons__dot,
body.dark .hezi-icons__dot,
body[data-theme="dark"] .hezi-icons__dot,
.theme-dark .hezi-icons__dot {
    background-color: #ff6b6b;
    box-shadow: 0 0 10px #ff6b6b;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .hezi-icons { --hezi-icon-size: 50px; }
    .hezi-icons__title { font-size: calc(var(--hezi-icon-title-size) - 4px); }
    .hezi-icons__sub { font-size: 13px; }
    .hezi-icons__wave { width: 180px; }
    .hezi-icons__dot { width: 6px; height: 6px; }
}
@media (max-width: 480px) {
    .hezi-icons { --hezi-icon-size: 45px; }
    .hezi-icons__title { font-size: calc(var(--hezi-icon-title-size) - 6px); }
    .hezi-icons__sub { font-size: 12px; }
    .hezi-icons__wave { width: 150px; }
    .hezi-icons__list ul { gap: 10px; }
}
