/* ============================================================
 * widgets.css — 所有 widget 模板内联 <style> 统一入口
 * 通过 wp_enqueue_style 全局加载一次，消除每个模板重复注入
 * ============================================================ */


/* ── sidebar-ranking-list ── */
.ranking-widget { position: relative; }
.ranking-widget .widget-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    color: #E8E8F6;
}
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
}
.link-card-item.rank-top { background-color: rgba(255,255,255,.03); }
.rank-num-box {
    width: 36px;
    height: 36px;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ecrank-no {
    color: #fff;
    background-image: -webkit-linear-gradient(-270deg,#b4baff 11%,hsla(0,0%,100%,0));
    opacity: .15;
    position: absolute;
    left: -5px;
    top: -5px;
    font-family: Impact,sans-serif;
    font-size: 42px;
    line-height: 1;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    transform: skew(-10deg);
}
.rank-nub {
    display: block;
    position: relative;
    font: 600 28px/28px Impact,sans-serif;
    transform: skew(-10deg);
}
.cohot1 { color: #f08080; }
.cohot2 { color: #ff8c00; }
.cohot3 { color: #ffd700; }
.cor3   { color: #999; }
.ranking-empty {
    padding: 30px 0;
    text-align: center;
    color: #A8A8B6;
    font-size: 14px;
    background: rgba(255,255,255,.02);
    border-radius: 12px;
}
.ranking-list .link-card-item { margin-bottom: 0 !important; }
.ranking-list .link-card-item a { padding: 12px; }
.ranking-list .info-title {
    font-size: 14px;
    font-weight: 500;
    color: #E8E8F6;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ranking-list .info-desc {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #A8A8B6;
    margin: 4px 0 0;
}
/* 鼠标光效 */
.magical {
    --mouse-x: 0px;
    --mouse-y: 0px;
    --circle-size: 400px;
}
.magical::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(var(--circle-size) circle at var(--mouse-x) var(--mouse-y),
            rgba(255,255,255,.06), transparent 40%);
    z-index: 1;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
    border-radius: inherit;
}
.magical:hover::before { opacity: 1; }


/* ── template-all-categories ── */
.all-categories-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    position: relative;
}
.all-categories-container {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 10px;
    flex: 1;
    scrollbar-width: none;
}
.all-categories-container::-webkit-scrollbar { display: none; }
.scroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #2c2f33;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color .3s ease;
    z-index: 1;
}
.scroll-btn:hover { background-color: #7289da; }
.scroll-btn svg { width: 24px; height: 24px; fill: #fff; }
.fade-mask {
    position: absolute;
    right: 50px;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(to left,#0e0e13,rgba(255,255,255,0));
    pointer-events: none;
    z-index: 0;
}
.all-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background: radial-gradient(at top left,rgb(245 178 255 / 70%),rgb(230 82 252 / 85%));
    border-radius: 5px;
    text-decoration: none;
    transition: background-color .3s ease;
    flex-shrink: 0;
}
.all-button:hover { background-color: #7289da; }
.all-button .count {
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    background-color: #0e0e1354;
    border-radius: 12px;
}
.category-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background-color: hsl(240deg 2.56% 48.06% / 20%);
    border-radius: 5px;
    text-decoration: none;
    transition: background-color .3s ease;
    flex-shrink: 0;
}
.category-button:hover { background-color: #7289da; }


/* ── daily-bonus ── */
.social-connections {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: #fff;
    background-color: #141419;
}
.card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    position: relative;
}
.card-desc {
    font-size: 14px;
    color: #A8A8B6;
    margin-top: 8px;
    max-width: 320px;
}
.social-buttons-container { display: flex; flex-direction: column; gap: 20px; }
.social-category { display: flex; flex-direction: column; gap: 12px; z-index: 20; }
.category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #E8E8F6;
}
.category-title .icon { width: 24px; height: 24px; }
.social-items { display: flex; flex-wrap: wrap; gap: 10px; }
.social-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 8px;
    background-color: rgba(255,255,255,.08);
    color: #E8E8F6;
    text-decoration: none;
    font-size: 14px;
    transition: all .3s ease;
    font-weight: 500;
    min-width: 160px;
    border: 1px solid rgba(255,255,255,.1);
}
.social-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,.2); }
.qq-btn          { border-left: 3px solid #12B7F5; }
.qq-btn:hover    { background-color: rgba(18,183,245,.1); }
.qq-channel-btn  { border-left: 3px solid #12B7F5; }
.qq-channel-btn:hover { background-color: rgba(18,183,245,.1); }
.tg-btn          { border-left: 3px solid #0088cc; }
.tg-btn:hover    { background-color: rgba(0,136,204,.1); }
.btn-num { font-size: 12px; color: rgba(255,255,255,.6); }
.arrow-icon { transition: transform .2s ease; }
.social-btn:hover .arrow-icon { transform: translateX(3px); }
@media (max-width: 768px) {
    .card-header { flex-direction: column; align-items: flex-start; text-align: center; }
    .card-image  { margin: 0 auto 20px; }
    .social-items { flex-direction: column; }
    .social-btn  { width: 100%; }
}


/* ── home-module-main ── */
.module-hide-on-mobile { display: block; }
.col-20 {
    position: relative;
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
    flex: 0 0 20%;
    max-width: 20%;
}
@media (max-width: 1200px) { .col-20 { flex: 0 0 25%; max-width: 25%; } }
@media (max-width: 992px)  { .col-20 { flex: 0 0 33.333333%; max-width: 33.333333%; } }
@media (max-width: 768px) {
    .module-hide-on-mobile { display: none !important; }
    .post-grid-wrapper .row { margin-right: -5px; margin-left: -5px; }
    .post-grid-wrapper [class*="col-"] {
        padding-right: 5px;
        padding-left: 5px;
        margin-bottom: 10px;
    }
    .post-grid-wrapper .tab-title { font-size: 16px; }
    .post-grid-wrapper .col-20,
    .post-grid-wrapper .col-4,
    .post-grid-wrapper .col-3,
    .post-grid-wrapper .col-2 { flex: 0 0 50% !important; max-width: 50% !important; }
}
@media (max-width: 576px) {
    .post-grid-wrapper .col-20,
    .post-grid-wrapper .col-4,
    .post-grid-wrapper .col-3,
    .post-grid-wrapper .col-2 { flex: 0 0 50% !important; max-width: 50% !important; }
}


/* ── single/content-game ── */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 5fr;
    gap: 20px;
    padding: 20px;
}
.game-content-layout {
    display: grid;
    grid-template-columns: 4fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 992px) {
    .game-layout         { grid-template-columns: 1fr; }
    .game-content-layout { grid-template-columns: 1fr; }
    .game-sidebar        { position: static; margin-bottom: 20px; }
}
