.ymx-topic-widget {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.ymx-topic-widget .widget-title {
    display: none;
}

.ymx-topic-list.ymx-topic-noimg {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ymx-topic-noimg-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
    transition: background 0.2s ease;
    gap: 8px;
}

.ymx-topic-noimg-link:hover {
    background: var(--ymx-bg-card-hover);
}

.ymx-topic-noimg-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.ymx-topic-folder-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--ymx-text-muted);
    fill: currentColor;
}

.ymx-topic-name {
    font-size: 13px;
    color: var(--ymx-text-primary);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.ymx-topic-noimg-link:hover .ymx-topic-name {
    color: var(--ymx-accent-secondary);
}

.ymx-topic-arrow-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: #ccc;
    transition: fill 0.2s;
}

.ymx-topic-noimg-link:hover .ymx-topic-arrow-icon {
    fill: var(--ymx-accent-secondary);
}

.ymx-topic-grid {
    list-style: none;
    margin: 0;
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ymx-topic-grid-item {
    flex-shrink: 0;
}

.ymx-topic-grid-link {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 16 / 9;
    position: relative;
}

.ymx-topic-grid-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    z-index: 1;
}

.ymx-topic-grid-link:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    transform: translateY(-2px);
}

.ymx-topic-grid-link:hover::before {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

.ymx-topic-grid-name {
    font-size: 13px;
    color: #fff;
    text-align: center;
    padding: 10px 8px;
    background: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    position: relative;
    z-index: 2;
    max-width: 100%;
}

.ymx-topic-one-col .ymx-topic-grid-item {
    width: 100%;
}

.ymx-topic-two-col .ymx-topic-grid-item {
    width: calc(50% - 5px);
}

body.ymx-dark-mode .ymx-topic-name {
    color: #ccc;
}

body.ymx-dark-mode .ymx-topic-grid-link {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
