.trending-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.trending-layout.has-left.has-right {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(220px, 260px);
}

.trending-layout.has-left:not(.has-right) {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

.trending-layout.has-right:not(.has-left) {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
}

.trending-sidebar {
    min-width: 0;
}

.trending-shell {
    min-width: 0;
}

.trending-layout:not(.has-left):not(.has-right) .trending-shell {
    max-width: 820px;
}

.trending-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    padding: 28px 30px 30px;
    background:
        radial-gradient(circle at right top, rgba(255, 190, 92, 0.32), transparent 36%),
        linear-gradient(135deg, #fff7ef 0%, #ffffff 68%);
    border: 1px solid rgba(255, 154, 68, 0.15);
}

.trending-hero::after {
    content: "";
    position: absolute;
    right: -48px;
    top: -48px;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: rgba(255, 188, 104, 0.14);
}

.trending-hero > * {
    position: relative;
    z-index: 1;
}

.trending-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 94px;
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7a18, #ffb347);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.trending-hero h1 {
    margin: 14px 0 8px;
    color: #1d2433;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 800;
}

.trending-hero p {
    margin: 0;
    max-width: 560px;
    color: #6a7385;
    font-size: 15px;
    line-height: 1.8;
}

.trending-board {
    overflow: hidden;
    background: #fff;
    border: 1px solid #eef1f4;
}

.trending-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.trending-list-item + .trending-list-item {
    border-top: 1px solid #f1f3f6;
}

.trending-link {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 21px 24px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.trending-link:hover {
    background: #fffaf5;
}

.trending-rank {
    flex: 0 0 42px;
    height: 28px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b5bcc9, #8d96aa);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.25);
}

.trending-rank.is-top-1 {
    background: linear-gradient(135deg, #ff6336, #ffb347);
}

.trending-rank.is-top-2 {
    background: linear-gradient(135deg, #ff8b2b, #ffc85a);
}

.trending-rank.is-top-3 {
    background: linear-gradient(135deg, #ffad33, #ffd36b);
}

.trending-keyword-wrap {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trending-keyword {
    color: #212734;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    word-break: break-word;
}

.trending-flag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5c66, #ff8752);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.trending-meta {
    flex: 0 0 auto;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: #b0b7c4;
}

.trending-meta-host {
    max-width: 180px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-meta-arrow {
    font-size: 12px;
    letter-spacing: 0.04em;
}

.trending-empty {
    padding: 54px 28px;
    text-align: center;
    color: #7c8698;
}

@media screen and (max-width: 768px) {
    .trending-layout,
    .trending-layout.has-left.has-right,
    .trending-layout.has-left:not(.has-right),
    .trending-layout.has-right:not(.has-left) {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .trending-hero {
        padding: 22px 18px 24px;
    }

    .trending-hero h1 {
        font-size: 28px;
    }

    .trending-link {
        gap: 12px;
        padding: 16px 16px;
    }

    .trending-rank {
        flex-basis: 36px;
        height: 26px;
        font-size: 14px;
    }

    .trending-keyword {
        font-size: 16px;
    }

    .trending-meta {
        min-width: 0;
        gap: 2px;
    }

    .trending-meta-host {
        max-width: 90px;
        font-size: 12px;
    }

    .trending-meta-arrow {
        font-size: 11px;
    }
}

@media screen and (max-width: 560px) {
    .trending-keyword-wrap {
        gap: 8px;
        flex-wrap: wrap;
    }

    .trending-meta {
        display: none;
    }
}
