/* 前台增强：热门标签 / 暗黑模式 / 本地收藏 */

/* 热门标签 */
.dhcat-hot-tags {
    margin-top: 10px;
    font-size: 13px;
    line-height: 26px;
    color: #fff;
    text-align: center;
}

.dhcat-hot-tags span {
    opacity: .85;
}

.dhcat-hot-tags a {
    display: inline-block;
    margin: 0 4px;
    padding: 1px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 12px;
    text-decoration: none;
}

.dhcat-hot-tags a:hover {
    background: #ff7f00;
    color: #fff;
}

.dhcat-tag {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 8px;
    border-radius: 10px;
    background: #f2f2f2;
    color: #666;
    font-size: 12px;
    text-decoration: none;
}

.dhcat-tag:hover {
    background: #ff7f00;
    color: #fff;
}

/* 站点收藏星标 */
.site-item {
    position: relative;
}

.dhcat-fav-btn {
    position: absolute;
    top: 2px;
    right: 4px;
    display: none;
    z-index: 2;
    font-style: normal;
    font-size: 14px;
    line-height: 1;
    color: #c9c9c9;
    cursor: pointer;
}

.site-item:hover .dhcat-fav-btn,
.dhcat-fav-btn.active {
    display: block;
}

.dhcat-fav-btn.active {
    color: #ff9f1a;
}

/* 浮动按钮 */
.dhcat-float {
    position: fixed;
    right: 28px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #ff7f00;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.dhcat-theme-toggle {
    bottom: 96px;
}

.dhcat-fav-toggle {
    bottom: 152px;
}

.dhcat-fav-toggle b {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 3px;
    border-radius: 9px;
    background: #e94b4b;
    font-size: 11px;
    font-weight: 400;
    line-height: 18px;
    text-align: center;
}

/* 收藏面板 */
.dhcat-fav-panel {
    position: fixed;
    right: 28px;
    bottom: 206px;
    z-index: 10000;
    display: none;
    width: 280px;
    max-height: 60vh;
    overflow: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, .25);
}

.dhcat-fav-panel.show {
    display: block;
}

.dhcat-fav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    color: #333;
}

.dhcat-fav-close {
    color: #999;
    cursor: pointer;
    font-size: 18px;
}

.dhcat-fav-list {
    padding: 6px;
}

.dhcat-fav-empty {
    padding: 20px;
    color: #999;
    font-size: 13px;
    text-align: center;
}

.dhcat-fav-item {
    display: flex;
    align-items: center;
    padding: 8px 6px;
    border-radius: 5px;
    color: #555;
    font-size: 13px;
    text-decoration: none;
}

.dhcat-fav-item:hover {
    background: #f5f5f5;
    color: #ff7f00;
}

.dhcat-fav-item img {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border-radius: 3px;
}

.dhcat-fav-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dhcat-fav-remove {
    padding: 0 4px;
    color: #bbb;
    font-size: 14px;
    cursor: pointer;
}

.dhcat-fav-remove:hover {
    color: #e94b4b;
}

/* 暗黑模式 */
html[data-theme="dark"] body {
    background-color: #15181d;
    color: #c8ccd2;
}

html[data-theme="dark"] .card {
    background: #1e2229;
    box-shadow: 0 0 8px rgba(0, 0, 0, .5);
}

html[data-theme="dark"] .card .card-head {
    background: #242a33;
    border-bottom-color: #303741;
    color: #e6e8eb;
}

html[data-theme="dark"] .card .card-head .more {
    color: #9aa3ae;
}

html[data-theme="dark"] .card .card-body {
    color: #c8ccd2;
}

html[data-theme="dark"] .header.fixed {
    background: rgba(22, 25, 30, .94);
}

html[data-theme="dark"] .nav li a {
    color: #c8ccd2;
}

html[data-theme="dark"] .index-box .search-box .txt {
    background: rgba(30, 34, 41, .94);
    color: #e6e8eb;
    border-color: #333a44;
}

html[data-theme="dark"] .footer {
    background: #12151a;
    color: #8a929e;
}

html[data-theme="dark"] .footer a {
    color: #9aa3ae;
}

html[data-theme="dark"] .site-ranking .name,
html[data-theme="dark"] .post-item .title {
    color: #d5d9e0;
}

html[data-theme="dark"] .dhcat-tag {
    background: #2b313a;
    color: #b7bec8;
}

html[data-theme="dark"] .dhcat-fav-panel {
    background: #1e2229;
    box-shadow: 0 6px 30px rgba(0, 0, 0, .6);
}

html[data-theme="dark"] .dhcat-fav-head {
    border-bottom-color: #303741;
    color: #e6e8eb;
}

html[data-theme="dark"] .dhcat-fav-item {
    color: #b7bec8;
}

html[data-theme="dark"] .dhcat-fav-item:hover {
    background: #262c35;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background: #1b1f26;
    border-color: #333a44;
    color: #d5d9e0;
}

html[data-theme="dark"] .oz-btn-default {
    background: #2b313a;
    color: #d5d9e0;
}

html[data-theme="dark"] .pagination li a {
    border-color: #303741;
    color: #b7bec8;
}

@media (max-width: 767px) {
    .dhcat-float {
        right: 14px;
    }

    .dhcat-fav-panel {
        right: 14px;
        width: calc(100vw - 28px);
        max-width: 320px;
    }
}
