/* api/hot.css 热榜独立样式 */
/* 热榜区域 */
.hot-grid{
    display:grid;
    grid-template-columns: repeat(6, 1fr);
    gap:22px;
    margin-bottom: 40px;
}
.hot-card{
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 16px;
    font-size:15px;
    font-weight:500;
}
.head-right{
    display:flex;
    align-items:center;
    gap:8px;
}
.refresh-btn{
    background:transparent;
    border:none;
    cursor:pointer;
    display:flex;
    padding:4px;
    color:#333;
    transition: transform 0.3s ease;
}
@keyframes spin {
    from{transform:rotate(0deg);}
    to{transform:rotate(360deg);}
}
.refresh-btn.loading svg{
    animation: spin 1s linear infinite;
}
.refresh-btn:hover{
    color:#006cdd;
}
.card-list{
    max-height:340px;
    overflow-y:auto;
    padding:6px 0;
    border:0 !important;
}
.card-list::-webkit-scrollbar {
    width:6px;
}
.card-list::-webkit-scrollbar-track {
    background: transparent !important;
}
.card-list::-webkit-scrollbar-thumb {
    border-radius: 3px;
}
.card-list::-webkit-scrollbar-thumb:hover{
    background:#777;
}
.item{
    padding:8px 16px;
    cursor:pointer;
    display:flex;
    gap:10px;
    align-items:flex-start;
    transition:0.2s;
}
.item:hover{
    background:#f2f3f5;
    border-radius:6px;
}
.item:not(:last-child){
    border-bottom:1px solid #eee;
}
.rank-num{
    flex-shrink:0;
    width:24px;
    height:24px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:6px;
    color:#fff;
    font-weight:bold;
    font-size:12px;
}
.rank-1{background:#e53e3e;}
.rank-2{background:#ff7d00;}
.rank-3{background:#ffb700;}
.rank-other{background:#9499a2;}
.item-text{
    flex:1;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    gap:6px;
}
.title-text{
    line-height:1.42;
    font-size:13px;
}
.hot-value{
    flex-shrink:0;
    color:#666;
    font-size:11px;
    white-space:nowrap;
}
.douban-score{
    color:#009944;
    margin-left:4px;
    font-size:11px;
}
.tag-new{
    color:#dd3333;
    margin-left:6px;
    font-weight:bold;
    font-size:11px;
}
.douban-cover{
    width:44px;
    height:62px;
    object-fit:cover;
    border-radius:4px;
    flex-shrink:0;
    background:#eee;
}
/*热榜收起按钮*/
.hot-toggle-btn{
    display:none;
    margin-left:10px;
    border:1px solid #cccccc;
    background:transparent;
    border-radius:6px;
    padding:3px 6px;
    cursor:pointer;
    color:#444;
    transition:0.2s;
}
.hot-toggle-btn svg{
    transition: transform 0.25s ease;
}
.hot-toggle-btn.collapsed svg{
    transform: rotate(-180deg);
}
.hot-grid::-webkit-scrollbar{
    height:5px;
}
.hot-grid::-webkit-scrollbar-track{
    background:transparent;
}
.hot-grid::-webkit-scrollbar-thumb{
    background:#cccccc;
    border-radius:4px;
}

/*====深色模式热榜样式====*/
html[data-theme="dark"] .hot-card{
    background:#1b1e24;
}
html[data-theme="dark"] .refresh-btn{
    color:#ddd;
}
html[data-theme="dark"] .refresh-btn:hover{
    color:#0088ee;
}
html[data-theme="dark"] .card-list::-webkit-scrollbar-thumb {
    background: #40454f;
}
html[data-theme="dark"] .item:hover{
    background:#2c3038;
}
html[data-theme="dark"] .item:not(:last-child){
    border-bottom:1px solid #2c3038;
}
html[data-theme="dark"] .hot-value{
    color:#aaa;
}
html[data-theme="dark"] .douban-cover{
    background:#333;
}
html[data-theme="dark"] .hot-toggle-btn{
    border-color:#444a58;
    color:#ccc;
}
html[data-theme="dark"] .hot-grid::-webkit-scrollbar-thumb{
    background:#444444;
    border-radius:4px;
}

/*热榜响应式*/
@media(max-width:1600px){
    .hot-grid{grid-template-columns: repeat(4,1fr);}
}
@media(max-width:1200px){
    .hot-grid{grid-template-columns: repeat(3,1fr);}
}
@media(max-width:900px){
    .hot-grid{grid-template-columns: repeat(2,1fr);}
}
@media(max-width:600px){
    .hot-toggle-btn{
        display:inline-flex;
        align-items:center;
    }
    .hot-grid.hot-collapsed{
        height:0 !important;
        overflow:hidden !important;
        margin-bottom:0 !important;
    }
    .hot-grid{
        display:flex;
        gap:16px;
        overflow-x:auto;
        padding-bottom:12px;
        flex-wrap:nowrap;
    }
    .hot-card{
        flex:0 0 290px;
    }
}
